| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- @extends('customer-service.layout.master')
- @section('ptitle','Customer Service')
- @section('page_title', 'Dashboard')
- @section('subpage', 'Graph & Summary Report')
- @section('img_profile', asset($user->StaffDetail->user_pic))
- @section('login_name', $user->StaffDetail->name )
- @section('last_login', $user->last_login_at )
-
- @section('content')
- <style>
- .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #EA5730 !important; }
- .ui-widget-content .bRed { color: #fff !important; }
- .dt-buttons
- {
- background: -webkit-linear-gradient(top, #F8F8F8 0%, #EFEFEF 100%);
- }
- .icos-download
- {
- padding-top: 0px;
- }
- .buttons-excel
- {
- padding: 7px 12px;
- display: block;
- color: #808080;
- font-size: 11px;
- }
- </style>
- <!-- Table dealer -->
- <div class="fluid">
- <div class="widget grid12">
- <div class="whead"><h6>Docket's List</h6></div>
- <div id="dyn1" class="shownpars cuss responsive">
- <a class="tOptions" title="Options"><img src="{{ url('assets/img/icons/options') }}" alt="" /></a>
- <table id="agent" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia" width="100%">
- <thead>
- <tr>
- <th>#</th>
- <th>Docket</th>
- <th>W/O</th>
- <th>Nature Work</th>
- <th>Category</th>
- <th>Contractor</th>
- <th>Installer</th>
- <th>Building</th>
- <th>Contact No.</th>
- <th>Completed Date</th>
- <th>Rating</th>
- <th width="90">Actions</th>
- </tr>
- </thead>
- </table>
- </div>
-
- <div class="dialog-reset" title="Reset Docket">
- <p id="inner-reset"></p>
- </div>
- </div>
- </div>
- @endsection
-
- @section('external_js')
- <script>
- function reset(id,docket) {
- var id = id;
- var docket = docket;
-
- $('.dialog-reset').attr('data-id' , id);
- document.getElementById("inner-reset").innerHTML = "<p>Are you sure want to reset this docket ( " + docket + " )?</p>";
-
- $('.dialog-reset').dialog('open');
- return false;
- };
-
- //===== Modal =====//
- $('.dialog-reset').dialog({
- autoOpen: false,
- width: 400,
- modal: true,
- buttons: {
- "Yes!": function () {
- var id = $(this).data('id');
- // window.alert(email);
- $.ajax({
- type: "GET",
- url: "{{ url('/customer-service/reset-docket') }}",
- // "_token": "{{ csrf_token() }}",
- data: { "_token": "{{ csrf_token() }}", id: id },
- success:function(data)
- {
- if(data == "true"){
- window.location.reload();
- }else if(data == "false"){
- alert("ERROR!! Cant reset D/O !");
- }
- }
- });
- },
- "Cancel": function () {
- $(this).dialog("close");
- $('.dialog-reset').removeAttr('data-id');
- }
- }
- });
-
- $(document).ready(function(){
-
- var origin = window.location.origin;
-
- //===== Dynamic table toolbars =====//
-
- $('#dyn1 .tOptions').click(function () {
- $('#dyn .tablePars').slideToggle(200);
- });
-
- $('.tOptions').click(function () {
- $(this).toggleClass("act");
- });
-
- //======= Filter data table ========//
-
- var table = $('#agent').DataTable({
- "dom": 'Br<"tablePars"fl>t<"tableFooter"ip>',
- "buttons": [{
- extend:'excel',
- text:'<span class="icos-download"></span>Download as Excel',
- exportOptions:
- {
- modifier: {
- sLengthMenu: 'all'
- }
- }
- // 'copyHtml5', 'csv', 'excelHtml5', 'pdf', 'print'
- }],
- "bJQueryUI": false,
- "bAutoWidth": true,
- "bSort": false,
- "sPaginationType": "full_numbers",
- // "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
- "oLanguage": {
- "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
- },
- "ordering": false,
- "serverSide": false,
- "processing": true,
- "ajax": "{{ url('/customer-service/get-all-docket/null/null/null') }}",
- "columns": [
- { "data": "index","name": "index"},
- { "data": "docket_id","name": "docket_id"},
- { "data": "work_order_id","name": "work_order_id"},
- { "data": "nature_work","name": "nature_work"},
- { "data": "category", "name": "category"},
- { "data": "contractor_id","name": "contractor_id"},
- { "data": "installer_name","name": "installer_name"},
- { "data": "customer_id", "name": "customer_id"},
- { "data": "installer_id","name": "installer_id"},
- { "data": "end_job","name": "end_job"},
- { "data": "rating","name": "rating"},
- { "data": "action","name": "action"},
- ],
- "columnDefs": [
- {
- "render": function ( data, type, row ) {
- if (data.indexOf("New/") >= 0) {
- var split = data.split('/');
- return '<small class="label label-warning">'+split[0]+'</small> '+split[1];
- }else {
- return data;
- }
- },
- "targets": 0
- },
- {
- "render": function ( data, type, row ) {
- var split = data.split('/');
- var link1 = "{{ url('/customer-service/docket/generate-pdf')}}"+"/"+split[0];
- var link2 = "{{ url('/customer-service/work-order/generate-pdf') }}"+"/"+split[1];
- return '<a target="_blank" href="'+link1+'" class="tablectrl_medium bGreen tipS" title="View Docket PDF"><span class="iconb" data-icon=""></span></a> <a target="_blank" href="'+link2+'" class="tablectrl_medium bBlue tipS" title="View W/O PDF"><span class="iconb" data-icon=""></span></a> <a target="_blank" class="tablectrl_medium bGold tipS" onclick="reset(\''+split[0]+'\',\'' + split[0] + '\', )" title="Reset Docket PDF"><span class="iconb" data-icon=""></span></a>' ;
- },
- "targets": 11
- },
- ],
- });
-
- //===== Modal =====//
- $('#fbyear,#fbmonth').change(function()
- {
- var link = "{{ url('/customer-service/get-all-docket') }}" +"/"+$('#fbyear').val()+"/"+$('#fbmonth').val()+"/null";
- table.ajax.url( link ).load();
- });
- });
- </script>
- @endsection
|