Dashboard sipadu mbip
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

prenotice_index.blade.php 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
  2. @section('page_title', 'Kompaun')
  3. @section('sub_page_title', '')
  4. @section('name', $user->StaffDetail->full_name)
  5. @section('img_profile', $user->StaffDetail->profile_img)
  6. @section('content')
  7. <style type="text/css">
  8. select.form-control, select.form-control:focus, select.form-control:hover {
  9. border: 1px solid #ccc !important;
  10. height: auto !important;
  11. }
  12. .panel-group .panel {
  13. margin-bottom: 0;
  14. overflow: hidden;
  15. border-radius: 4px;
  16. }
  17. .panel-default {
  18. border-color: #ddd;
  19. }
  20. .panel-default>.panel-heading {
  21. color: #333;
  22. background-color: #f5f5f5;
  23. border-color: #ddd;
  24. }
  25. .panel-title {
  26. margin-top: 0;
  27. margin-bottom: 0;
  28. font-size: 16px;
  29. color: inherit;
  30. }
  31. .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
  32. padding: 8px 15px;
  33. line-height: 1.428571429;
  34. vertical-align: top;
  35. border-top: 1px solid #ddd;
  36. }
  37. .glyphicon { margin-right:10px; }
  38. .panel-body { padding:0px; }
  39. .panel-body table tr td { padding-left: 15px }
  40. .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
  41. .panel-body .table, .panel-body div {margin-bottom: 0px; }
  42. .r-padd { padding-right: 5%; }
  43. .active { color: #333333; }
  44. .active:hover { color: #333333; }
  45. th { font-weight: 600; }
  46. table.dataTable.nowrap th, table.dataTable.nowrap td {
  47. white-space: pre-line !important;
  48. }
  49. table.nowrap th, table.nowrap td {
  50. white-space: pre-line !important;
  51. }
  52. </style>
  53. <div class="inner-page">
  54. <div class="row">
  55. @include('main-dashboard.compound._part.menu_category')
  56. @include('main-dashboard.compound._part.filter_form_notice')
  57. </div>
  58. <div class="row">
  59. <div class="col-md-12">
  60. <div class="card">
  61. <div class="card-header">
  62. <div class="row">
  63. <div class="col-md-8">
  64. <h5>Senarai Notis Yang Telah Dikeluarkan</h5>
  65. </div>
  66. <div class="col-md-4">
  67. <!-- <div id="link" style="float:right"></div>
  68. <div id="link1" style="float:right"></div> -->
  69. </div>
  70. </div>
  71. </div>
  72. <div class="card-body">
  73. <div id="viewParkir">
  74. @include('main-dashboard.compound._part.compound_parkir')
  75. </div>
  76. <div id="viewPelbagai">
  77. <!-- @include('main-dashboard.compound._part.compound_pelbagai') -->
  78. <div class="col-lg-12 col-xl-12">
  79. <!-- Nav tabs -->
  80. <ul class="nav nav-tabs md-tabs" role="tablist">
  81. <li class="nav-item">
  82. <a class="nav-link active" data-toggle="tab" href="#default" role="tab">Tarikh Mula</a>
  83. <div class="slide"></div>
  84. </li>
  85. <li class="nav-item">
  86. <a class="nav-link" data-toggle="tab" href="#hari3" role="tab">3 Hari Sebelum</a>
  87. <div class="slide"></div>
  88. </li>
  89. <li class="nav-item">
  90. <a class="nav-link" data-toggle="tab" href="#hari7" role="tab">7 Hari Sebelum</a>
  91. <div class="slide"></div>
  92. </li>
  93. </ul>
  94. <!-- Tab panes -->
  95. <div class="tab-content card-block">
  96. <div class="tab-pane active" id="default" role="tabpanel">
  97. <div class="dt-responsive table-responsive">
  98. <table id="reportD" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
  99. <thead>
  100. <tr>
  101. <th>#</th>
  102. <th>Modul</th>
  103. <th>No Kpn</th>
  104. <th>Jenis</th>
  105. <th>Tarikh Masa</th>
  106. <th>Kesalahan</th>
  107. <th>Nric</th>
  108. <th>Nama</th>
  109. <th>PenguatKuasa</th>
  110. <th>Tindakan</th>
  111. </tr>
  112. </thead>
  113. <tfoot>
  114. <tr>
  115. <th>#</th>
  116. <th>Modul</th>
  117. <th>No Kpn</th>
  118. <th>Jenis</th>
  119. <th>Tarikh Masa</th>
  120. <th>Kesalahan</th>
  121. <th>Nric</th>
  122. <th>Nama</th>
  123. <th>PenguatKuasa</th>
  124. <th>Tindakan</th>
  125. </tr>
  126. </tfoot>
  127. </table>
  128. </div>
  129. </div>
  130. <div class="tab-pane" id="hari3" role="tabpanel">
  131. <div class="dt-responsive table-responsive">
  132. <table id="report3" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
  133. <thead>
  134. <tr>
  135. <th>#</th>
  136. <th>Modul</th>
  137. <th>No Kpn</th>
  138. <th>Jenis</th>
  139. <th>Tarikh Masa</th>
  140. <th>Kesalahan</th>
  141. <th>Nric</th>
  142. <th>Nama</th>
  143. <th>PenguatKuasa</th>
  144. <th>Tindakan</th>
  145. </tr>
  146. </thead>
  147. <tfoot>
  148. <tr>
  149. <th>#</th>
  150. <th>Modul</th>
  151. <th>No Kpn</th>
  152. <th>Jenis</th>
  153. <th>Tarikh Masa</th>
  154. <th>Kesalahan</th>
  155. <th>Nric</th>
  156. <th>Nama</th>
  157. <th>PenguatKuasa</th>
  158. <th>Tindakan</th>
  159. </tr>
  160. </tfoot>
  161. </table>
  162. </div>
  163. </div>
  164. <div class="tab-pane" id="hari7" role="tabpanel">
  165. <div class="dt-responsive table-responsive">
  166. <table id="report7" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
  167. <thead>
  168. <tr>
  169. <th>#</th>
  170. <th>Modul</th>
  171. <th>No Kpn</th>
  172. <th>Jenis</th>
  173. <th>Tarikh Masa</th>
  174. <th>Kesalahan</th>
  175. <th>Nric</th>
  176. <th>Nama</th>
  177. <th>PenguatKuasa</th>
  178. <th>Tindakan</th>
  179. </tr>
  180. </thead>
  181. <tfoot>
  182. <tr>
  183. <th>#</th>
  184. <th>Modul</th>
  185. <th>No Kpn</th>
  186. <th>Jenis</th>
  187. <th>Tarikh Masa</th>
  188. <th>Kesalahan</th>
  189. <th>Nric</th>
  190. <th>Nama</th>
  191. <th>PenguatKuasa</th>
  192. <th>Tindakan</th>
  193. </tr>
  194. </tfoot>
  195. </table>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <div class="modal fade" id="kemaskiniC" tabindex="-1" role="dialog">
  206. <div class="modal-dialog" role="document">
  207. <div class="modal-content">
  208. <form class="form-horizontal" id="updateSt">
  209. <div class="modal-header">
  210. <h5 class="modal-title">Kemaskini Status Kompaun</h5>
  211. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  212. <span aria-hidden="true">&times;</span>
  213. </button>
  214. </div>
  215. <div class="modal-body">
  216. <input type="hidden" name="id" id="id" value="" required/>
  217. <input type="hidden" name="current_id" id="current_id" value="{{ $user->_id }}" required/>
  218. <div class="form-group">
  219. <label class="col-sm-6 control-label"><b>Status</b></label>
  220. <div class="col-sm-12">
  221. <select class="form-control" name="status" required>
  222. <option value="Berbayar">Selesai</option>
  223. <option value="Batal">Batal</option>
  224. </select>
  225. </div>
  226. </div>
  227. <div class="form-group">
  228. <label class="col-sm-6 control-label"><b>Catatan <code>*</code></b></label>
  229. <div class="col-sm-12">
  230. <textarea class="form-control" name="remark" placeholder="-"></textarea>
  231. </div>
  232. </div>
  233. <!-- <div class="form-group">
  234. <label class="col-sm-6 control-label"><b>Jumlah Dibayar <code>*</code></b></label>
  235. <div class="col-sm-12">
  236. <input type="text" class="form-control autonumber" name="amount" data-v-min="0.00" data-v-max="99999.00"placeholder="0.00" required/>
  237. </div>
  238. </div>
  239. <div class="form-group">
  240. <label class="col-sm-6 control-label"><b>Amaun Tunggakan</b> <code>*</code></label>
  241. <div class="col-sm-12">
  242. <input type="text" class="form-control autonumber" name="tunggakan" data-v-min="0.00" data-v-max="99999.00" placeholder="0.00" required/>
  243. <code>Sekiranya tiada amaun tunggakan, sila letak 0. Amaun tunggakan ini akan diguna untuk laporan</code>
  244. </div>
  245. </div> -->
  246. </div>
  247. <div class="modal-footer">
  248. <button type="button" class="btn btn-sm btn-secondary mobtn" data-dismiss="modal">Close</button>
  249. <button id="submit" class="btn btn-sm btn-primary waves-effect waves-light">KEMASKINI</button>
  250. </div>
  251. </form>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. @endsection
  257. @section('external_js')
  258. <script type="text/javascript">
  259. var SITEURL = '{{URL::to('')}}';
  260. var tableP1, tableP3, tableP7;
  261. var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}";
  262. $('#viewParkir').hide(); $('#link').hide();
  263. $('#viewPelbagai').hide(); $('#link1').hide();
  264. </script>
  265. <script type="text/javascript" src="{{ asset('js/dataParkir.js') }}"></script>
  266. <script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script>
  267. <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
  268. <script type="text/javascript">
  269. $('#tapis').on('click', function (e) {
  270. e.preventDefault();
  271. $('#link').hide(); $('#link1').hide();
  272. var form = $("#filter_form")[0];
  273. if(form.checkValidity() === false) {
  274. e.stopPropagation();
  275. var isValid = form.reportValidity();
  276. }else {
  277. $('#viewPelbagai').hide();
  278. $('#viewParkir').hide();
  279. console.log("kpd checked = " + $('#check_kpd').prop("checked"));
  280. if($('#check_kpd').prop("checked") == false){
  281. $('#kpd').val('');
  282. }
  283. if($('#check_date').prop("checked") == false){
  284. $('#start_date').val('');
  285. $('#end_date').val('');
  286. }
  287. if($('#checkPlateNo').prop("checked") == false){
  288. $('#plate_no').val('');
  289. }
  290. if($('#checkCompanyNo').prop("checked") == false){
  291. $('#company_no').val('');
  292. }
  293. if($('#checkNric').prop("checked") == false){
  294. $('#nric').val('');
  295. }
  296. if($('#checkLicense').prop("checked") == false){
  297. $('#license').val('');
  298. }
  299. if($('#checkName').prop("checked") == false){
  300. $('#nameP').val('');
  301. }
  302. if($('#checkCompanyName').prop("checked") == false){
  303. $('#company_name').val('');
  304. }
  305. // Sumbit Search
  306. var form_data = $('#filter_form').serialize();
  307. if($('#type_C').val() == 'Notis_NPPM'){
  308. queryString2 = '?'+form_data;
  309. $('#viewPelbagai').show();
  310. $('#viewParkir').hide();
  311. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  312. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  313. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  314. }else if($('#type_C').val() == "Notis_NMH"){
  315. queryString2 = '?'+form_data;
  316. $('#viewPelbagai').show();
  317. $('#viewParkir').hide();
  318. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  319. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  320. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  321. }
  322. else if($('#type_C').val() == "Notis_NHN"){
  323. queryString2 = '?'+form_data;
  324. $('#viewPelbagai').show();
  325. $('#viewParkir').hide();
  326. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  327. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  328. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  329. }
  330. else if($('#type_C').val() == "Notis_NKG"){
  331. queryString2 = '?'+form_data;
  332. $('#viewPelbagai').show();
  333. $('#viewParkir').hide();
  334. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  335. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  336. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  337. }
  338. else if($('#type_C').val() == "Notis_PA"){
  339. queryString2 = '?'+form_data;
  340. $('#viewPelbagai').show();
  341. $('#viewParkir').hide();
  342. console.log('day 0' + queryString2);
  343. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  344. console.log('day 3' + queryString2);
  345. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  346. console.log('day 7' + queryString2);
  347. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  348. }
  349. console.log(SITEURL +'/api/list/compound'+ queryString1);
  350. console.log(SITEURL +'/api/list/compound'+ queryString2);
  351. }
  352. return false;
  353. });
  354. $('#submit').on('click', function (e) {
  355. e.preventDefault();
  356. var form = $("#updateSt")[0];
  357. if(form.checkValidity() === false) {
  358. e.stopPropagation();
  359. var isValid = form.reportValidity();
  360. }else {
  361. var input = prompt("Adakah anda pasti kemaskini status kompaun ini? \nTaip 'yes' untuk teruskan", "");
  362. if (input == "yes") {
  363. var form_data = $('#updateSt').serialize();
  364. // alert(form_data);
  365. $.ajax({
  366. type: "POST",
  367. url: "{{ url('/api/update/notice/via-dashboard') }}",
  368. data: form_data,
  369. success:function(data){
  370. if(data['success'] == true){
  371. if($('#type_C').val() == 'Notis_NPPM'){
  372. $('#viewPelbagai').show();
  373. $('#viewParkir').hide();
  374. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  375. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  376. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  377. $('#kemaskiniC').modal('hide');
  378. }else if($('#type_C').val() == "Notis_NMH"){
  379. $('#viewPelbagai').show();
  380. $('#viewParkir').hide();
  381. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  382. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  383. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  384. $('#kemaskiniC').modal('hide');
  385. }else if($('#type_C').val() == "Notis_NHN"){
  386. $('#viewPelbagai').show();
  387. $('#viewParkir').hide();
  388. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  389. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  390. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  391. $('#kemaskiniC').modal('hide');
  392. }else if($('#type_C').val() == "Notis_NKG"){
  393. $('#viewPelbagai').show();
  394. $('#viewParkir').hide();
  395. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  396. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  397. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  398. $('#kemaskiniC').modal('hide');
  399. }else if($('#type_C').val() == "Notis_PA"){
  400. $('#viewPelbagai').show();
  401. $('#viewParkir').hide();
  402. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  403. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  404. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  405. $('#kemaskiniC').modal('hide');
  406. }
  407. }else if(data['success'] == false){
  408. alert(response.data.message);
  409. $('#kemaskiniC').modal('hide');
  410. }
  411. },
  412. error: function (xhr, ajaxOptions, thrownError) {
  413. console.log(thrownError);
  414. // swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
  415. }
  416. });
  417. }else{
  418. alert('Kemaskini status dibatalkan');
  419. $('#kemaskiniC').modal('hide');
  420. }
  421. }
  422. });
  423. function getDetail(id) {
  424. $('#datePay').hide();
  425. $('#id').val(id);
  426. if($('#type_C').val() == 'Parkir'){
  427. $('#datePay').hide();
  428. $('#tarikh_bayar').prop('required', false);
  429. }else {
  430. $('#datePay').show();
  431. $('#tarikh_bayar').prop('required', true);
  432. }
  433. $('#kemaskiniC').modal({
  434. show: true
  435. })
  436. };
  437. </script>
  438. @endsection