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.

commission_listR.blade.php 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. @extends('market.layout.master')
  2. @section('ptitle', 'Marketing')
  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. .buttons-excel
  13. {
  14. padding: 7px 12px;
  15. display: block;
  16. color: #808080;
  17. font-size: 11px;
  18. }
  19. </style>
  20. <!-- Table dealer -->
  21. <div class="fluid">
  22. <div class="widget grid12">
  23. <a href="{{url('/download-commission-list')}}"><button class="buttons-excel" onclick="">Download</button></a>
  24. <div class="whead"><h6>CBB Residential - 2 Years Subscription</h6></div>
  25. <div id="dyn1" class="shownpars cuss responsive">
  26. <a class="tOptions" title="Options"><img src="{{ url('assets/img/icons/options') }}" alt="" /></a>
  27. <table id="residential2" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  28. <thead>
  29. <tr>
  30. <th>#</th>
  31. <th>Package Type</th>
  32. <th>Contract (M)</th>
  33. <th>Range Activation</th>
  34. <th>Commission (%)</th>
  35. <th>Category</th>
  36. <th width="90">Actions</th>
  37. </tr>
  38. </thead>
  39. </table>
  40. </div>
  41. </div>
  42. <div class="widget grid12" style="margin-left: 0px;margin-top: 50px;">
  43. <div class="whead"><h6>CBB Residential - 1 Years Subscription</h6></div>
  44. <div id="dyn1" class="shownpars cuss responsive">
  45. <a class="tOptions" title="Options"><img src="{{ url('assets/img/icons/options') }}" alt="" /></a>
  46. <table id="residential1" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  47. <thead>
  48. <tr>
  49. <th>#</th>
  50. <th>Package Type</th>
  51. <th>Contract (M)</th>
  52. <th>Range Activation</th>
  53. <th>Commission (%)</th>
  54. <th>Category</th>
  55. <th width="90">Actions</th>
  56. </tr>
  57. </thead>
  58. </table>
  59. </div>
  60. </div>
  61. <div class="dialog-delete" title="Delete Commission">
  62. <p id="inner-delete"></p>
  63. </div>
  64. <!-- <div class="widget grid2 widgetH"></div> -->
  65. </div>
  66. @endsection
  67. @section('external_js')
  68. <script>
  69. function deleteA(cid,name) {
  70. var cid = cid;
  71. var name = name;
  72. $('.dialog-delete').attr('data-id' , cid);
  73. document.getElementById("inner-delete").innerHTML = "<p>Are you sure want to delete this commission?</p>";
  74. $('.dialog-delete').dialog('open');
  75. return false;
  76. };
  77. $(document).ready(function(){
  78. var origin = window.location.origin;
  79. var curr = '{{ $user->_id }}';
  80. //===== Dynamic table toolbars =====//
  81. $('#dyn1 .tOptions').click(function () {
  82. $('#dyn .tablePars').slideToggle(200);
  83. });
  84. $('.tOptions').click(function () {
  85. $(this).toggleClass("act");
  86. });
  87. //======= Filter data table ========//
  88. $('#residential2').DataTable({
  89. "bJQueryUI": false,
  90. "bAutoWidth": true,
  91. "bSort": false,
  92. "sPaginationType": "full_numbers",
  93. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  94. "oLanguage": {
  95. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  96. },
  97. "ordering": false,
  98. "serverSide": true,
  99. "processing": true,
  100. "ajax": "{{ url('/marketing/get-commission-listR24') }}",
  101. "columns": [
  102. { "data": "index","name": "index"},
  103. { "data": "formT","name": "formT"},
  104. { "data": "contract","name": "contract"},
  105. { "data": "ranges","name": "ranges"},
  106. { "data": "comm","name": "comm"},
  107. { "data": "category","name": "category"},
  108. { "data": "action","name": "action"},
  109. ],
  110. "columnDefs": [
  111. {
  112. "render": function ( data, type, row ) {
  113. var link = "{{ url('/marketing/commission/edit-commissionR') }}"+"/"+data;
  114. return '<a href="'+link+'" class="tablectrl_medium bLightBlue tipS" title="Edit Dealer"><span class="iconb" data-icon="&#xe003;"></span></a> <a class="tablectrl_medium bRed tipS delModule" onclick="deleteA(\''+data+'\',\'' + row.name + '\', )" title="Delete Agent"><span class="iconb" data-icon="&#xe136;"></span></a>';
  115. },
  116. "targets": 6
  117. },
  118. ],
  119. });
  120. $('#residential1').DataTable({
  121. "bJQueryUI": false,
  122. "bAutoWidth": true,
  123. "bSort": false,
  124. "sPaginationType": "full_numbers",
  125. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  126. "oLanguage": {
  127. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  128. },
  129. "ordering": false,
  130. "serverSide": true,
  131. "processing": true,
  132. "ajax": "{{ url('/marketing/get-commission-listR12') }}",
  133. "columns": [
  134. { "data": "index","name": "index"},
  135. { "data": "formT","name": "formT"},
  136. { "data": "contract","name": "contract"},
  137. { "data": "ranges","name": "ranges"},
  138. { "data": "comm","name": "comm"},
  139. { "data": "category","name": "category"},
  140. { "data": "action","name": "action"},
  141. ],
  142. "columnDefs": [
  143. {
  144. "render": function ( data, type, row ) {
  145. var link = "{{ url('/marketing/commission/edit-commissionR') }}"+"/"+data;
  146. return '<a href="'+link+'" class="tablectrl_medium bLightBlue tipS" title="Edit Dealer"><span class="iconb" data-icon="&#xe003;"></span></a> <a class="tablectrl_medium bRed tipS delModule" onclick="deleteA(\''+data+'\',\'' + row.name + '\', )" title="Delete Agent"><span class="iconb" data-icon="&#xe136;"></span></a>';
  147. },
  148. "targets": 6
  149. },
  150. ],
  151. });
  152. //===== Modal =====//
  153. $('.dialog-delete').dialog({
  154. autoOpen: false,
  155. width: 400,
  156. modal: true,
  157. buttons: {
  158. "Yes!": function ()
  159. {
  160. $.ajax({
  161. type: "post",
  162. url: "{{ url('/marketing/commission/delete-commission') }}",
  163. data: { "_token": "{{ csrf_token() }}", "id": $(this).data("id") },
  164. success:function(data)
  165. {
  166. if(data == "true"){
  167. window.location.reload();
  168. }else if(data == "false"){
  169. alert("ERROR!! Cant Delete Commission !");
  170. }
  171. }
  172. });
  173. },
  174. "Cancel": function () {
  175. $(this).dialog("close");
  176. $('.dialog-delete').removeAttr('data-id');
  177. }
  178. }
  179. });
  180. $('.tipS').tipsy({gravity: 's',fade: true, html:true});
  181. });
  182. </script>
  183. @endsection