| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- @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; }
- </style>
- <!-- Table dealer -->
- <div class="fluid">
- <div class="widget grid12">
- <div class="whead"><h6>Coverage List (B)</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>Building</th>
- <th>Street</th>
- <th>City</th>
- <th>State</th>
- <th>Postcode.</th>
- <th>Status Building</th>
- <th>Project Type</th>
- <th width="90">Actions</th>
- </tr>
- </thead>
- </table>
- </div>
- <div class="dialog-delete" title="Delete Coverage">
- <p id="inner-delete"></p>
- </div>
- </div>
- </div>
- @endsection
-
- @section('external_js')
- <script>
- function deleteA(cid,name) {
- var cid = cid;
- var name = name;
- var email = email;
-
- $('.dialog-delete').attr('data-id' , cid);
- document.getElementById("inner-delete").innerHTML = "<p>Are you sure want to delete this coverage ( " + name + " )?</p>";
-
- $('.dialog-delete').dialog('open');
- return false;
- };
-
- $(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 ========//
-
- $('#agent').DataTable({
- "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": true,
- "processing": true,
- "ajax": "{{ url('/customer-service/coverage/get-coverage-listB') }}",
- "columns": [
- { "data": "index","name": "index"},
- { "data": "address","name": "address"},
- { "data": "street","name": "street"},
- { "data": "city","name": "city"},
- { "data": "state","name": "state"},
- { "data": "postcode", "name": "postcode"},
- { "data": "status_building", "name": "status_building"},
- { "data": "project_type", "name": "project_type"},
- { "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 link = "{{ url('/customer-service/coverage/business/edit') }}"+"/"+data;
- return '<a href="'+link+'" class="tablectrl_medium bLightBlue tipS" title="Edit Coverage"><span class="iconb" data-icon=""></span></a> <a class="tablectrl_medium bRed tipS delModule" onclick="deleteA(\''+data+'\',\'' + row.address + '\',)" title="Delete Coverage"><span class="iconb" data-icon=""></span></a>';
- },
- "targets": 8
- },
- ],
- });
-
- //===== Modal =====//
- $('.dialog-delete').dialog({
- autoOpen: false,
- width: 400,
- modal: true,
- buttons: {
- "Yes!": function () {
- var id = $(this).data('id');
- // window.alert(email);
- $.ajax({
- type: "POST",
- url: "{{ url('/customer-service/coverage/delete-coverage') }}",
- data: { "_token": "{{ csrf_token() }}", id: id },
- success:function(data)
- {
- if(data == "true"){
- window.location.reload();
- }else if(data == "false"){
- alert("ERROR!! Cant Delete Coverage !");
- }
- }
- });
- },
- "Cancel": function () {
- $(this).dialog("close");
- $('.dialog-delete').removeAttr('data-id');
- }
- }
- });
-
- $('.tipS').tipsy({gravity: 's',fade: true, html:true});
- });
- </script>
- @endsection
|