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.

view_subscriber.blade.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. @extends('customer-service.layout.master')
  2. @section('ptitle','Customer Service')
  3. @section('page_title', 'Customers & Subscribers')
  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 a { color: #636363 !important; }
  11. .ui-tabs .ui-tabs-nav li a:hover { color: #212121 !important; }
  12. .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #2E6B9B !important; }
  13. .ui-widget-content a { color: #fff; }
  14. </style>
  15. <!-- <div class="widget grid12">
  16. <div class="whead"><h6>Search/Filter Submmition Form</h6></div>
  17. <div id="dyn1" class="responsive shownpars cuss">
  18. <div class="grid4">
  19. <div class="formRow">
  20. <div class="grid2">&nbsp;</div>
  21. <div class="grid4"><label><b>Primary Number<small style="color: red"> * </small>: </b></label><input type="text" name="phone1" id="phone1" required=""></div>
  22. <div class="grid4"><label><b>Secondary Number : </b></label><input type="text" name="phone2" id="phone2"></div>
  23. <div class="grid2">&nbsp;</div>
  24. </div>
  25. </div>
  26. <div class="grid4">
  27. <div class="formRow">
  28. <div class="grid2">&nbsp;</div>
  29. <div class="grid4"><label><b>Primary Number<small style="color: red"> * </small>: </b></label><input type="text" name="phone1" id="phone1" required=""></div>
  30. <div class="grid4"><label><b>Secondary Number : </b></label><input type="text" name="phone2" id="phone2"></div>
  31. <div class="grid2">&nbsp;</div>
  32. </div>
  33. </div>
  34. <div class="grid4">
  35. <div class="formRow">
  36. <div class="grid2">&nbsp;</div>
  37. <div class="grid4"><label><b>Primary Number<small style="color: red"> * </small>: </b></label><input type="text" name="phone1" id="phone1" required=""></div>
  38. <div class="grid4"><label><b>Secondary Number : </b></label><input type="text" name="phone2" id="phone2"></div>
  39. <div class="grid2">&nbsp;</div>
  40. </div>
  41. </div>
  42. </div>
  43. </div> -->
  44. <!-- Table dealer -->
  45. <div class="widget leftTabs tableTabs">
  46. <div class="whead"><h6>Subscriber's List ( Resident & Business )</h6></div>
  47. <div class="cuss shownpars">
  48. <div class="tabs">
  49. <ul>
  50. <li><a href="#recs">Rectifications <small style="color:#B35D7E">( {{ $rec }} )</small></a></li>
  51. <li><a href="#subs">Subscribers <small style="color:#B35D7E">( {{ $re }} )</small></a></li>
  52. <li><a href="#buss">Business <small style="color:#B35D7E">( {{ $bu }} )</small></a></li>
  53. </ul>
  54. <div id="recs">
  55. <table id="rectification" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  56. <thead>
  57. <tr>
  58. <th>#</th>
  59. <th>Submittion</th>
  60. <th>Type App.</th>
  61. <th>Cust.Name</th>
  62. <th>Contact No.</th>
  63. <th>Unit No.</th>
  64. <th>Building</th>
  65. <th>Street</th>
  66. <th>Postcode</th>
  67. <th>City</th>
  68. <th width="30">PDF</th>
  69. <th width="30">W/O</th>
  70. <th width="30">Docket</th>
  71. </tr>
  72. </thead>
  73. </table>
  74. </div>
  75. <div id="subs">
  76. <table id="residential" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  77. <thead>
  78. <tr>
  79. <th>#</th>
  80. <th>Submittion</th>
  81. <th>Type App.</th>
  82. <th>Cust.Name</th>
  83. <th>Contact No.</th>
  84. <th>Unit No.</th>
  85. <th>Building</th>
  86. <th>Street</th>
  87. <th>Postcode</th>
  88. <th>City</th>
  89. <th width="30">PDF</th>
  90. <th width="30">W/O</th>
  91. <th width="30">Docket</th>
  92. </tr>
  93. </thead>
  94. </table>
  95. </div>
  96. <div id="buss">
  97. <table id="business" cellpadding="0" cellspacing="0" border="0" width="100%" class="dTable tMedia">
  98. <thead>
  99. <tr>
  100. <th>#</th>
  101. <th>Submittion</th>
  102. <th>Type App.</th>
  103. <th>Cust.Name</th>
  104. <th>Contact No.</th>
  105. <th>Unit No.</th>
  106. <th>Building</th>
  107. <th>Street</th>
  108. <th>Postcode</th>
  109. <th>City</th>
  110. <th width="30">PDF</th>
  111. <th width="30">W/O</th>
  112. <th width="30">Docket</th>
  113. </tr>
  114. </thead>
  115. </table>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. @endsection
  121. @section('external_js')
  122. <script>
  123. $(document).ready(function(){
  124. var origin = window.location.origin;
  125. //===== Dynamic table toolbars =====//
  126. $('#dyn1 .tOptions').click(function () {
  127. $('#dyn .tablePars').slideToggle(200);
  128. });
  129. $('.tOptions').click(function () {
  130. $(this).toggleClass("act");
  131. });
  132. //======= Filter data table ========//
  133. var table1 = $('#rectification').DataTable({
  134. "bJQueryUI": false,
  135. "bAutoWidth": true,
  136. "bSort": false,
  137. "sPaginationType": "full_numbers",
  138. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  139. "oLanguage": {
  140. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  141. },
  142. "ordering": false,
  143. "serverSide": true,
  144. "processing": true,
  145. "ajax": "{{ url('/customer-service/get-all-rectification/null/null/null') }}",
  146. "columns": [
  147. { "data": "formT","name": "formT"},
  148. { "data": "submittion","name": "submittion"},
  149. { "data": "type","name": "type"},
  150. { "data": "name","name": "name"},
  151. { "data": "phone","name": "phone"},
  152. { "data": "unit","name": "unit"},
  153. { "data": "building","name": "building"},
  154. { "data": "street","name": "street"},
  155. { "data": "postcode", "name": "postcode"},
  156. { "data": "city","name": "city"},
  157. { "data": "action1","name": "action1"},
  158. { "data": "action2","name": "action2"},
  159. { "data": "action3","name": "action3"},
  160. ],
  161. "columnDefs": [
  162. {
  163. "render": function ( data, type, row ) {
  164. if (data.indexOf("New/") >= 0) {
  165. var split = data.split('/');
  166. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  167. }else {
  168. return data;
  169. }
  170. },
  171. "targets": 0
  172. },
  173. {
  174. "render": function ( data, type, row ) {
  175. if (data.indexOf("D/") >= 0) {
  176. var split = data.split('/');
  177. return '<small class="label label-purple">'+split[0]+'</small> &nbsp;'+split[1];
  178. }else {
  179. return data;
  180. }
  181. },
  182. "targets": 3
  183. },
  184. {
  185. "render": function ( data, type, row ) {
  186. if (data.indexOf("R/") >= 0) {
  187. var split = data.split('/');
  188. var link = "{{ url('/customer-service/residential/generate-pdf') }}"+"/"+split[1];
  189. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bPurple tipS" title="View Subscribers"><span class="iconb" data-icon=""></span></a>';
  190. }else if (data.indexOf("B/") >= 0){
  191. var split = data.split('/');
  192. var link = "{{ url('/customer-service/business/generate-pdf') }}"+"/"+split[1];
  193. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bPurple tipS" title="View Subscribers"><span class="iconb" data-icon=""></span></a>';
  194. }
  195. },
  196. "targets": 10
  197. },
  198. {
  199. "render": function ( data, type, row ) {
  200. if (data != 'null') {
  201. var link = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  202. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bGold tipS" title="View W/O"><span class="iconb" data-icon=""></span></a>';
  203. }else {
  204. return '';
  205. }
  206. },
  207. "targets": 11
  208. },
  209. {
  210. "render": function ( data, type, row ) {
  211. if (data != 'null') {
  212. var link = "{{ url('/customer-service/docket/generate-pdf') }}"+"/"+data;
  213. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bGreen tipS" title="View Docket PDF"><span class="iconb" data-icon=""></span></a>';
  214. }else {
  215. return '';
  216. }
  217. },
  218. "targets": 12
  219. }
  220. ],
  221. });
  222. var table2 = $('#residential').DataTable({
  223. "bJQueryUI": false,
  224. "bAutoWidth": true,
  225. "bSort": false,
  226. "sPaginationType": "full_numbers",
  227. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  228. "oLanguage": {
  229. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  230. },
  231. "ordering": false,
  232. "serverSide": true,
  233. "processing": true,
  234. "ajax": "{{ url('/customer-service/get-all-residential/null/null/null') }}",
  235. "columns": [
  236. { "data": "formT","name": "formT"},
  237. { "data": "submittion","name": "submittion"},
  238. { "data": "type","name": "type"},
  239. { "data": "name","name": "name"},
  240. { "data": "phone","name": "phone"},
  241. { "data": "unit","name": "unit"},
  242. { "data": "building","name": "building"},
  243. { "data": "street","name": "street"},
  244. { "data": "postcode", "name": "postcode"},
  245. { "data": "city","name": "city"},
  246. { "data": "action1","name": "action1"},
  247. { "data": "action2","name": "action2"},
  248. { "data": "action3","name": "action3"},
  249. ],
  250. "columnDefs": [
  251. {
  252. "render": function ( data, type, row ) {
  253. if (data.indexOf("New/") >= 0) {
  254. var split = data.split('/');
  255. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  256. }else {
  257. return data;
  258. }
  259. },
  260. "targets": 0
  261. },
  262. {
  263. "render": function ( data, type, row ) {
  264. if (data.indexOf("D/") >= 0) {
  265. var split = data.split('/');
  266. return '<small class="label label-purple">'+split[0]+'</small> &nbsp;'+split[1];
  267. }else {
  268. return data;
  269. }
  270. },
  271. "targets": 3
  272. },
  273. {
  274. "render": function ( data, type, row ) {
  275. if (data.indexOf("R/") >= 0) {
  276. var split = data.split('/');
  277. var link = "{{ url('/customer-service/residential/generate-pdf') }}"+"/"+split[1];
  278. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bPurple tipS" title="View Subscribers"><span class="iconb" data-icon=""></span></a>';
  279. }else if (data.indexOf("B/") >= 0){
  280. var link = "{{ url('/customer-service/business/generate-pdf') }}"+"/"+data;
  281. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bPurple tipS" title="View Subscribers"><span class="iconb" data-icon=""></span></a>';
  282. }
  283. },
  284. "targets": 10
  285. },
  286. {
  287. "render": function ( data, type, row ) {
  288. if (data != 'null') {
  289. var link = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  290. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bGold tipS" title="View W/O"><span class="iconb" data-icon=""></span></a>';
  291. }else {
  292. return '';
  293. }
  294. },
  295. "targets": 11
  296. },
  297. {
  298. "render": function ( data, type, row ) {
  299. if (data != 'null') {
  300. var link = "{{ url('/customer-service/docket/generate-pdf') }}"+"/"+data;
  301. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bGreen tipS" title="View Docket PDF"><span class="iconb" data-icon=""></span></a>';
  302. }else {
  303. return '';
  304. }
  305. },
  306. "targets": 12
  307. }
  308. ],
  309. });
  310. var table3 = $('#business').DataTable({
  311. "bJQueryUI": false,
  312. "bAutoWidth": true,
  313. "bSort": false,
  314. "sPaginationType": "full_numbers",
  315. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  316. "oLanguage": {
  317. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  318. },
  319. "ordering": false,
  320. "serverSide": true,
  321. "processing": true,
  322. "ajax": "{{ url('/customer-service/get-all-business/null/null/null') }}",
  323. "columns": [
  324. { "data": "formT","name": "formT"},
  325. { "data": "submittion","name": "submittion"},
  326. { "data": "type","name": "type"},
  327. { "data": "name","name": "name"},
  328. { "data": "phone","name": "phone"},
  329. { "data": "unit","name": "unit"},
  330. { "data": "building","name": "building"},
  331. { "data": "street","name": "street"},
  332. { "data": "postcode", "name": "postcode"},
  333. { "data": "city","name": "city"},
  334. { "data": "action1","name": "action1"},
  335. { "data": "action2","name": "action2"},
  336. { "data": "action3","name": "action3"},
  337. ],
  338. "columnDefs": [
  339. {
  340. "render": function ( data, type, row ) {
  341. if (data.indexOf("New/") >= 0) {
  342. var split = data.split('/');
  343. return '<small class="label label-warning">'+split[0]+'</small>&nbsp;'+split[1];
  344. }else {
  345. return data;
  346. }
  347. },
  348. "targets": 0
  349. },
  350. {
  351. "render": function ( data, type, row ) {
  352. if (data.indexOf("D/") >= 0) {
  353. var split = data.split('/');
  354. return '<small class="label label-purple">'+split[0]+'</small> &nbsp;'+split[1];
  355. }else {
  356. return data;
  357. }
  358. },
  359. "targets": 3
  360. },
  361. {
  362. "render": function ( data, type, row ) {
  363. if (data.indexOf("R/") >= 0) {
  364. var split = data.split('/');
  365. var link = "{{ url('/customer-service/residential/generate-pdf') }}"+"/"+split[1];
  366. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bPurple tipS" title="View Subscribers"><span class="iconb" data-icon=""></span></a>';
  367. }else if (data.indexOf("B/") >= 0){
  368. var split = data.split('/');
  369. var link = "{{ url('/customer-service/business/generate-pdf') }}"+"/"+split[1];
  370. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bPurple tipS" title="View Subscribers"><span class="iconb" data-icon=""></span></a>';
  371. }
  372. },
  373. "targets": 10
  374. },
  375. {
  376. "render": function ( data, type, row ) {
  377. if (data != 'null') {
  378. var link = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+data;
  379. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bGold tipS" title="View W/O"><span class="iconb" data-icon=""></span></a>';
  380. }else {
  381. return '';
  382. }
  383. },
  384. "targets": 11
  385. },
  386. {
  387. "render": function ( data, type, row ) {
  388. if (data != 'null') {
  389. var link = "{{ url('/customer-service/docket/generate-pdf') }}"+"/"+data;
  390. return '<a href="'+link+'" target="_blank" class="tablectrl_medium bGreen tipS" title="View Docket PDF"><span class="iconb" data-icon=""></span></a>';
  391. }else {
  392. return '';
  393. }
  394. },
  395. "targets": 12
  396. }
  397. ],
  398. });
  399. /*** Filter ***/
  400. $('#fbtype,#fbbuilding,#fbdealer').on('change', function() {
  401. var link1 = "{{ url('/customer-service/get-all-rectification') }}" +"/"+$('#fbtype').val()+"/"+$('#fbbuilding').val()+"/"+$('#fbdealer').val();
  402. table1.ajax.url( link1 ).load();
  403. var link2 = "{{ url('/customer-service/get-all-residential') }}" +"/"+$('#fbtype').val()+"/"+$('#fbbuilding').val()+"/"+$('#fbdealer').val();
  404. table2.ajax.url( link2 ).load();
  405. var link3 = "{{ url('/customer-service/get-all-business') }}" +"/"+$('#fbtype').val()+"/"+$('#fbbuilding').val()+"/"+$('#fbdealer').val();
  406. table2.ajax.url( link3 ).load();
  407. });
  408. });
  409. </script>
  410. @endsection