student_proposal_details.blade - Copy.php 43 KB

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