Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

view_vendor.blade.php 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. </style>
  13. <!-- Table dealer -->
  14. <div class="fluid">
  15. <div class="widget grid12">
  16. <div class="whead"><h6>Vendor's List</h6></div>
  17. <div id="dyn1" class="shownpars cuss responsive">
  18. <a class="tOptions" title="Options"><img src="{{ url('assets/img/icons/options') }}" alt="" /></a>
  19. <table id="company" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  20. <thead>
  21. <tr>
  22. <th>#</th>
  23. <th>Company Name</th>
  24. <th>Address</th>
  25. <th>City</th>
  26. <th>State</th>
  27. <th>Postcode.</th>
  28. <th width="90">Actions</th>
  29. </tr>
  30. </thead>
  31. </table>
  32. </div>
  33. <div class="dialog-delete" title="Delete Vendor">
  34. <p id="inner-delete"></p>
  35. </div>
  36. </div>
  37. </div>
  38. @endsection
  39. @section('external_js')
  40. <script>
  41. function deleteA(cid,name,email) {
  42. var cid = cid;
  43. var name = name;
  44. var email = email;
  45. $('.dialog-delete').attr('data-id' , cid);
  46. document.getElementById("inner-delete").innerHTML = "<p>Are you sure want to delete this Vendor ( " + name + " )?</p>";
  47. $('.dialog-delete').dialog('open');
  48. return false;
  49. };
  50. $(document).ready(function(){
  51. var origin = window.location.origin;
  52. //===== Dynamic table toolbars =====//
  53. $('#dyn1 .tOptions').click(function () {
  54. $('#dyn .tablePars').slideToggle(200);
  55. });
  56. $('.tOptions').click(function () {
  57. $(this).toggleClass("act");
  58. });
  59. //======= Filter data table ========//
  60. $('#company').DataTable({
  61. "bJQueryUI": false,
  62. "bAutoWidth": true,
  63. "bSort": false,
  64. "sPaginationType": "full_numbers",
  65. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  66. "oLanguage": {
  67. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  68. },
  69. "ordering": false,
  70. "serverSide": true,
  71. "processing": true,
  72. "ajax": "{{ url('/customer-service/team/get-vendor-list') }}",
  73. "columns": [
  74. { "data": "index","name": "index"},
  75. { "data": "name","name": "name"},
  76. { "data": "address","name": "address"},
  77. { "data": "city","name": "city"},
  78. { "data": "state","name": "state"},
  79. { "data": "postcode", "name": "postcode"},
  80. { "data": "action","name": "action"},
  81. ],
  82. "columnDefs": [
  83. {
  84. "render": function ( data, type, row ) {
  85. var link = "{{ url('/customer-service/team/vendor/edit') }}"+"/"+data;
  86. return '<a href="'+link+'" class="tablectrl_medium bLightBlue tipS" title="Edit Agent"><span class="iconb" data-icon="&#xe003;"></span></a> <a class="tablectrl_medium bRed tipS delModule" onclick="deleteA(\''+data+'\',\'' + row.name + '\',\'' + row.email + '\', )" title="Delete Agent"><span class="iconb" data-icon="&#xe136;"></span></a>';
  87. },
  88. "targets": 6
  89. },
  90. ],
  91. });
  92. //===== Modal =====//
  93. $('.dialog-delete').dialog({
  94. autoOpen: false,
  95. width: 400,
  96. modal: true,
  97. buttons: {
  98. "Yes!": function () {
  99. var id = $(this).data('id');
  100. // window.alert(email);
  101. $.ajax({
  102. type: "POST",
  103. url: "{{ url('/customer-service/team/delete-vendor') }}",
  104. data: { "_token": "{{ csrf_token() }}", id: id },
  105. success:function(data)
  106. {
  107. if(data == "true"){
  108. window.location.reload();
  109. }else if(data == "false"){
  110. alert("ERROR!! Cant Delete Vendor !");
  111. }
  112. }
  113. });
  114. },
  115. "Cancel": function () {
  116. $(this).dialog("close");
  117. $('.dialog-delete').removeAttr('data-id');
  118. }
  119. }
  120. });
  121. $('.tipS').tipsy({gravity: 's',fade: true, html:true});
  122. });
  123. </script>
  124. @endsection