document_required_load.blade.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. @extends('admin.sub_contents.base')
  2. @section('main')
  3. <style type="text/css">
  4. .list_table tbody tr td {
  5. font-size: 12.5px;
  6. font-weight: 400;
  7. border-style: dashed;
  8. }
  9. .list_table thead tr th, .list_table tbody tr td {
  10. padding: 11px 6px 10px;
  11. }
  12. .table-bordered {
  13. border: none !important;
  14. }
  15. .requirement_box{
  16. width: 100%;
  17. height: 40px;
  18. background: #fff;
  19. /*box-shadow: 0px 0px 1px rgb(98, 95, 139);*/
  20. padding: 10px;
  21. border-radius: 2px;
  22. margin-bottom: 10px;
  23. border: 1px solid #e4e4e4;
  24. }
  25. .uni_name{
  26. position: relative;
  27. top: 10%;
  28. font-size: 12px;
  29. font-weight: 600;
  30. color: rgb(98, 95, 139);
  31. cursor: pointer;
  32. }
  33. .requirement_box:last-child{
  34. margin-bottom: 0;
  35. }
  36. .uni_name:hover{
  37. color: #ff7f00;
  38. transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
  39. }
  40. .sl_number{
  41. color: #625f8b;
  42. font-size: 14px;
  43. position: relative;
  44. left: -28px;
  45. top: 2px;
  46. }
  47. .archive_btn:hover{
  48. color: #ff7f00;
  49. transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
  50. }
  51. .archive_btn{
  52. color: rgb(98, 95, 139);
  53. font-size: 15px;
  54. top: 2px;
  55. position: relative;
  56. }
  57. .requirement_map_part .single_doc_item{
  58. display: flex;
  59. background: fff;
  60. padding: 7px 16px;
  61. margin-top: 10px;
  62. border-radius: 0.75rem;
  63. border: 1px solid #e9f0f3;
  64. }
  65. .requirement_map_part .single_doc_item:hover{
  66. background: #f5f4fd;
  67. }
  68. .requirement_map_part .single_doc_item .left{
  69. width: calc(100% - 190px);
  70. align-self: center;
  71. }
  72. .requirement_map_part .single_doc_item .left strong{
  73. color: rgb(57, 59, 62);
  74. font-size: 12px;
  75. }
  76. .requirement_map_part .single_doc_item .right{
  77. width: 154px;
  78. align-self: center;
  79. text-align: -webkit-right;
  80. }
  81. .requirement_map_part .single_doc_item .round_btn_groups .label_badge_radius {
  82. border-radius: 20px;
  83. padding: 1px 10px;
  84. font-size: 11px;
  85. font-weight: 400;
  86. line-height: 1.3;
  87. letter-spacing: .2px;
  88. background: #f5f4fd;
  89. border: 1px solid #ceccda;
  90. }
  91. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle:after{
  92. display: none;
  93. }
  94. /*.requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle{
  95. color: #c3c3c3;
  96. cursor: pointer;
  97. border: .5px solid #d8e2e7;
  98. border-radius: 50%;
  99. padding: 3px 5px;
  100. font-size: .9rem;
  101. padding: 3px 5px;
  102. }*/
  103. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show{
  104. /*margin-left: -97px;*/
  105. min-width: auto;
  106. padding: 0;
  107. z-index: 2;
  108. top: -5px !important;
  109. left: 60px !important;
  110. }
  111. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item{
  112. background: #dedbf1;
  113. color: #2e1153;
  114. font-size: 12px;
  115. border: none;
  116. }
  117. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item:hover{
  118. background: #2e1153;
  119. color: #fff !important;
  120. }
  121. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .activate{
  122. background: #2e1153;
  123. color: #fff;
  124. }
  125. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item:first-child{
  126. border-top-left-radius: .25rem;
  127. border-top-right-radius: .25rem;
  128. }
  129. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-menu.show .dropdown-item:last-child{
  130. border-bottom-left-radius: .25rem;
  131. border-bottom-right-radius: .25rem;
  132. }
  133. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle{
  134. background: #dedbf1;
  135. padding: 4px 8px 2px;
  136. border-radius: 50%;
  137. font-size: .8rem;
  138. border: 1px solid transparent;
  139. color: #2e1153;
  140. cursor: pointer;
  141. }
  142. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle:hover {
  143. color: #ff7f00 !important;
  144. transition: all 1s cubic-bezier(0.19, 1, 0.22, 1) 0s;
  145. border: 1px solid #ff7f00;
  146. }
  147. .requirement_map_part .single_doc_item .right .add_more_drop{
  148. z-index: auto !important;
  149. margin: 0 3.5px;
  150. }
  151. .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-paperclip{
  152. padding: 4px 6px 4px !important;
  153. font-size: .82rem;
  154. }
  155. .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-upload, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-trash, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-pencil, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-info, .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-archive{
  156. color: #826aa0 !important;
  157. }
  158. .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .fa-eye{
  159. padding: 4px 4.5px !important;
  160. color: #826aa0 !important;
  161. }
  162. .requirement_map_part .single_doc_item .right .add_more_drop .dropdown-toggle{
  163. padding: 4px 5px !important;
  164. }
  165. .requirement_map_part .single_doc_item .round_btn_groups .add_more_drop .font-icon{
  166. color: #826aa0 !important;
  167. }
  168. .requirement_map_part .single_doc_item .right .add_more_drop{
  169. z-index: auto !important;
  170. margin: 0 3.5px;
  171. }
  172. .requirement_map_part .single_doc_item .right img {
  173. width: 22px;
  174. height: 22px;
  175. border-radius: 50%;
  176. }
  177. .requirement_map_part .single_doc_item .round_btn_groups{
  178. display: flex;
  179. width: 174px;
  180. justify-content: flex-end;
  181. }
  182. .open_requirement_doc_info_div_inner{
  183. padding: 7px 16px;
  184. margin-top: 10px;
  185. border-radius: 30px;
  186. border: 1px solid #e9f0f3;
  187. display: flex;
  188. width: fit-content;
  189. margin-left: auto;
  190. background: #f5f4fd;
  191. }
  192. .open_requirement_doc_info_div_inner .btn_part{
  193. width: 175px;
  194. text-align-last: right;
  195. margin-top: 3px;
  196. margin-left: 15px;
  197. }
  198. .label_badge_radius {
  199. background-image: linear-gradient(to right, rgb(46 17 83 / 19%), rgb(245, 244, 253));
  200. color: rgb(46, 17, 83);
  201. border-radius: 20px;
  202. padding: 1px 10px;
  203. font-size: 11px;
  204. font-weight: 400;
  205. line-height: 1.3;
  206. letter-spacing: .2px;
  207. display: inline-block;
  208. }
  209. .requirement_map_part .single_doc_item .left .pretty.p-switch.p-fill input:checked~.state.p-success:before {
  210. background-color: #2e1153!important;
  211. }
  212. .requirement_map_part .single_doc_item .left .pretty.p-switch input:checked~.state.p-success:before{
  213. border-color: #2e1153!important;;
  214. }
  215. </style>
  216. <div class="row requirement_map_part">
  217. <div class="col-lg-12">
  218. <div class="row">
  219. <div class="col-md-12">
  220. <div class="content_header mb-2 ml-0">
  221. <div class="left">
  222. <i class="fa fa-list-ul" style="padding: 6px 6.8px;"></i>
  223. </div>
  224. <div class="right" style="display: flex; align-self: center;">
  225. <span class="main_title" style="font-size: 18px;">Document or Information Required</span>
  226. {{-- <span class="badge badge-success ml-2" style="background: #ffffff; font-weight: 700; font-size: 12px !important; border-radius: 10px; padding: 4px 12px !important; border: 1px solid #d4d2df; color: #2e1153; position: relative; margin-left:5px;">{{$requirements->count()}}</span> --}}
  227. </div>
  228. </div>
  229. </div>
  230. <div class="col-md-2 mb-2 ms-4 ps-4">
  231. <span class="btn open_modal_page submit_button" data-url="{{route('modal-get',['add_doc_required', 'id'=>$proposal_details->id])}}" data-title="Add Requirement" style="padding: 4px 11px!important; height: 22px!important; font-size: 13px!important;">Add
  232. </span>
  233. </div>
  234. </div>
  235. </div>
  236. <div class="table-responsive ms-4 ps-4 mt-1">
  237. @if($requirements->isEmpty())
  238. <div class="alert mb-1" role="alert" style="border-color: #e9f0f3; font-size: 12px !important; color: #dc3545; border-radius: 30px; padding: 8px 15px;">
  239. <span>No Requirement available.</span>
  240. </div>
  241. @else
  242. @foreach($requirements as $key=>$row)
  243. <div class="single_doc_item mb-3">
  244. <div class="left_icon" style="align-self: center;">
  245. @if($row->need_upload)
  246. <i class="fa fa-file-text tooltips" title="Document" style="background: #f1f0fb; padding: 4px 5px; border-radius: 50%; border: 1px solid #ceccda; margin: 0 5px 0 -5px; top: 7px; position: relative;"></i>
  247. @else
  248. <i class="fa fa-info tooltips" title="Information" style="background: #f1f0fb; padding: 4px 8px; border-radius: 50%; border: 1px solid #ceccda; margin: 0 5px 0 -5px; top: 7px; position: relative;"></i>
  249. @endif
  250. </div>
  251. <div class="left ml-2">
  252. <span>{{ $row->requirement_title }} </span>
  253. <br>
  254. <small style="color: rgb(134, 142, 150); font-size: 12px !important;">{{ utc_to_ltz($row->created_at) }} </small>
  255. </div>
  256. <div class="right">
  257. <div class="round_btn_groups">
  258. {{-- <span style="border-bottom: none;">
  259. <div class="add_more_drop tooltips" title="" data-original-title="View File">
  260. <i class="fa fa-eye dropdown-toggle"></i>
  261. </div>
  262. </span> --}}
  263. @if($row->need_upload)
  264. <span class="add_more_drop add_more_drop" style="border-bottom: none;margin-top: -1px; margin-bottom: 1px;">
  265. <span class="fa fa-upload tooltips upload_document hand dropdown-toggle" aria-hidden="true" data-id="{{$row->id}}" title='Upload Document'></span>
  266. </span>
  267. @endif
  268. @if($row->document_file)
  269. <a href="{{ asset('uploads/required_doc') }}/{{$row->document_file}}" download="{{ $row->document_file }}" style="border-bottom: none;">
  270. <div class="add_more_drop tooltips" title="" data-original-title="Download">
  271. <i class="fa fa-paperclip dropdown-toggle"></i>
  272. </div>
  273. </a>
  274. @endif
  275. <span class="add_more_drop open_modal_page" data-url="{{route('modal-get',['name'=>'edit_doc_required','id'=>$row->id])}}" data-title="Edit Requirement" data-toggle="tooltip" data-original-title="Edit">
  276. <i class="fa fa-pencil action_button_hover dropdown-toggle"></i>
  277. </span>
  278. <span class="add_more_drop delete_doc_required" data-id="{{$row->id}}" data-toggle="tooltip" data-original-title="Delete">
  279. <i class="fa fa-trash delete action_button_hover dropdown-toggle"></i>
  280. </span>
  281. </div>
  282. </div>
  283. </div>
  284. @endforeach
  285. @endif
  286. </div>
  287. </div>
  288. </div>
  289. @endsection
  290. <script>
  291. $(function(){
  292. var form_row_added=false;
  293. $('.upload_document').on('click', function(){
  294. if(form_row_added){
  295. $('.open_department_info_div').remove();
  296. form_row_added=false;
  297. }
  298. var self=$(this);
  299. var self_tr=self.closest('.single_doc_item');
  300. var req_id=self.data('id');
  301. form_row_added=true;
  302. self_tr.after(
  303. "<div class='open_department_info_div'><div class='open_document_info_div_inner'></div></div>"
  304. );
  305. fetch_sub_content(
  306. '.open_document_info_div_inner',
  307. "{{ route('sub-content', ['name'=>'upload_document_required']) }}?req_id="+req_id
  308. );
  309. });
  310. $('.delete_doc_required').on('click', function(){
  311. var id = $(this).attr("data-id");
  312. var form_data={
  313. _token: "{{ csrf_token() }}",
  314. delete_id: id,
  315. }
  316. swal({
  317. title: "Are you sure?",
  318. text: "You will not be able to recover this data!",
  319. type: "warning",
  320. showCancelButton: true,
  321. confirmButtonClass: "btn-danger",
  322. cancelButtonClass: "btn-info",
  323. confirmButtonText: "Yes, delete!",
  324. cancelButtonText: "No, cancel!",
  325. }, function(isConfirm){
  326. if(isConfirm){
  327. $.post("{{ route('ajax-post', ['name'=>'delete_doc_required']) }}",form_data
  328. ).done(function(res){
  329. pop_up_msg(res.msg);
  330. fetch_sub_content(
  331. '#doc_required_load',
  332. "{{ route('sub-content', ['name'=>'document_required_load','id'=>$proposal_details->id]) }}"
  333. );
  334. }).fail(function(err){
  335. pop_up_msg(err_msg(err), 'error');
  336. });
  337. }
  338. });
  339. });
  340. });
  341. </script>