fixed a bug on the sms units/charge display
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
function sendDailySmsUnits() {
|
||||
document.getElementById('loadingOverlay').style.display = 'flex';
|
||||
const endpoint = "{{ route('client.dailysmsunits') }}";
|
||||
const endpoint = "client-dailysmsunits";
|
||||
const startDate = startDateElement.value;
|
||||
const endDate = endDateElement.value;
|
||||
fetch(endpoint, {
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
}
|
||||
var table = new Tabulator("#message-table", {
|
||||
ajaxURL: base_url = "client-traffic-tabulator", // "https://smsportal.clickmlapps.com/client-traffic-tabulator/",
|
||||
ajaxURL: base_url = "client-traffic-tabulator",
|
||||
ajaxConfig: {
|
||||
method: "GET",
|
||||
headers: {
|
||||
@@ -88,13 +88,12 @@
|
||||
invalidPlaceholder:"(invalid date)"
|
||||
},
|
||||
headerFilter:function(cell, onRendered, success, cancel){
|
||||
// Create native date input
|
||||
var input = document.createElement("input");
|
||||
input.type = "date";
|
||||
|
||||
input.addEventListener("change", function(){
|
||||
console.log(input.value);
|
||||
success(input.value); // pass value to Tabulator filter
|
||||
success(input.value);
|
||||
});
|
||||
|
||||
return input;
|
||||
@@ -103,7 +102,6 @@
|
||||
if(!headerValue){ return true; } // no filter
|
||||
if(!rowValue){ return false; }
|
||||
|
||||
// Extract just the date portion from ISO timestamp
|
||||
const rowDate = new Date(rowValue);
|
||||
const formatted = rowDate.toISOString().split("T")[0]; // yyyy-MM-dd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user