student_proposal_details.blade.php 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. @extends('supervisor.layouts.master')
  2. @section('content')
  3. <div class="container-fluid mt-1" style="padding: 0px !important;">
  4. <div class="row">
  5. <div class="col-md-12">
  6. <div class="row">
  7. <div class="col-md-12">
  8. <div class="card profile_top_part_info">
  9. <div class="whole_part">
  10. <div class="right_part">
  11. <div class="right_part_right">
  12. <div class="right_part_right_whole">
  13. <div class="col-md-5 mt-1 left-box">
  14. <div class="ms-3 mt-2">
  15. <div style="display:flex;">
  16. @if($proposal_details->student_details->nationality)
  17. <img class="img-responsive listFlag mt-2" style="border-radius: 2px; padding: 0px;height: 45px; width: 45px;" src="{{ asset('/assets/img/flags/4x3').'/'.strtolower(cn($proposal_details,'student_details.country_name.iso_3166_2','')).'.svg' }}" alt="Flag" data-toggle="tooltip" title="" data-placement="top">
  18. @endif
  19. <div class="alert" style="background-color:white; padding: 3px 7px; margin-bottom: 0px;">
  20. <span style="font-size: 19px; font-weight: 700;">{{cn($proposal_details,'student_details.first_name','')}} {{cn($proposal_details,'student_details.last_name','')}}</span> <br>
  21. <span style="font-size:12px;">
  22. <!-- <span style="color: #868e96;">Gender :</span> -->
  23. <a href="" class="rounded" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Gender" style="color: black !important;">{{\Str::ucfirst(cn($proposal_details,'student_details.gender',''))}}</a>
  24. </span>
  25. <span> • </span>
  26. <span style="font-size:12px;">
  27. <a href="" class="rounded" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Age" style="color: black !important;">{{age_calculator(cn($proposal_details,'student_details.dob',''))}}</a>
  28. <!-- <span style="color: #868e96;">Age :</span> -->
  29. {{-- <strong>23 years 3 month</strong> --}}
  30. </span>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="p-3 left-box" style="width: 65%;">
  36. <h6 class="ref">
  37. Apply Ref: {{$proposal_details->student_apply_ref ?? "N/A"}}
  38. {{-- {{cn($proposal_details,'teacher_details.ref_no','')}} --}}
  39. </h6>
  40. <span>
  41. <strong style="font-size: 14px;">
  42. {{cn($proposal_details,'proposal.title','')}}
  43. </strong >
  44. </span>
  45. <div class="mt-1">
  46. <span style="font-size:12px;">
  47. <a href="" class="rounded" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Methology" style="color: black !important;">{{cn($proposal_details,'proposal.methology','')}}</i></a>
  48. </span>
  49. <span> • </span>
  50. <span class="ms-2" style="font-size:12px;">
  51. <a href="" class="rounded" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Funding Status" style="color: black !important;">{{cn($proposal_details,'proposal.status','')}}</i></a>
  52. </span>
  53. <span> • </span>
  54. <span class="ms-2" style="font-size:12px;">
  55. <a href="" class="rounded" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Preferred Start Date" style="color: black !important;">{{ date("M Y", strtotime($proposal_details->created_at))}}</i></a>
  56. </span>
  57. </div>
  58. <div class="mt-1">
  59. <span style="font-size:12px;">
  60. <span>Applied On : </span>
  61. <strong style="font-weight: 700; font-size: 12px; letter-spacing: 0.8px;">{{ date("d M Y", strtotime($proposal_details->created_at))}}</strong>
  62. </span>
  63. </div>
  64. </div>
  65. <div class="ms-3 mt-1" style="width: 40%; padding: 7px; display: grid;">
  66. <div class="card rounded border-0" style="background-color: white;">
  67. <div class="info-palate mt-0" style="margin:0px;">
  68. <div class="left">
  69. <div>
  70. <div class="single_glance_row mt-1">
  71. <span class="title" style="font-size:12px; font-weight: 600;">Proposal Quality :</span>
  72. <span class="tbl2 mb-2 pro_top_rating" style="float:right;">
  73. <input type="radio" class="rate_star_update" data-id="{{$proposal_details->id}}" id="star5" name="rate" value="5" @if($proposal_details->proposal_quality ==5) checked @endif/>
  74. <label class="rate_star hand tooltips" for="star5" title="5 stars"></label>
  75. <input type="radio" class="rate_star_update" data-id="{{$proposal_details->id}}" id="star4" name="rate" value="4" @if($proposal_details->proposal_quality ==4) checked @endif/>
  76. <label class="rate_star hand tooltips" for="star4" title="4 stars"></label>
  77. <input type="radio" class="rate_star_update" data-id="{{$proposal_details->id}}" id="star3" name="rate" value="3" @if($proposal_details->proposal_quality ==3) checked @endif/>
  78. <label class="rate_star hand tooltips" for="star3" title="3 stars"></label>
  79. <input type="radio" class="rate_star_update" data-id="{{$proposal_details->id}}" id="star2" name="rate" value="2" @if($proposal_details->proposal_quality ==2) checked @endif/>
  80. <label class="rate_star hand tooltips" for="star2" title="2 stars"></label>
  81. <input type="radio" class="rate_star_update" data-id="{{$proposal_details->id}}" id="star1" name="rate" value="1" @if($proposal_details->proposal_quality ==1) checked @endif/>
  82. <label class="rate_star hand tooltips" for="star1" title="1 star"></label>
  83. </span>
  84. </div>
  85. <div class="single_glance_row mt-1">
  86. <span class="title" style="font-size:12px; font-weight: 600;">Concept :</span>
  87. <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px; float: right;">
  88. @if($proposal_details->concept==1)
  89. <span class="top_part_status_name" style="background: #bcfaca; color: #0a9652;">
  90. Good
  91. </span>
  92. @elseif($proposal_details->concept==2)
  93. <span class="top_part_status_name" style="background: #ffca84; color: #ee8414;">
  94. Average
  95. </span>
  96. @else
  97. <span class="top_part_status_name" style="background: #f8c8c8; color: #db390c;">
  98. Poor
  99. </span>
  100. @endif
  101. <div class="dropdown" style="top:-2px; position: absolute; right: 9px;">
  102. <i class="fa fa-caret-down dropdown-toggle add_hover tooltips" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-original-title="Change Status" style="color: #8c9094; margin-top: 4px;"></i>
  103. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(10px, 13px, 0px); top: 0px; left: 0px; will-change: transform; margin-left: -75px; z-index: 2; margin-top: 10px;">
  104. <a class="dropdown-item concept_change" data-val="1" @if($proposal_details->concept==1) {{'activate'}} @endif" data-id="{{$proposal_details->id}}" name="concept">Good</a>
  105. <a class="dropdown-item concept_change" data-val="2" @if($proposal_details->concept==2) {{'activate'}} @endif" data-id="{{$proposal_details->id}}" name="concept">Average</a>
  106. <a class="dropdown-item concept_change" data-val="3" @if($proposal_details->concept==3) {{'activate'}} @endif" data-id="{{$proposal_details->id}}" name="concept">Poor</a>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <div class="single_glance_row mt-1" style="border-bottom: none;">
  112. <span class="title" style="font-size:12px; font-weight: 600;">Status :</span>
  113. <div class="top_part_status" style="position: relative; width: fit-content; margin-left: 10px; float: right;">
  114. @if($proposal_details->proposal_status==1)
  115. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  116. New
  117. </span>
  118. @endif
  119. @if($proposal_details->proposal_status==2)
  120. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  121. Reviewing
  122. </span>
  123. @endif
  124. @if($proposal_details->proposal_status==3)
  125. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  126. Pause
  127. </span>
  128. @endif
  129. @if($proposal_details->proposal_status==4)
  130. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  131. Hold
  132. </span>
  133. @endif
  134. @if($proposal_details->proposal_status==5)
  135. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  136. Interested
  137. </span>
  138. @endif
  139. @if($proposal_details->proposal_status==6)
  140. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  141. Rejected
  142. </span>
  143. @endif
  144. @if($proposal_details->proposal_status==7)
  145. <span class="top_part_status_name" style="background: #dcdcdc; color: #8c9094;">
  146. Terminate
  147. </span>
  148. @endif
  149. <div class="dropdown" style="top: -2px; position: absolute; right: 9px;">
  150. <i class="fa fa-caret-down dropdown-toggle add_hover tooltips" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" data-original-title="Change Status" style="color: #8c9094;"></i>
  151. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(10px, 13px, 0px); top: 0px; left: 0px; will-change: transform; margin-left: -75px; z-index: 2; margin-top: 10px;">
  152. {{-- <a class="dropdown-item status_change hand" data-val="1" data-id="{{$proposal_details->id}}" name="proposal_status">New</a> --}}
  153. <a class="dropdown-item status_change hand" data-val="2" data-id="{{$proposal_details->id}}" name="proposal_status">In Review</a>
  154. <a class="dropdown-item status_change hand" data-val="3" data-id="{{$proposal_details->id}}" name="proposal_status">Pause</a> <!--Push means less than 2 seconds does one thing -->
  155. <a class="dropdown-item status_change hand" data-val="4" data-id="{{$proposal_details->id}}" name="proposal_status">Hold</a> <!--holding it for longer does something-->
  156. <a class="dropdown-item status_change hand" data-val="5" data-id="{{$proposal_details->id}}" name="proposal_status">Interested</a>
  157. <a class="dropdown-item open_modal_page hand" data-url="{{route('modal-get',['name'=>'proposal_status_rejected_form','id'=>$proposal_details->id])}}" data-title="Rejected" data-val="6" data-id="{{$proposal_details->id}}">Rejected</a>
  158. <a class="dropdown-item status_change hand" data-val="7" data-id="{{$proposal_details->id}}" name="proposal_status">Terminate</a>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. <div class="col-md-3 mt-3 pt-2">
  175. <div class="card p-3 rounded border-0 mb-4" style="background-color: white;">
  176. <div class="info-palate mt-0">
  177. <div class="left">
  178. <div class="mb-2">
  179. <div class="Feedback" style="font-size: 17px; font-weight: 700;">Applicante Profile</div>
  180. </div>
  181. @if(count($education_history) > 0)
  182. @foreach($education_history as $row)
  183. <div class="summary_edu_part mt-1">
  184. <div class="education_head">
  185. <div class="left">
  186. <span class="edu_title">{{cn($row,'academic_level_info.name','')}}</span>
  187. </div>
  188. <div class="right">
  189. <span class="label_badge_radius" style="font-weight: 600; background: #1416398a; color: white;">{{$row->result}}</span>
  190. </div>
  191. </div>
  192. <div class="education_body mt-2">
  193. <ul>
  194. <li>{{$row->subject}}</li>
  195. <li>{{$row->institution}}</li>
  196. <li>{{$row->passing_year}}</li>
  197. </ul>
  198. </div>
  199. </div>
  200. @endforeach
  201. @endif
  202. <div class="summary_ielts_part mt-2 ms-2">
  203. <div class="education_head">
  204. <div class="left">
  205. <span class="edu_title">{{cn($proposal_details,'scores.test_name','')}}</span>
  206. <div class="expiration">
  207. <span class="tooltips" style="font-size: 11px; color: #868e96;" data-original-title="Expiration">
  208. <i class="fa fa-calendar-check-o mr-1" style="color: #908f8f;"></i>
  209. @if(!empty($proposal_details->scores->expiration_date)) {{ date('d M Y', strtotime(cn($proposal_details,'scores.expiration_date','')))}} @else @endif
  210. </span>
  211. </div>
  212. <span class="label_badge_radius" style="position: absolute; right: 10px; font-weight: 600; background: #1416398a; color: white;">{{cn($proposal_details,'scores.overall_score','')}}</span>
  213. </div>
  214. </div>
  215. <div class="education_body mt-1" style="border-bottom: 1px solid #e8eef1;padding: 8px 0px">
  216. <div class="result" style="display: flex;">
  217. <div class="result-part" style="font-size: 11px;">
  218. <span class="single_point">Speaking:
  219. <span class="point_number" style="font-weight: 700;">{{cn($proposal_details,'scores.speaking','')}} ,
  220. </span>
  221. </span>
  222. </div>
  223. <div class="result-part" style="font-size: 11px;">
  224. <span class="single_point ms-2">Listening:
  225. <span class="point_number" style="font-weight: 700;">{{cn($proposal_details,'scores.listening','')}} ,
  226. </span>
  227. </span>
  228. </div>
  229. <div class="result-part" style="font-size: 11px;">
  230. <span class="single_point ms-2">Writing:
  231. <span class="point_number" style="font-weight: 700;">{{cn($proposal_details,'scores.writing','')}} ,
  232. </span>
  233. </span>
  234. </div>
  235. <div class="result-part" style="font-size: 11px;">
  236. <span class="single_point ms-2">Reading:
  237. <span class="point_number" style="font-weight: 700;">{{cn($proposal_details,'scores.reading','')}}
  238. </span>
  239. </span>
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. <div class="single_glance_row mt-1" style="display: flex; width: 100%;">
  245. <span class="title" style="font-size:11px; font-weight: 600;">Work Experience:</span>
  246. @if($proposal_details->student_details->is_work_experience ==1)
  247. <span class="label_badge_radius" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">yes</span>
  248. @else
  249. <span class="label_badge_radius" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
  250. @endif
  251. <span style="font-size: 11px; color: #868e96;"></span>
  252. </div>
  253. <div class="single_glance_row mt-1" style="display: flex; width: 100%;">
  254. <span class="title" style="font-size:11px; font-weight: 600;">Have you ever attended any conferences<br> to present your papers?</span>
  255. @if($proposal_details->student_details->is_attended_conference ==1)
  256. <span class="label_badge_radius mt-2" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">yes</span>
  257. @else
  258. <span class="label_badge_radius mt-2" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
  259. @endif
  260. <span style="font-size: 11px; color: #868e96;"></span>
  261. </div>
  262. <div class="single_glance_row mt-1" style="display: flex; width: 100%;">
  263. <span class="title" style="font-size:11px; font-weight: 600;">Do you have any Publication?</span>
  264. @if($proposal_details->student_details->is_publication ==1)
  265. <span class="label_badge_radius" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">yes</span>
  266. @else
  267. <span class="label_badge_radius" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
  268. @endif
  269. <span style="font-size: 11px; color: #868e96;"></span>
  270. </div>
  271. </div>
  272. </div>
  273. </div>
  274. </div><!--end col-->
  275. <div class="col-md-9 mt-2">
  276. <div class="card border-0 mb-3" style="border-radius:6px !important;">
  277. <div class="row">
  278. @if($proposal_details->feedback_msg || $proposal_details->feedback_reason)
  279. <div class="col-md-12" style="width: 99%;font-size: 12px !important; background-color:#fff0d6; border-radius: 6px; padding: 10px;color: rgb(237, 14, 14);">
  280. <div class="single_glance_row mt-1 single_edit_item">
  281. <div class="row" style="display: flex;">
  282. <div class="col-md-10" style="width: 90%;">
  283. <span class="title" style="font-size:11px; font-weight: 600; color: rgb(237, 14, 14) !important;"> <i class="fa fa-warning" style="font-size: 11px; margin-right: 5px; color: rgb(237, 14, 14) !important; top: 0px; position: relative;"></i>
  284. Feedback : @if($proposal_details->feedback_msg) {{$proposal_details->feedback_msg}} @endif
  285. @if($proposal_details->feedback_reason) {{$proposal_details->feedback_reason}} @endif
  286. </span>
  287. </div>
  288. <div class="col-md-2" style="width: 10%;">
  289. {{-- <span class="title" style="font-size:11px; font-weight: 600;">
  290. <button type="button" class="btn btn2 edit_feedback mb-1" data-id="{{$proposal_details->id}}" style="padding: 2px 5px !important; font-size: 11px;"><i class="fa fa-pencil"></i></button>
  291. </span>
  292. <span class="title" style="font-size:11px; font-weight: 600;">
  293. <button type="button" class="btn btn2 delete_feedback mb-1" data-id="{{$proposal_details->id}}" style="padding: 2px 5px !important; font-size: 11px;"><i class="fa fa-trash" style="margin-left:2px;"></i></button>
  294. </span> --}}
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. @endif
  300. </div>
  301. </div>
  302. <div class="card border-0 mt-0" style="border-radius:6px !important;">
  303. <div class="row">
  304. <div class="col-md-12" style="width: 99%; background-color:white; border-radius: 6px; padding: 10px;">
  305. <div class="row mt-3">
  306. <div class="col-md-8" style="width: 62%;">
  307. @if(file_exists( public_path().'/uploads/proposal/'.@$proposal_details->proposal->document_file ) && @$proposal_details->proposal->document_file != null)
  308. <iframe src ="{{url(asset('/uploads/proposal').'/'.@$proposal_details->proposal->document_file) }}" type="application/pdf" width="100%" height="560px"></iframe>
  309. @else
  310. <iframe src ="{{url(asset('web/files/CRM.pdf'))}}" type="application/pdf" width="100%" height="670px"></iframe>
  311. @endif
  312. </div><!--end col-->
  313. <div class="col-md-4" style="width: 35.5%;">
  314. <div class="info-palate mt-0" style="margin-left: -4px;">
  315. <div class="left">
  316. <div id="doc_required_load"></div>
  317. </div>
  318. </div>
  319. @if(count($doc_info) > 0)
  320. <div class="col-md-12" style="float: right; margin-top:5px;">
  321. <span class="btn open_modal_page submit_button" data-url="{{route('modal-get',['send_email_document_information', 'id'=>$proposal_details->id])}}" data-title="Send Email">Send Email
  322. </span>
  323. </div>
  324. @endif
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. @endsection
  338. @push('js')
  339. {{-- @include('supervisor.layouts.modal') --}}
  340. <script>
  341. function fetch_sub_content(selector, url, args=null){
  342. var config={
  343. spinner: true
  344. }
  345. if(typeof args=='object'){
  346. config=Object.assign(config, args);
  347. }
  348. if(config.spinner){
  349. $(selector).waitMe({
  350. effect: 'facebook',
  351. text: 'Please! Wait ...'
  352. });
  353. }
  354. $(selector).load(url, null, function(){
  355. $(selector).waitMe('hide');
  356. if(typeof args=='function') args();
  357. });
  358. }
  359. function wait_me(selector, config=null){
  360. if(config){
  361. selector.waitMe(config);
  362. }else{
  363. selector.waitMe({
  364. effect: 'facebook',
  365. //color: '#000',
  366. text: 'Please! Wait ...'
  367. });
  368. }
  369. }
  370. function pop_up_msg(msg='No message specified', type='success', callback=null){
  371. new Noty({
  372. theme:'sunset',
  373. text: msg,
  374. type: type,
  375. timeout:1500,
  376. callbacks:{
  377. afterClose: callback
  378. }
  379. }).show();
  380. }
  381. function err_msg(err){
  382. var msg="Request failed to process, try again later.";
  383. if(err.responseJSON && err.responseJSON.msg){
  384. msg=err.responseJSON.msg;
  385. }
  386. return msg;
  387. }
  388. function ajax_form(form, cllback=null, config={spinner: true}){
  389. $('.btn-submit').prop('disabled', true);
  390. var redirect=$(form).data('redirect');
  391. if(typeof config=='object'){
  392. if(config.spinner) wait_me($(form));
  393. }
  394. $(form).ajaxSubmit({
  395. success:function(res){
  396. wait_me($(form), 'hide');
  397. if(res.msg){
  398. pop_up_msg(res.msg, 'success', function(){
  399. $('.btn-submit').prop('disabled', false);
  400. if(redirect) window.location.replace(redirect);
  401. else if(typeof cllback=='function'){
  402. cllback(form, res);
  403. }
  404. });
  405. }
  406. //$.notify(res.msg, 'success');
  407. },
  408. error:function(res){
  409. wait_me($(form), 'hide');
  410. var msg="Request failed to process, try again later.";
  411. if(res.responseJSON && res.responseJSON.msg){
  412. msg=res.responseJSON.msg;
  413. }
  414. pop_up_msg(msg, 'error');
  415. $('.btn-submit').prop('disabled', false);
  416. }
  417. });
  418. } //End of ajax form definition
  419. $(function(){
  420. var form_row_added=false;
  421. $('.edit_feedback').on('click', function(){
  422. if(form_row_added){
  423. $('.open_feedback_msg_info_div').remove();
  424. form_row_added=false;
  425. }
  426. var self=$(this);
  427. var self_tr=self.closest('.single_edit_item');
  428. var std_propsal_id=self.data('id');
  429. form_row_added=true;
  430. self_tr.after(
  431. "<div class='open_feedback_msg_info_div'><div class='open_feedback_msg_edit_info_div_inner'></div></div>"
  432. );
  433. fetch_sub_content(
  434. '.open_feedback_msg_edit_info_div_inner',
  435. "{{ route('sub-content', ['name'=>'edit_feedback_msg_form']) }}?std_propsal_id="+std_propsal_id
  436. );
  437. });
  438. $('.delete_feedback').on('click', function(){
  439. var id = $(this).attr("data-id");
  440. var form_data={
  441. _token: "{{ csrf_token() }}",
  442. delete_id: id,
  443. }
  444. swal({
  445. title: "Are you sure?",
  446. text: "You will not be able to recover this data!",
  447. type: "warning",
  448. showCancelButton: true,
  449. confirmButtonClass: "btn-danger",
  450. cancelButtonClass: "btn-info",
  451. confirmButtonText: "Yes, delete!",
  452. cancelButtonText: "No, cancel!",
  453. }, function(isConfirm){
  454. if(isConfirm){
  455. $.post("{{ route('ajax-post', ['name'=>'delete_student_feedback_msg']) }}",form_data
  456. ).done(function(res){
  457. pop_up_msg(res.msg);
  458. window.location.reload();
  459. }).fail(function(err){
  460. pop_up_msg(err_msg(err), 'error');
  461. });
  462. }
  463. });
  464. });
  465. $('.rate_star_update').on('click', function(){
  466. var self =$(this);
  467. var id =self.data('id');
  468. var value =self.attr('value');
  469. var form_data={
  470. _token: "{{ csrf_token() }}",
  471. id: id,
  472. value:value
  473. }
  474. $.post("{{ route('ajax-post', ['name'=>'proposal_quality_rate_star_update']) }}", form_data, function(res){
  475. pop_up_msg(res.msg);
  476. window.location.reload();
  477. }).fail(function(err){
  478. pop_up_msg(err_msg(err), 'error');
  479. });
  480. });
  481. $('.concept_change').on('click', function(){
  482. var self =$(this);
  483. var id =self.data('id');
  484. var value =self.data('val');
  485. var form_data={
  486. _token :"{{csrf_token()}}",
  487. 'id':id,
  488. 'value':value
  489. }
  490. swal({
  491. title: "Are you sure you want to change status?",
  492. text: "Please check before submitting!",
  493. type: "warning",
  494. showCancelButton: true,
  495. confirmButtonClass: "btn-danger",
  496. cancelButtonClass: "btn-info",
  497. confirmButtonText: "Yes",
  498. cancelButtonText: "No",
  499. closeOnConfirm: true,
  500. closeOnCancel: true
  501. }, function(isConfirm){
  502. if(isConfirm){
  503. $.post("{{ route('ajax-post', ['name'=>'concept_status_update']) }}", form_data, function(res){
  504. pop_up_msg(res.msg);
  505. window.location.reload();
  506. }).fail(function(err){
  507. pop_up_msg(err_msg(err), 'error');
  508. });
  509. }
  510. });
  511. });
  512. $('.status_change').on('click', function(){
  513. var self =$(this);
  514. var id =self.data('id');
  515. var value =self.data('val');
  516. var form_data={
  517. _token :"{{csrf_token()}}",
  518. 'id':id,
  519. 'value':value
  520. }
  521. if(value==2 || value ==3 || value ==4 || value ==5 || value ==7){ // 2 =Reviewing; 3 =Push; 4 =Hold; 5 =Interested
  522. swal({
  523. title: "Are you sure you want to change status?",
  524. text: "Please check before submitting!",
  525. type: "warning",
  526. showCancelButton: true,
  527. confirmButtonClass: "btn-danger",
  528. cancelButtonClass: "btn-info",
  529. confirmButtonText: "Yes",
  530. cancelButtonText: "No",
  531. closeOnConfirm: true,
  532. closeOnCancel: true
  533. }, function(isConfirm){
  534. if(isConfirm){
  535. $.post("{{ route('ajax-post', ['name'=>'proposal_status_update']) }}", form_data, function(res){
  536. pop_up_msg(res.msg);
  537. window.location.reload();
  538. }).fail(function(err){
  539. pop_up_msg(err_msg(err), 'error');
  540. });
  541. }
  542. });
  543. }
  544. });
  545. // $('.feedback_btn').click(function(){
  546. // var id =$(this).data('id');
  547. // var message =$('#message').val();
  548. // var proposal_status =$('#p_status').val();
  549. // var form_data={
  550. // _token: "{{ csrf_token() }}",
  551. // id: id,
  552. // message: message,
  553. // proposal_status: proposal_status,
  554. // }
  555. // $.post("{{ route('ajax-post', ['name'=>'proposal_feedback_update']) }}", form_data, function(res){
  556. // pop_up_msg(res.msg);
  557. // window.location.reload();
  558. // }).fail(function(err){
  559. // pop_up_msg(err_msg(err), 'error');
  560. // });
  561. // });
  562. fetch_sub_content(
  563. '#doc_required_load',
  564. "{{ route('sub-content', ['name'=>'document_required_load', 'id'=>$proposal_details->id]) }}"
  565. );
  566. });
  567. </script>
  568. @endpush