chess/public/assets/js/pages/custom/user/list-datatable.min.js

1 line
10 KiB
JavaScript
Raw Permalink Normal View History

2024-08-29 03:56:32 +00:00
"use strict";var KTAppsUsersListDatatable={init:function(){var t;t=$("#kt_datatable").KTDatatable({data:{type:"remote",source:{read:{url:HOST_URL+"/api/datatables/demos/default.php"}},pageSize:10,serverPaging:!0,serverFiltering:!0,serverSorting:!0},layout:{scroll:!1,footer:!1},sortable:!0,pagination:!0,search:{input:$("#kt_subheader_search_form"),delay:400,key:"generalSearch"},columns:[{field:"RecordID",title:"#",sortable:"asc",width:40,type:"number",selector:!1,textAlign:"left",template:function(t){return'<span class="font-weight-bolder">'+t.RecordID+"</span>"}},{field:"OrderID",title:"Customer",width:250,template:function(t){var a=KTUtil.getRandomInt(1,14);return a>8?'<div class="d-flex align-items-center">\t\t\t\t\t\t\t\t<div class="symbol symbol-40 symbol-sm flex-shrink-0">\t\t\t\t\t\t\t\t\t<img class="" src="assets/media/users/100_'+a+'.jpg" alt="photo">\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t<div class="ml-4">\t\t\t\t\t\t\t\t\t<div class="text-dark-75 font-weight-bolder font-size-lg mb-0">'+t.CompanyAgent+'</div>\t\t\t\t\t\t\t\t\t<a href="#" class="text-muted font-weight-bold text-hover-primary">'+t.CompanyEmail+"</a>\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t</div>":'<div class="d-flex align-items-center">\t\t\t\t\t\t\t\t<div class="symbol symbol-40 symbol-light-'+["success","primary","danger","success","warning","dark","primary","info"][KTUtil.getRandomInt(0,7)]+' flex-shrink-0">\t\t\t\t\t\t\t\t\t<span class="symbol-label font-size-h4 font-weight-bold">'+t.CompanyAgent.substring(0,1)+'</span>\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t<div class="ml-4">\t\t\t\t\t\t\t\t\t<div class="text-dark-75 font-weight-bolder font-size-lg mb-0">'+t.CompanyAgent+'</div>\t\t\t\t\t\t\t\t\t<a href="#" class="text-muted font-weight-bold text-hover-primary">'+t.CompanyEmail+"</a>\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t</div>"}},{field:"Country",title:"Country",template:function(t){var a="";return a+='<div class="font-weight-bolder font-size-lg mb-0">'+t.Country+"</div>",a+='<div class="font-weight-bold text-muted">Code: '+t.ShipCountry+"</div>"}},{field:"ShipDate",title:"Ship Date",type:"date",format:"MM/DD/YYYY",template:function(t){var a="",e=KTUtil.getRandomInt(1,4);return a+='<div class="font-weight-bolder text-primary mb-0">'+t.ShipDate+"</div>",a+='<div class="text-muted">'+{1:{title:"Paid",class:" label-light-primary"},2:{title:"Approved",class:" label-light-danger"},3:{title:"Pending",class:" label-light-primary"},4:{title:"Rejected",class:" label-light-success"}}[e].title+"</div>"}},{field:"CompanyName",title:"Company Name",template:function(t){var a="";return a+='<div class="font-weight-bold text-muted">'+t.CompanyName+"</div>"}},{field:"Status",title:"Status",template:function(t){var a={1:{title:"Pending",class:" label-light-primary"},2:{title:"Delivered",class:" label-light-danger"},3:{title:"Canceled",class:" label-light-primary"},4:{title:"Success",class:" label-light-success"},5:{title:"Info",class:" label-light-info"},6:{title:"Danger",class:" label-light-danger"},7:{title:"Warning",class:" label-light-warning"}};return'<span class="label label-lg font-weight-bold '+a[t.Status].class+' label-inline">'+a[t.Status].title+"</span>"}},{field:"Actions",title:"Actions",sortable:!1,width:130,overflow:"visible",autoHide:!1,template:function(){return'\t <div class="dropdown dropdown-inline">\t <a href="javascript:;" class="btn btn-sm btn-default btn-text-primary btn-hover-primary btn-icon mr-2" data-toggle="dropdown">\t\t\t\t\t\t\t\t\t<span class="svg-icon svg-icon-md">\t\t\t\t\t\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="svg-icon">\t\t\t\t\t\t\t\t\t\t\t<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\t\t\t\t\t\t\t\t\t\t\t\t<rect x="0" y="0" width="24" height="24"/>\t\t\t\t\t\t\t\t\t\t\t\t<path d="M7,3 L17,3 C19.209139,3 21,4.790861 21,7 C21,9.209139 19.209139,11 17,11 L7,11 C4.790861,11 3,9.209139 3,7 C3,4.790861 4.790861,3 7,3 Z M7,9 C8.1045695,9 9,8.1045695