student_proposal_details.blade.php 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  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; text-transform: capitalize;">{{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 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 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-4 mt-3 pt-2" style="width: 27%;">
  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="width: 100%; padding: 10px 9px 20px;">
  245. <span class="title" style="font-size:11px; font-weight: 500;">Work Experience:</span>
  246. @php
  247. $work_history_first =$proposal_details->work_experience_date()->whereNotNull('start_date')->oldest()->first();
  248. $work_history_last =$proposal_details->work_experience_date()->latest()->first();
  249. if($work_history_first && $work_history_last && $work_history_last->end_date){
  250. $diff_in_days =diff_in_days($work_history_first->start_date,$work_history_last->end_date);
  251. }elseif($work_history_first){
  252. $diff_in_days =diff_in_days($work_history_first->start_date, now());
  253. }else{
  254. $diff_in_days =0;
  255. }
  256. $years = ($diff_in_days / 365) ;
  257. $years = floor($years);
  258. $month = ($diff_in_days % 365) / 30.5;
  259. $month = floor($month);
  260. $days = ($diff_in_days % 365) % 30.5;
  261. @endphp
  262. @if($proposal_details->student_details->is_work_experience ==1)
  263. <span class="label_badge_radius" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">{{$years}} years</span>
  264. <span style="margin-top: 18px; font-size: 11px; color: #868e96; margin-left: 3px; position: absolute !important; right: 23px;">
  265. ({{ dDate($work_history_first->start_date) }} - {{dDate($work_history_last->end_date, 'd M Y', 'Continue')}})
  266. </span>
  267. @else
  268. <span class="label_badge_radius" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
  269. @endif
  270. <span style="font-size: 11px; color: #868e96;"></span>
  271. </div>
  272. <div class="single_glance_row mt-1" style="display: flex; width: 100%;">
  273. <span class="title" style="font-size:11px; font-weight: 500;">Have you ever attended any conferences<br> to present your papers?</span>
  274. @if($proposal_details->student_details->is_attended_conference ==1)
  275. <span class="label_badge_radius mt-2" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">yes</span>
  276. @else
  277. <span class="label_badge_radius mt-2" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
  278. @endif
  279. <span style="font-size: 11px; color: #868e96;"></span>
  280. </div>
  281. <div class="single_glance_row_publication mt-1" style="display: flex; width: 100%; border-bottom: 1px solid #e8eef1;">
  282. <span class="title" style="font-size:11px; font-weight: 500;">Do you have any Publication?</span>
  283. @if($proposal_details->student_details->is_publication ==1)
  284. <span class="label_badge_radius" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">yes</span>
  285. @else
  286. <span class="label_badge_radius" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
  287. @endif
  288. <span style="font-size: 11px; color: #868e96;"></span>
  289. </div>
  290. @if($proposal_details->student_details->is_publication ==1)
  291. <div class="single_glance_row_publication mt-1" style="display: flex; width: 100%;">
  292. <div class="education_body mt-1">
  293. <div class="result" style="display: flex;">
  294. @foreach($proposal_details->publications as $row)
  295. <div class="result-part" style="font-size: 11px; text-transform: capitalize;">
  296. <span class="single_point">{{$row->publication }}:
  297. <span class="label_badge_radius" style="font-weight: 500; background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px; ">
  298. @if($row->status==1)
  299. Published
  300. @endif
  301. @if($row->status==2)
  302. Under Review
  303. @endif
  304. @if($row->status==3)
  305. Draft stage
  306. @endif
  307. </span>
  308. </span>
  309. </div>
  310. @endforeach
  311. </div>
  312. </div>
  313. @endif
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. </div><!--end col-->
  319. <div class="col-md-8 mt-2" style="width: 73%;">
  320. <div class="card border-0 mb-3" style="border-radius:6px !important;">
  321. <div class="row">
  322. @if($proposal_details->feedback_msg || $proposal_details->feedback_reason)
  323. <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);">
  324. <div class="single_glance_row mt-1 single_edit_item">
  325. <div class="row" style="display: flex;">
  326. <div class="col-md-10" style="width: 90%;">
  327. <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>
  328. Feedback : @if($proposal_details->feedback_msg) {{$proposal_details->feedback_msg}} @endif
  329. @if($proposal_details->feedback_reason) {{$proposal_details->feedback_reason}} @endif
  330. </span>
  331. </div>
  332. <div class="col-md-2" style="width: 10%;">
  333. {{-- <span class="title" style="font-size:11px; font-weight: 600;">
  334. <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>
  335. </span>
  336. <span class="title" style="font-size:11px; font-weight: 600;">
  337. <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>
  338. </span> --}}
  339. </div>
  340. </div>
  341. </div>
  342. </div>
  343. @endif
  344. </div>
  345. </div>
  346. <div class="card border-0 mt-0" style="border-radius:6px !important;">
  347. <div class="row">
  348. <div class="col-md-12" style="width: 99%; background-color:white; border-radius: 6px; padding: 10px;">
  349. <div class="row mt-3">
  350. <div class="col-md-8" style="width: 62%;">
  351. @if(file_exists( public_path().'/uploads/proposal/'.@$proposal_details->proposal->document_file ) && @$proposal_details->proposal->document_file != null)
  352. <iframe src ="{{url(asset('/uploads/proposal').'/'.@$proposal_details->proposal->document_file) }}" type="application/pdf" width="100%" height="560px"></iframe>
  353. @else
  354. <iframe src ="{{url(asset('web/files/CRM.pdf'))}}" type="application/pdf" width="100%" height="670px"></iframe>
  355. @endif
  356. </div><!--end col-->
  357. <div class="col-md-4" style="width: 35.5%;">
  358. <div class="info-palate mt-0" style="margin-left: -4px;">
  359. <div class="left">
  360. <div id="doc_required_load"></div>
  361. </div>
  362. </div>
  363. @if(count($doc_info) > 0)
  364. <div class="col-md-12" style="float: right; margin-top:5px;">
  365. <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
  366. </span>
  367. </div>
  368. @endif
  369. </div>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. </div>
  376. </div>
  377. </div>
  378. </div>
  379. </div>
  380. </div>
  381. @endsection
  382. @push('js')
  383. <script>
  384. $(function(){
  385. var form_row_added=false;
  386. $('.edit_feedback').on('click', function(){
  387. if(form_row_added){
  388. $('.open_feedback_msg_info_div').remove();
  389. form_row_added=false;
  390. }
  391. var self=$(this);
  392. var self_tr=self.closest('.single_edit_item');
  393. var std_propsal_id=self.data('id');
  394. form_row_added=true;
  395. self_tr.after(
  396. "<div class='open_feedback_msg_info_div'><div class='open_feedback_msg_edit_info_div_inner'></div></div>"
  397. );
  398. fetch_sub_content(
  399. '.open_feedback_msg_edit_info_div_inner',
  400. "{{ route('sub-content', ['name'=>'edit_feedback_msg_form']) }}?std_propsal_id="+std_propsal_id
  401. );
  402. });
  403. $('.delete_feedback').on('click', function(){
  404. var id = $(this).attr("data-id");
  405. var form_data={
  406. _token: "{{ csrf_token() }}",
  407. delete_id: id,
  408. }
  409. swal({
  410. title: "Are you sure?",
  411. text: "You will not be able to recover this data!",
  412. type: "warning",
  413. showCancelButton: true,
  414. confirmButtonClass: "btn-danger",
  415. cancelButtonClass: "btn-info",
  416. confirmButtonText: "Yes, delete!",
  417. cancelButtonText: "No, cancel!",
  418. }, function(isConfirm){
  419. if(isConfirm){
  420. $.post("{{ route('ajax-post', ['name'=>'delete_student_feedback_msg']) }}",form_data
  421. ).done(function(res){
  422. pop_up_msg(res.msg);
  423. window.location.reload();
  424. }).fail(function(err){
  425. pop_up_msg(err_msg(err), 'error');
  426. });
  427. }
  428. });
  429. });
  430. $('.rate_star_update').on('click', function(){
  431. var self =$(this);
  432. var id =self.data('id');
  433. var value =self.attr('value');
  434. var form_data={
  435. _token: "{{ csrf_token() }}",
  436. id: id,
  437. value:value
  438. }
  439. $.post("{{ route('ajax-post', ['name'=>'proposal_quality_rate_star_update']) }}", form_data, function(res){
  440. pop_up_msg(res.msg);
  441. window.location.reload();
  442. }).fail(function(err){
  443. pop_up_msg(err_msg(err), 'error');
  444. });
  445. });
  446. $('.concept_change').on('click', function(){
  447. var self =$(this);
  448. var id =self.data('id');
  449. var value =self.data('val');
  450. var form_data={
  451. _token :"{{csrf_token()}}",
  452. 'id':id,
  453. 'value':value
  454. }
  455. swal({
  456. title: "Are you sure you want to change status?",
  457. text: "Please check before submitting!",
  458. type: "warning",
  459. showCancelButton: true,
  460. confirmButtonClass: "btn-danger",
  461. cancelButtonClass: "btn-info",
  462. confirmButtonText: "Yes",
  463. cancelButtonText: "No",
  464. closeOnConfirm: true,
  465. closeOnCancel: true
  466. }, function(isConfirm){
  467. if(isConfirm){
  468. $.post("{{ route('ajax-post', ['name'=>'concept_status_update']) }}", form_data, function(res){
  469. pop_up_msg(res.msg);
  470. window.location.reload();
  471. }).fail(function(err){
  472. pop_up_msg(err_msg(err), 'error');
  473. });
  474. }
  475. });
  476. });
  477. $('.status_change').on('click', function(){
  478. var self =$(this);
  479. var id =self.data('id');
  480. var value =self.data('val');
  481. var form_data={
  482. _token :"{{csrf_token()}}",
  483. 'id':id,
  484. 'value':value
  485. }
  486. if(value==2 || value ==3 || value ==4 || value ==5 || value ==7){ // 2 =Reviewing; 3 =Push; 4 =Hold; 5 =Interested
  487. swal({
  488. title: "Are you sure you want to change status?",
  489. text: "Please check before submitting!",
  490. type: "warning",
  491. showCancelButton: true,
  492. confirmButtonClass: "btn-danger",
  493. cancelButtonClass: "btn-info",
  494. confirmButtonText: "Yes",
  495. cancelButtonText: "No",
  496. closeOnConfirm: true,
  497. closeOnCancel: true
  498. }, function(isConfirm){
  499. if(isConfirm){
  500. $.post("{{ route('ajax-post', ['name'=>'proposal_status_update']) }}", form_data, function(res){
  501. pop_up_msg(res.msg);
  502. window.location.reload();
  503. }).fail(function(err){
  504. pop_up_msg(err_msg(err), 'error');
  505. });
  506. }
  507. });
  508. }
  509. });
  510. // $('.feedback_btn').click(function(){
  511. // var id =$(this).data('id');
  512. // var message =$('#message').val();
  513. // var proposal_status =$('#p_status').val();
  514. // var form_data={
  515. // _token: "{{ csrf_token() }}",
  516. // id: id,
  517. // message: message,
  518. // proposal_status: proposal_status,
  519. // }
  520. // $.post("{{ route('ajax-post', ['name'=>'proposal_feedback_update']) }}", form_data, function(res){
  521. // pop_up_msg(res.msg);
  522. // window.location.reload();
  523. // }).fail(function(err){
  524. // pop_up_msg(err_msg(err), 'error');
  525. // });
  526. // });
  527. fetch_sub_content(
  528. '#doc_required_load',
  529. "{{ route('sub-content', ['name'=>'document_required_load', 'id'=>$proposal_details->id]) }}"
  530. );
  531. });
  532. </script>
  533. @endpush