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_listB.blade.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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 Business - 2 Years Subscription (10Mbps-100Mbps)</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="business24low" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  28. <thead>
  29. <tr>
  30. <th>#</th>
  31. <th>Speed</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 Business - 2 Years Subscription (300Mbps-1Gbps)</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="business24high" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  47. <thead>
  48. <tr>
  49. <th>#</th>
  50. <th>Speed</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="widget grid12" style="margin-left: 0px;margin-top: 50px;">
  62. <div class="whead"><h6>CBB Business - 1 Years Subscription (10Mbps-100Mbps)</h6></div>
  63. <div id="dyn1" class="shownpars cuss responsive">
  64. <a class="tOptions" title="Options"><img src="{{ url('assets/img/icons/options') }}" alt="" /></a>
  65. <table id="business12low" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  66. <thead>
  67. <tr>
  68. <th>#</th>
  69. <th>Speed</th>
  70. <th>Contract (M)</th>
  71. <th>Range Activation</th>
  72. <th>Commission (%)</th>
  73. <th>Category</th>
  74. <th width="90">Actions</th>
  75. </tr>
  76. </thead>
  77. </table>
  78. </div>
  79. </div>
  80. <div class="widget grid12" style="margin-left: 0px;margin-top: 50px;">
  81. <div class="whead"><h6>CBB Business - 1 Years Subscription (300Mbps-1Gbps)</h6></div>
  82. <div id="dyn1" class="shownpars cuss responsive">
  83. <a class="tOptions" title="Options"><img src="{{ url('assets/img/icons/options') }}" alt="" /></a>
  84. <table id="business12high" cellpadding="0" cellspacing="0" border="0" class="dTable tMedia">
  85. <thead>
  86. <tr>
  87. <th>#</th>
  88. <th>Speed</th>
  89. <th>Contract (M)</th>
  90. <th>Range Activation</th>
  91. <th>Commission (%)</th>
  92. <th>Category</th>
  93. <th width="90">Actions</th>
  94. </tr>
  95. </thead>
  96. </table>
  97. </div>
  98. </div>
  99. <div class="dialog-delete" title="Delete Commission">
  100. <p id="inner-delete"></p>
  101. </div>
  102. <!-- <div class="widget grid2 widgetH"></div> -->
  103. </div>
  104. @endsection
  105. @section('external_js')
  106. <script>
  107. function deleteA(cid,name) {
  108. var cid = cid;
  109. var name = name;
  110. $('.dialog-delete').attr('data-id' , cid);
  111. document.getElementById("inner-delete").innerHTML = "<p>Are you sure want to delete this commission?</p>";
  112. $('.dialog-delete').dialog('open');
  113. return false;
  114. };
  115. $(document).ready(function(){
  116. var origin = window.location.origin;
  117. var curr = '<?php echo $staffDetails->_id ?>';
  118. //===== Dynamic table toolbars =====//
  119. $('#dyn1 .tOptions').click(function () {
  120. $('#dyn .tablePars').slideToggle(200);
  121. });
  122. $('.tOptions').click(function () {
  123. $(this).toggleClass("act");
  124. });
  125. //======= Filter data table ========//
  126. $('#business24low').DataTable({
  127. "bJQueryUI": false,
  128. "bAutoWidth": true,
  129. "bSort": false,
  130. "sPaginationType": "full_numbers",
  131. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  132. "oLanguage": {
  133. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  134. },
  135. "ordering": false,
  136. "serverSide": true,
  137. "processing": true,
  138. "ajax": "{{ url('/marketing/get-commission-listB24-low') }}",
  139. "columns": [
  140. { "data": "index","name": "index"},
  141. { "data": "packageR","name": "packageR"},
  142. { "data": "contract","name": "contract"},
  143. { "data": "ranges","name": "ranges"},
  144. { "data": "comm","name": "comm"},
  145. { "data": "category","name": "category"},
  146. { "data": "action","name": "action"},
  147. ],
  148. "columnDefs": [
  149. {
  150. "render": function ( data, type, row ) {
  151. var link = "{{ url('/marketing/commission/edit-commissionB') }}"+"/"+data;
  152. 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>';
  153. },
  154. "targets": 6
  155. },
  156. ],
  157. });
  158. $('#business24high').DataTable({
  159. "bJQueryUI": false,
  160. "bAutoWidth": true,
  161. "bSort": false,
  162. "sPaginationType": "full_numbers",
  163. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  164. "oLanguage": {
  165. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  166. },
  167. "ordering": false,
  168. "serverSide": true,
  169. "processing": true,
  170. "ajax": "{{ url('/marketing/get-commission-listB24-high') }}",
  171. "columns": [
  172. { "data": "index","name": "index"},
  173. { "data": "packageR","name": "packageR"},
  174. { "data": "contract","name": "contract"},
  175. { "data": "ranges","name": "ranges"},
  176. { "data": "comm","name": "comm"},
  177. { "data": "category","name": "category"},
  178. { "data": "action","name": "action"},
  179. ],
  180. "columnDefs": [
  181. {
  182. "render": function ( data, type, row ) {
  183. var link = "{{ url('/marketing/commission/edit-commissionB') }}"+"/"+data;
  184. 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>';
  185. },
  186. "targets": 6
  187. },
  188. ],
  189. });
  190. $('#business12low').DataTable({
  191. "bJQueryUI": false,
  192. "bAutoWidth": true,
  193. "bSort": false,
  194. "sPaginationType": "full_numbers",
  195. "sDom": '<"tablePars"fl>t<"tableFooter"ip>',
  196. "oLanguage": {
  197. "sLengthMenu": "<span class='showentries'>Show entries:</span> _MENU_"
  198. },
  199. "ordering": false,
  200. "serverSide": true,
  201. "processing": true,
  202. "ajax": "{{ url('/marketing/get-commission-listB12-low') }}",
  203. "columns": [
  204. { "data": "index","name": "index"},
  205. { "data": "packageR","name": "packageR"},
  206. { "data": "contract","name": "contract"},
  207. { "data": "ranges","name": "ranges"},
  208. { "data": "comm","name": "comm"},
  209. { "data": "category","name": "category"},
  210. { "data": "action","name": "action"},
  211. ],
  212. "columnDefs": [
  213. {
  214. "render": function ( data, type, row ) {
  215. var link = "{{ url('/marketing/commission/edit-commissionB') }}"+"/"+data;
  216. 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>';
  217. },
  218. "targets": 6
  219. },
  220. ],
  221. });
  222. $('#business12high').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('/marketing/get-commission-listB12-high') }}",
  235. "columns": [
  236. { "data": "index","name": "index"},
  237. { "data": "packageR","name": "packageR"},
  238. { "data": "contract","name": "contract"},
  239. { "data": "ranges","name": "ranges"},
  240. { "data": "comm","name": "comm"},
  241. { "data": "category","name": "category"},
  242. { "data": "action","name": "action"},
  243. ],
  244. "columnDefs": [
  245. {
  246. "render": function ( data, type, row ) {
  247. var link = "{{ url('/marketing/commission/edit-commissionB') }}"+"/"+data;
  248. 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>';
  249. },
  250. "targets": 6
  251. },
  252. ],
  253. });
  254. //===== Modal =====//
  255. $('.dialog-delete').dialog({
  256. autoOpen: false,
  257. width: 400,
  258. modal: true,
  259. buttons: {
  260. "Yes!": function () {
  261. $.ajax({
  262. type: "post",
  263. url: "{{ url('/marketing/commission/delete-commission') }}",
  264. data: { "_token": "{{ csrf_token() }}", "id": $(this).data("id") },
  265. success:function(data)
  266. {
  267. if(data == "true"){
  268. window.location.reload();
  269. }else if(data == "false"){
  270. alert("ERROR!! Cant Delete Commission !");
  271. }
  272. }
  273. });
  274. },
  275. "Cancel": function () {
  276. $(this).dialog("close");
  277. $('.dialog-delete').removeAttr('data-id');
  278. }
  279. }
  280. });
  281. $('.tipS').tipsy({gravity: 's',fade: true, html:true});
  282. });
  283. </script>
  284. @endsection