您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

view_wo.blade.php 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. @extends('customer-service.layout.master')
  2. @section('ptitle','Customer Service')
  3. @section('page_title', 'Dashboard')
  4. @section('subpage', 'Graph & Summary Report')
  5. @section('img_profile', asset($user->StaffDetail->user_pic))
  6. @section('login_name', $user->StaffDetail->name )
  7. @section('last_login', $user->last_login_at )
  8. @section('content')
  9. <style>
  10. .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #EA5730 !important; }
  11. .ui-widget-content .bRed { color: #fff !important; }
  12. .ui-tabs .ui-tabs-nav li a { color: #636363 !important; }
  13. .ui-tabs .ui-tabs-nav li a:hover { color: #212121 !important; }
  14. .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #2E6B9B !important; }
  15. .ui-widget-content a { color: #fff; }
  16. .dt-buttons { background: -webkit-linear-gradient(top, #F8F8F8 0%, #EFEFEF 100%); }
  17. .icos-download { padding-top: 0px; }
  18. .buttons-excel {
  19. padding: 7px 12px;
  20. display: block;
  21. color: #808080;
  22. font-size: 11px;
  23. }
  24. </style>
  25. <!-- Table work order -->
  26. <div class="widget">
  27. <div class="whead"><h6>Important Note</h6></div>
  28. <div class="formRow cussPayment">
  29. <div class="grid-12">
  30. <label style="font-size: 14px;">To create the <b>Appointment Date</b> for customer in <b>Success Non Prelaid</b>, just click the <b>Button</b> color <b>Blue</b></label>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="widget leftTabs tableTabs">
  35. <div class="whead"><h6>Work Order's Data Table</h6></div>
  36. <div class="cuss shownpars responsive">
  37. <div class="tabs">
  38. <ul>
  39. <li><a href="#nwo">Pending Contractor <small style="color:#B35D7E">({{ $pc }})</small></a></li>
  40. <li><a href="#pps">Pending Non Prelaid <small style="color:#B35D7E">({{ $pp }})</small></a></li>
  41. <li><a href="#sps">Success Non Prelaid <small style="color:#B35D7E">({{ $sp }})</small></a></li>
  42. <li><a href="#pending">Pending Installer <small style="color:#B35D7E">({{ $pi }})</small></a></li>
  43. <li><a href="#resc">Reschedule <small style="color:#B35D7E">({{ $rs }})</small></a></li>
  44. <li><a href="#suspend">Suspend <small style="color:#B35D7E">({{ $ss }})</small></a></li>
  45. <li><a href="#completed">Completed <small style="color:#B35D7E">({{ $cm }})</small></a></li>
  46. <li><a href="#cancel">Cancelled <small style="color:#B35D7E">({{$cance}})</small></a></li>
  47. </ul>
  48. <div id="nwo">
  49. <table id="cont" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  50. <thead>
  51. <tr>
  52. <th>#</th>
  53. <th width="40">Service</th>
  54. <th>Category</th>
  55. <th width="40">W/O</th>
  56. <th width="60">Cust.Name</th>
  57. <th width="100">Contact No.</th>
  58. <th width="60">Unit No.</th>
  59. <th>Building</th>
  60. <th>City</th>
  61. <th>Package</th>
  62. <th>Contractor</th>
  63. <th>Installer</th>
  64. <th>Date</th>
  65. <th width="60">Time</th>
  66. <th>Status</th>
  67. <th width="120">Actions</th>
  68. </tr>
  69. </thead>
  70. </table>
  71. </div>
  72. <div id="pps">
  73. <table id="pnon" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  74. <thead>
  75. <tr>
  76. <th>#</th>
  77. <th width="40">Service</th>
  78. <th>Category</th>
  79. <th width="40">W/O</th>
  80. <th width="60">Cust.Name</th>
  81. <th width="100">Contact No.</th>
  82. <th>Unit No.</th>
  83. <th>Building</th>
  84. <th>City</th>
  85. <th>Package</th>
  86. <th>Contractor</th>
  87. <th>Installer</th>
  88. <th>Date</th>
  89. <th width="60">Time</th>
  90. <th>Status</th>
  91. <th width="100">Actions</th>
  92. </tr>
  93. </thead>
  94. </table>
  95. </div>
  96. <div id="sps">
  97. <table id="snon" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  98. <thead>
  99. <tr>
  100. <th>#</th>
  101. <th width="40">Service</th>
  102. <th>Category</th>
  103. <th width="40">W/O</th>
  104. <th width="60">Cust.Name</th>
  105. <th width="100">Contact No.</th>
  106. <th width="60">Unit No.</th>
  107. <th>Building</th>
  108. <th>City</th>
  109. <th>Package</th>
  110. <th>Contractor</th>
  111. <th>Installer</th>
  112. <th>Date</th>
  113. <th width="60">Time</th>
  114. <th>Status</th>
  115. <th width="120">Actions</th>
  116. </tr>
  117. </thead>
  118. </table>
  119. </div>
  120. <div id="pending">
  121. <table id="pinst" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  122. <thead>
  123. <tr>
  124. <th>#</th>
  125. <th width="40">Service</th>
  126. <th>Category</th>
  127. <th width="40">W/O</th>
  128. <th width="60">Cust.Name</th>
  129. <th width="100">Contact No.</th>
  130. <th width="60">Unit No.</th>
  131. <th>Building</th>
  132. <th>City</th>
  133. <th>Package</th>
  134. <th>Contractor</th>
  135. <th>Installer</th>
  136. <th>Date</th>
  137. <th width="60">Time</th>
  138. <th>Status</th>
  139. <th width="120">Actions</th>
  140. </tr>
  141. </thead>
  142. </table>
  143. </div>
  144. <div id="resc">
  145. <table id="sche" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  146. <thead>
  147. <tr>
  148. <th>#</th>
  149. <th width="40">Service</th>
  150. <th>Category</th>
  151. <th width="40">W/O</th>
  152. <th width="60">Cust.Name</th>
  153. <th width="100">Contact No.</th>
  154. <th width="60">Unit No.</th>
  155. <th>Building</th>
  156. <th>City</th>
  157. <th>Package</th>
  158. <th>Contractor</th>
  159. <th>Installer</th>
  160. <th>Date</th>
  161. <th width="60">Time</th>
  162. <th>Installer's Remark</th>
  163. <th width="100">Actions</th>
  164. </tr>
  165. </thead>
  166. </table>
  167. </div>
  168. <div id="suspend">
  169. <table id="susp" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  170. <thead>
  171. <tr>
  172. <th>#</th>
  173. <th width="40">Service</th>
  174. <th>Category</th>
  175. <th width="40">W/O</th>
  176. <th width="60">Cust.Name</th>
  177. <th width="100">Contact No.</th>
  178. <th width="60">Unit No.</th>
  179. <th>Building</th>
  180. <th>City</th>
  181. <th>Package</th>
  182. <th>Contractor</th>
  183. <th>Installer</th>
  184. <th>Date</th>
  185. <th width="60">Time</th>
  186. <th>Installer's Remark</th>
  187. <th width="100">Actions</th>
  188. </tr>
  189. </thead>
  190. </table>
  191. </div>
  192. <div id="completed">
  193. <table id="comp" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  194. <thead>
  195. <tr>
  196. <th>#</th>
  197. <th width="40">Service</th>
  198. <th>Category</th>
  199. <th width="40">W/O</th>
  200. <th width="60">Cust.Name</th>
  201. <th width="100">Contact No.</th>
  202. <th width="60">Unit No.</th>
  203. <th>Building</th>
  204. <th>City</th>
  205. <th>Package</th>
  206. <th>Contractor</th>
  207. <th>Installer</th>
  208. <th>Date</th>
  209. <th width="60">Time</th>
  210. <th>Status</th>
  211. <th>Docket</th>
  212. <th width="40">Actions</th>
  213. </tr>
  214. </thead>
  215. </table>
  216. </div>
  217. <div id="cancel">
  218. <table id="canc" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  219. <thead>
  220. <tr>
  221. <th>#</th>
  222. <th width="40">Service</th>
  223. <th>Category</th>
  224. <th width="40">W/O</th>
  225. <th width="60">Cust.Name</th>
  226. <th width="100">Contact No.</th>
  227. <th width="60">Unit No.</th>
  228. <th>Building</th>
  229. <th>City</th>
  230. <th>Package</th>
  231. <th>Contractor</th>
  232. <th>Installer</th>
  233. <th>Date</th>
  234. <th width="60">Time</th>
  235. <th>Status</th>
  236. <th width="100">Actions</th>
  237. </tr>
  238. </thead>
  239. </table>
  240. </div>
  241. </div>
  242. </div>
  243. <div class="dialog-delete" title="Delete Work Order">
  244. <p id="inner-delete"></p>
  245. </div>
  246. </div>
  247. @endsection
  248. @section('external_js')
  249. <script>
  250. function deleteA(cid,wo) {
  251. var cid = cid;
  252. var wo = wo;
  253. $('.dialog-delete').attr('data-id' , cid);
  254. document.getElementById("inner-delete").innerHTML = "<p>Are you sure want to delete this W/O ( " + wo + " )?</p>";
  255. $('.dialog-delete').dialog('open');
  256. return false;
  257. };
  258. //===== Modal =====//
  259. $('.dialog-delete').dialog({
  260. autoOpen: false,
  261. width: 400,
  262. modal: true,
  263. buttons: {
  264. "Yes!": function () {
  265. var id = $(this).data('id');
  266. // window.alert(email);
  267. $.ajax({
  268. type: "POST",
  269. url: "{{ url('/customer-service/delete-work-order') }}",
  270. // "_token": "{{ csrf_token() }}",
  271. data: { "_token": "{{ csrf_token() }}", id: id },
  272. success:function(data)
  273. {
  274. if(data == "true"){
  275. window.location.reload();
  276. }else if(data == "false"){
  277. alert("ERROR!! Cant Delete W/O !");
  278. }
  279. }
  280. });
  281. },
  282. "Cancel": function () {
  283. $(this).dialog("close");
  284. $('.dialog-delete').removeAttr('data-id');
  285. }
  286. }
  287. });
  288. $(document).ready(function(){
  289. var origin = window.location.origin;
  290. var positionRoles = '{{ $user->StaffDetail->position }}';
  291. //===== Dynamic table toolbars =====//
  292. $('#dyn1 .tOptions').click(function () {
  293. $('#dyn .tablePars').slideToggle(200);
  294. });
  295. $('.tOptions').click(function () {
  296. $(this).toggleClass("act");
  297. });
  298. //======= Filter data table ========//
  299. var table1 = $('#cont').DataTable({
  300. "bJQueryUI": false,
  301. "bAutoWidth": true,
  302. "bSort": false,
  303. "sPaginationType": "full_numbers",
  304. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  305. "oLanguage": {
  306. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  307. },
  308. "ordering": false,
  309. "serverSide": true,
  310. "processing": true,
  311. "ajax": "{{ url('/customer-service/get-all-pending-contractor/null/null/null') }}",
  312. "columns": [
  313. { "data": "formT","name": "formT"},
  314. { "data": "service","name": "service"},
  315. { "data": "category", "name": "category"},
  316. { "data": "wo","name": "wo"},
  317. { "data": "name","name": "name"},
  318. { "data": "phone","name": "phone"},
  319. { "data": "unit","name": "unit"},
  320. { "data": "building","name": "building"},
  321. { "data": "city","name": "city"},
  322. { "data": "package", "name": "package"},
  323. { "data": "contractor","name": "contractor"},
  324. { "data": "installer","name": "installer"},
  325. { "data": "date","name": "date"},
  326. { "data": "time","name": "time"},
  327. { "data": "status","name": "status"},
  328. { "data": "action","name": "action"},
  329. ],
  330. "columnDefs": [
  331. {
  332. "render": function ( data, type, row ) {
  333. if (data.indexOf("New/") >= 0) {
  334. var split = data.split('/');
  335. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  336. }else {
  337. return data;
  338. }
  339. },
  340. "targets": 0
  341. },
  342. {
  343. "width":"60px",
  344. "targets": 3
  345. },
  346. {
  347. "render": function ( data, type, row ) {
  348. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  349. var link2 = "{{ url('/customer-service/work-order/reschedule') }}"+"/"+data;
  350. var link3 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  351. if(positionRoles == 'Customer Service'){
  352. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a> <a class="tablectrl_medium bRed tipS delModule" onclick="deleteA(\''+row.wo+'\',\'' + row.wo + '\', )" title="Delete W/O"><span class="iconb" data-icon="&#xe136;"></span></a>';
  353. }else {
  354. return '<a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  355. }
  356. },
  357. "targets": 15
  358. }
  359. ],
  360. });
  361. var table2 = $('#pnon').DataTable({
  362. "bJQueryUI": false,
  363. "bAutoWidth": true,
  364. "bSort": false,
  365. "sPaginationType": "full_numbers",
  366. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  367. "oLanguage": {
  368. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  369. },
  370. "ordering": false,
  371. "serverSide": true,
  372. "processing": true,
  373. "ajax": "{{ url('/customer-service/get-all-pending-non/null/null/null') }}",
  374. "columns": [
  375. { "data": "formT","name": "formT"},
  376. { "data": "service","name": "service"},
  377. { "data": "category", "name": "category"},
  378. { "data": "wo","name": "wo"},
  379. { "data": "name","name": "name"},
  380. { "data": "phone","name": "phone"},
  381. { "data": "unit","name": "unit"},
  382. { "data": "building","name": "building"},
  383. { "data": "city","name": "city"},
  384. { "data": "package", "name": "package"},
  385. { "data": "contractor","name": "contractor"},
  386. { "data": "installer","name": "installer"},
  387. { "data": "date","name": "date"},
  388. { "data": "time","name": "time"},
  389. { "data": "status","name": "status"},
  390. { "data": "action","name": "action"},
  391. ],
  392. "columnDefs": [
  393. {
  394. "render": function ( data, type, row ) {
  395. if (data.indexOf("New/") >= 0) {
  396. var split = data.split('/');
  397. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  398. }else {
  399. return data;
  400. }
  401. },
  402. "targets": 0
  403. },
  404. {
  405. "render": function ( data, type, row ) {
  406. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  407. var link2 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  408. if(positionRoles == 'Customer Service'){
  409. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link2+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  410. }else {
  411. return '<a target="_blank" href="'+link2+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  412. }
  413. },
  414. "targets": 15
  415. }
  416. ],
  417. });
  418. var table3 = $('#snon').DataTable({
  419. "bJQueryUI": false,
  420. "bAutoWidth": true,
  421. "bSort": false,
  422. "sPaginationType": "full_numbers",
  423. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  424. "oLanguage": {
  425. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  426. },
  427. "ordering": false,
  428. "serverSide": true,
  429. "processing": true,
  430. "ajax": "{{ url('/customer-service/get-all-success-non/null/null/null') }}",
  431. "columns": [
  432. { "data": "formT","name": "formT"},
  433. { "data": "service","name": "service"},
  434. { "data": "category", "name": "category"},
  435. { "data": "wo","name": "wo"},
  436. { "data": "name","name": "name"},
  437. { "data": "phone","name": "phone"},
  438. { "data": "unit","name": "unit"},
  439. { "data": "building","name": "building"},
  440. { "data": "city","name": "city"},
  441. { "data": "package", "name": "package"},
  442. { "data": "contractor","name": "contractor"},
  443. { "data": "installer","name": "installer"},
  444. { "data": "date","name": "date"},
  445. { "data": "time","name": "time"},
  446. { "data": "status","name": "status"},
  447. { "data": "action","name": "action"},
  448. ],
  449. "columnDefs": [
  450. {
  451. "render": function ( data, type, row ) {
  452. if (data.indexOf("New/") >= 0) {
  453. var split = data.split('/');
  454. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  455. }else {
  456. return data;
  457. }
  458. },
  459. "targets": 0
  460. },
  461. {
  462. "render": function ( data, type, row ) {
  463. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  464. var link2 = "{{ url('/customer-service/work-order/reschedule') }}"+"/"+data;
  465. var link3 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  466. if(positionRoles == 'Customer Service'){
  467. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  468. }else{
  469. return '<a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  470. }
  471. },
  472. "targets": 15
  473. }
  474. ],
  475. });
  476. var table4 = $('#pinst').DataTable({
  477. "bJQueryUI": false,
  478. "bAutoWidth": true,
  479. "bSort": false,
  480. "sPaginationType": "full_numbers",
  481. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  482. "oLanguage": {
  483. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  484. },
  485. "ordering": false,
  486. "serverSide": true,
  487. "processing": true,
  488. "ajax": "{{ url('/customer-service/get-all-pending-installer/null/null/null') }}",
  489. "columns": [
  490. { "data": "formT","name": "formT"},
  491. { "data": "service","name": "service"},
  492. { "data": "category", "name": "category"},
  493. { "data": "wo","name": "wo"},
  494. { "data": "name","name": "name"},
  495. { "data": "phone","name": "phone"},
  496. { "data": "unit","name": "unit"},
  497. { "data": "building","name": "building"},
  498. { "data": "city","name": "city"},
  499. { "data": "package", "name": "package"},
  500. { "data": "contractor","name": "contractor"},
  501. { "data": "installer","name": "installer"},
  502. { "data": "date","name": "date"},
  503. { "data": "time","name": "time"},
  504. { "data": "status","name": "status"},
  505. { "data": "action","name": "action"},
  506. ],
  507. "columnDefs": [
  508. {
  509. "render": function ( data, type, row ) {
  510. if (data.indexOf("New/") >= 0) {
  511. var split = data.split('/');
  512. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  513. }else {
  514. return data;
  515. }
  516. },
  517. "targets": 0
  518. },
  519. {
  520. "render": function ( data, type, row ) {
  521. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  522. var link2 = "{{ url('/customer-service/work-order/reschedule') }}"+"/"+data;
  523. var link3 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  524. if(positionRoles == 'Customer Service'){
  525. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  526. }else{
  527. return '<a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  528. }
  529. },
  530. "targets": 15
  531. }
  532. ],
  533. });
  534. var table5 = $('#sche').DataTable({
  535. "bJQueryUI": false,
  536. "bAutoWidth": true,
  537. "bSort": false,
  538. "sPaginationType": "full_numbers",
  539. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  540. "oLanguage": {
  541. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  542. },
  543. "ordering": false,
  544. "serverSide": true,
  545. "processing": true,
  546. "ajax": "{{ url('/customer-service/get-all-reschedule/null/null/null') }}",
  547. "columns": [
  548. { "data": "formT","name": "formT"},
  549. { "data": "service","name": "service"},
  550. { "data": "category", "name": "category"},
  551. { "data": "wo","name": "wo"},
  552. { "data": "name","name": "name"},
  553. { "data": "phone","name": "phone"},
  554. { "data": "unit","name": "unit"},
  555. { "data": "building","name": "building"},
  556. { "data": "city","name": "city"},
  557. { "data": "package", "name": "package"},
  558. { "data": "contractor","name": "contractor"},
  559. { "data": "installer","name": "installer"},
  560. { "data": "date","name": "date"},
  561. { "data": "time","name": "time"},
  562. { "data": "status","name": "status"},
  563. { "data": "action","name": "action"},
  564. ],
  565. "columnDefs": [
  566. {
  567. "render": function ( data, type, row ) {
  568. if (data.indexOf("New/") >= 0) {
  569. var split = data.split('/');
  570. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  571. }else {
  572. return data;
  573. }
  574. },
  575. "targets": 0
  576. },
  577. {
  578. "render": function ( data, type, row ) {
  579. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  580. var link2 = "{{ url('/customer-service/work-order/reschedule') }}"+"/"+data;
  581. var link3 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  582. if(positionRoles == 'Customer Service'){
  583. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  584. }else{
  585. return '<a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  586. }
  587. },
  588. "targets": 15
  589. }
  590. ],
  591. });
  592. var table6 = $('#susp').DataTable({
  593. "bJQueryUI": false,
  594. "bAutoWidth": true,
  595. "bSort": false,
  596. "sPaginationType": "full_numbers",
  597. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  598. "oLanguage": {
  599. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  600. },
  601. "ordering": false,
  602. "serverSide": true,
  603. "processing": true,
  604. "ajax": "{{ url('/customer-service/get-all-suspend/null/null/null') }}",
  605. "columns": [
  606. { "data": "formT","name": "formT"},
  607. { "data": "service","name": "service"},
  608. { "data": "category", "name": "category"},
  609. { "data": "wo","name": "wo"},
  610. { "data": "name","name": "name"},
  611. { "data": "phone","name": "phone"},
  612. { "data": "unit","name": "unit"},
  613. { "data": "building","name": "building"},
  614. { "data": "city","name": "city"},
  615. { "data": "package", "name": "package"},
  616. { "data": "contractor","name": "contractor"},
  617. { "data": "installer","name": "installer"},
  618. { "data": "date","name": "date"},
  619. { "data": "time","name": "time"},
  620. { "data": "status","name": "status"},
  621. { "data": "action","name": "action"},
  622. ],
  623. "columnDefs": [
  624. {
  625. "render": function ( data, type, row ) {
  626. if (data.indexOf("New/") >= 0) {
  627. var split = data.split('/');
  628. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  629. }else {
  630. return data;
  631. }
  632. },
  633. "targets": 0
  634. },
  635. {
  636. "render": function ( data, type, row ) {
  637. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  638. var link2 = "{{ url('/customer-service/work-order/reschedule') }}"+"/"+data;
  639. var link3 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  640. if(positionRoles == 'Customer Service'){
  641. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  642. }else{
  643. return '<a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  644. }
  645. },
  646. "targets": 15
  647. }
  648. ],
  649. });
  650. var table7 = $('#comp').DataTable({
  651. "bJQueryUI": false,
  652. "bAutoWidth": true,
  653. "bSort": false,
  654. "sPaginationType": "full_numbers",
  655. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  656. "oLanguage": {
  657. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  658. },
  659. "ordering": false,
  660. "serverSide": true,
  661. "processing": true,
  662. "ajax": "{{ url('/customer-service/get-all-completed/null/null/null') }}",
  663. "columns": [
  664. { "data": "formT","name": "formT"},
  665. { "data": "service","name": "service"},
  666. { "data": "category", "name": "category"},
  667. { "data": "wo","name": "wo"},
  668. { "data": "name","name": "name"},
  669. { "data": "phone","name": "phone"},
  670. { "data": "unit","name": "unit"},
  671. { "data": "building","name": "building"},
  672. { "data": "city","name": "city"},
  673. { "data": "package", "name": "package"},
  674. { "data": "contractor","name": "contractor"},
  675. { "data": "installer","name": "installer"},
  676. { "data": "date","name": "date"},
  677. { "data": "time","name": "time"},
  678. { "data": "status","name": "status"},
  679. { "data": "docket","name": "docket"},
  680. { "data": "action","name": "action"},
  681. ],
  682. "columnDefs": [
  683. {
  684. "render": function ( data, type, row ) {
  685. if (data.indexOf("New/") >= 0) {
  686. var split = data.split('/');
  687. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  688. }else {
  689. return data;
  690. }
  691. },
  692. "targets": 0
  693. },
  694. {
  695. "render": function ( data, type, row ) {
  696. var link = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  697. return '<a target="_blank" href="'+link+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  698. },
  699. "targets": 16
  700. }
  701. ],
  702. });
  703. var table6 = $('#canc').DataTable({
  704. "bJQueryUI": false,
  705. "bAutoWidth": true,
  706. "bSort": false,
  707. "sPaginationType": "full_numbers",
  708. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  709. "oLanguage": {
  710. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  711. },
  712. "ordering": false,
  713. "serverSide": true,
  714. "processing": true,
  715. "ajax": "{{ url('/customer-service/get-all-cancelled/null/null/null') }}",
  716. "columns": [
  717. { "data": "formT","name": "formT"},
  718. { "data": "service","name": "service"},
  719. { "data": "category", "name": "category"},
  720. { "data": "wo","name": "wo"},
  721. { "data": "name","name": "name"},
  722. { "data": "phone","name": "phone"},
  723. { "data": "unit","name": "unit"},
  724. { "data": "building","name": "building"},
  725. { "data": "city","name": "city"},
  726. { "data": "package", "name": "package"},
  727. { "data": "contractor","name": "contractor"},
  728. { "data": "installer","name": "installer"},
  729. { "data": "date","name": "date"},
  730. { "data": "time","name": "time"},
  731. { "data": "status","name": "status"},
  732. { "data": "action","name": "action"},
  733. ],
  734. "columnDefs": [
  735. {
  736. "render": function ( data, type, row ) {
  737. if (data.indexOf("New/") >= 0) {
  738. var split = data.split('/');
  739. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  740. }else {
  741. return data;
  742. }
  743. },
  744. "targets": 0
  745. },
  746. {
  747. "render": function ( data, type, row ) {
  748. var link1 = "{{ url('/customer-service/work-order/edit') }}"+"/"+data;
  749. var link2 = "{{ url('/customer-service/work-order/reschedule') }}"+"/"+data;
  750. var link3 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  751. if(positionRoles == 'Customer Service'){
  752. return '<a href="'+link1+'" class="tablectrl_medium bGreen tipS" original-title="Edit Detail W/O"><span class="iconb" data-icon=""></span></a> <a href="'+link2+'" class="tablectrl_medium bBlue tipS" original-title="Reassign/Change Datetime W/O"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  753. }else{
  754. return '<a target="_blank" href="'+link3+'" class="tablectrl_medium bGold tipS" original-title="View W/O"><span class="iconb" data-icon=""></span></a>';
  755. }
  756. },
  757. "targets": 15
  758. }
  759. ],
  760. });
  761. //===== Modal =====//
  762. // $('#fbyear,#fbmonth').change(function() {
  763. // var link1 = "{{ url('/customer-service/get-all-pending-contractor') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  764. // table1.ajax.url( link1 ).load();
  765. // var link2 = "{{ url('/customer-service/get-all-pending-non') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  766. // table2.ajax.url( link2 ).load();
  767. // var link3 = "{{ url('/customer-service/get-all-success-non') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  768. // table3.ajax.url( link3 ).load();
  769. // var link4 = "{{ url('/customer-service/get-all-pending-installer') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  770. // table4.ajax.url( link3 ).load();
  771. // var link5 = "{{ url('/customer-service/get-all-reschedule') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  772. // table5.ajax.url( link3 ).load();
  773. // var link6 = "{{ url('/customer-service/get-all-suspend') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  774. // table6.ajax.url( link3 ).load();
  775. // var link7 = "{{ url('/customer-service/get-all-completed') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
  776. // table7.ajax.url( link3 ).load();
  777. // });
  778. });
  779. </script>
  780. @endsection