Server IP : 150.95.80.236 / Your IP : 3.129.195.45 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/dist/assets/js/custom/account/orders/ |
Upload File : |
"use strict";var KTDatatablesClassic={init:function(){!function(){const t=document.getElementById("kt_orders_classic");t.querySelectorAll("tbody tr").forEach((t=>{const e=t.querySelectorAll("td"),a=moment(e[1].innerHTML,"MMM D, YYYY").format("x");e[1].setAttribute("data-order",a)}));const e=$(t).DataTable({info:!1,order:[]}),a=document.getElementById("kt_filter_orders"),r=document.getElementById("kt_filter_year");var n,o;a.addEventListener("change",(function(t){e.column(3).search(t.target.value).draw()})),r.addEventListener("change",(function(t){switch(t.target.value){case"thisyear":n=moment().startOf("year").format("x"),o=moment().endOf("year").format("x"),e.draw();break;case"thismonth":n=moment().startOf("month").format("x"),o=moment().endOf("month").format("x"),e.draw();break;case"lastmonth":n=moment().subtract(1,"months").startOf("month").format("x"),o=moment().subtract(1,"months").endOf("month").format("x"),e.draw();break;case"last90days":n=moment().subtract(30,"days").format("x"),o=moment().format("x"),e.draw();break;default:n=moment().subtract(100,"years").startOf("month").format("x"),o=moment().add(1,"months").endOf("month").format("x"),e.draw()}})),$.fn.dataTable.ext.search.push((function(t,e,a){var r=n,m=o,s=parseFloat(moment(e[1]).format("x"))||0;return!!(isNaN(r)&&isNaN(m)||isNaN(r)&&s<=m||r<=s&&isNaN(m)||r<=s&&s<=m)})),document.getElementById("kt_filter_search").addEventListener("keyup",(function(t){e.search(t.target.value).draw()}))}()}};KTUtil.onDOMContentLoaded((function(){KTDatatablesClassic.init()}));