選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

commission_listB.blade.php 9.9KB

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