Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prenotice_index.blade.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  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')
  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="Belum Bayar">Belum Bayar</option>
  223. <option value="Berbayar">Berbayar</option>
  224. <option value="Batal">Batal</option>
  225. </select>
  226. </div>
  227. </div>
  228. <div class="form-group">
  229. <label class="col-sm-6 control-label"><b>Catatan <code>*</code></b></label>
  230. <div class="col-sm-12">
  231. <textarea class="form-control" name="remark"></textarea>
  232. </div>
  233. </div>
  234. <div class="form-group">
  235. <label class="col-sm-6 control-label"><b>Jumlah Dibayar <code>*</code></b></label>
  236. <div class="col-sm-12">
  237. <input type="text" class="form-control autonumber" name="amount" data-v-min="0.00" data-v-max="99999.00"placeholder="0.00" required/>
  238. </div>
  239. </div>
  240. <div class="form-group">
  241. <label class="col-sm-6 control-label"><b>Amaun Tunggakan</b> <code>*</code></label>
  242. <div class="col-sm-12">
  243. <input type="text" class="form-control autonumber" name="tunggakan" data-v-min="0.00" data-v-max="99999.00" placeholder="0.00" required/>
  244. <code>Sekiranya tiada amaun tunggakan, sila letak 0. Amaun tunggakan ini akan diguna untuk laporan</code>
  245. </div>
  246. </div>
  247. </div>
  248. <div class="modal-footer">
  249. <button type="button" class="btn btn-sm btn-secondary mobtn" data-dismiss="modal">Close</button>
  250. <button id="submit" class="btn btn-sm btn-primary waves-effect waves-light">KEMASKINI</button>
  251. </div>
  252. </form>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. @endsection
  258. @section('external_js')
  259. <script type="text/javascript">
  260. var SITEURL = '{{URL::to('')}}';
  261. var tableP1, tableP3, tableP7;
  262. var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}";
  263. $('#viewParkir').hide(); $('#link').hide();
  264. $('#viewPelbagai').hide(); $('#link1').hide();
  265. </script>
  266. <script type="text/javascript" src="{{ asset('js/dataParkir.js') }}"></script>
  267. <script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script>
  268. <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
  269. <script type="text/javascript">
  270. $('#tapis').on('click', function (e) {
  271. e.preventDefault();
  272. $('#link').hide(); $('#link1').hide();
  273. var form = $("#filter_form")[0];
  274. if(form.checkValidity() === false) {
  275. e.stopPropagation();
  276. var isValid = form.reportValidity();
  277. }else {
  278. $('#viewPelbagai').hide();
  279. $('#viewParkir').hide();
  280. console.log("kpd checked = " + $('#check_kpd').prop("checked"));
  281. if($('#check_kpd').prop("checked") == false){
  282. $('#kpd').val('');
  283. }
  284. if($('#check_date').prop("checked") == false){
  285. $('#start_date').val('');
  286. $('#end_date').val('');
  287. }
  288. if($('#checkPlateNo').prop("checked") == false){
  289. $('#plate_no').val('');
  290. }
  291. if($('#checkCompanyNo').prop("checked") == false){
  292. $('#company_no').val('');
  293. }
  294. if($('#checkNric').prop("checked") == false){
  295. $('#nric').val('');
  296. }
  297. if($('#checkLicense').prop("checked") == false){
  298. $('#license').val('');
  299. }
  300. if($('#checkName').prop("checked") == false){
  301. $('#nameP').val('');
  302. }
  303. if($('#checkCompanyName').prop("checked") == false){
  304. $('#company_name').val('');
  305. }
  306. // Sumbit Search
  307. var form_data = $('#filter_form').serialize();
  308. if($('#type_C').val() == 'Parkir'){
  309. queryString1 = '?'+form_data;
  310. $('#viewPelbagai').hide();
  311. $('#viewParkir').show();
  312. tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
  313. }else if($('#type_C').val() == "Pelbagai_JPB"){
  314. queryString2 = '?'+form_data;
  315. $('#viewPelbagai').show();
  316. $('#viewParkir').hide();
  317. console.log('day 0' + queryString2);
  318. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  319. console.log('day 3' + queryString2);
  320. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  321. console.log('day 7' + queryString2);
  322. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  323. }
  324. else if($('#type_C').val() == "Pelbagai_KT"){
  325. queryString2 = '?'+form_data;
  326. $('#viewPelbagai').show();
  327. $('#viewParkir').hide();
  328. console.log('day 0' + queryString2);
  329. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  330. console.log('day 3' + queryString2);
  331. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  332. console.log('day 7' + queryString2);
  333. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  334. }
  335. else if($('#type_C').val() == "Pelbagai_PA"){
  336. queryString2 = '?'+form_data;
  337. $('#viewPelbagai').show();
  338. $('#viewParkir').hide();
  339. console.log('day 0' + queryString2);
  340. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  341. console.log('day 3' + queryString2);
  342. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  343. console.log('day 7' + queryString2);
  344. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  345. }
  346. else if($('#type_C').val() == "Pelbagai_LESEN"){
  347. queryString2 = '?'+form_data;
  348. $('#viewPelbagai').show();
  349. $('#viewParkir').hide();
  350. console.log('day 0' + queryString2);
  351. tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  352. console.log('day 3' + queryString2);
  353. tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  354. console.log('day 7' + queryString2);
  355. tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  356. }
  357. console.log(SITEURL +'/api/list/compound'+ queryString1);
  358. console.log(SITEURL +'/api/list/compound'+ queryString2);
  359. }
  360. return false;
  361. });
  362. $('#submit').on('click', function (e) {
  363. e.preventDefault();
  364. var form = $("#updateSt")[0];
  365. if(form.checkValidity() === false) {
  366. e.stopPropagation();
  367. var isValid = form.reportValidity();
  368. }else {
  369. var input = prompt("Adakah anda pasti kemaskini status kompaun ini? \nTaip 'yes' untuk teruskan", "");
  370. if (input == "yes") {
  371. var form_data = $('#updateSt').serialize();
  372. // alert(form_data);
  373. $.ajax({
  374. type: "POST",
  375. url: "{{ url('/api/update/compound/via-dashboard') }}",
  376. data: form_data,
  377. success:function(data){
  378. if(data['success'] == true){
  379. if($('#type_C').val() == 'Parkir'){
  380. $('#viewPelbagai').hide();
  381. $('#viewParkir').show();
  382. tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
  383. $('#kemaskiniC').modal('hide');
  384. }else if($('#type_C').val() == "Pelbagai"){
  385. $('#viewPelbagai').show();
  386. $('#viewParkir').hide();
  387. tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
  388. $('#kemaskiniC').modal('hide');
  389. }
  390. }else if(data['success'] == false){
  391. alert(response.data.message);
  392. $('#kemaskiniC').modal('hide');
  393. }
  394. },
  395. error: function (xhr, ajaxOptions, thrownError) {
  396. console.log(thrownError);
  397. // swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
  398. }
  399. });
  400. }else{
  401. alert('Kemaskini status dibatalkan');
  402. $('#kemaskiniC').modal('hide');
  403. }
  404. }
  405. });
  406. function getDetail(id) {
  407. $('#datePay').hide();
  408. $('#id').val(id);
  409. if($('#type_C').val() == 'Parkir'){
  410. $('#datePay').hide();
  411. $('#tarikh_bayar').prop('required', false);
  412. }else {
  413. $('#datePay').show();
  414. $('#tarikh_bayar').prop('required', true);
  415. }
  416. $('#kemaskiniC').modal({
  417. show: true
  418. })
  419. };
  420. </script>
  421. @endsection