minor changes in order and dashboard, records
This commit is contained in:
@@ -799,7 +799,7 @@
|
||||
// Pagination state
|
||||
let currentPage = 1;
|
||||
const itemsPerPage = 10;
|
||||
let allOrders = @json($orders);
|
||||
let allOrders = {!! $orders->toJson() !!};
|
||||
let filteredOrders = [...allOrders];
|
||||
|
||||
// Status icon helper functions
|
||||
@@ -874,11 +874,11 @@
|
||||
const searchFields = [
|
||||
order.order_id?.toString().toLowerCase(),
|
||||
order.shipments?.[0]?.shipment_id?.toString().toLowerCase(),
|
||||
order.markList?.customer_id?.toString().toLowerCase(),
|
||||
order.markList?.company_name?.toString().toLowerCase(),
|
||||
order.mark_list?.customer_id?.toString().toLowerCase(),
|
||||
order.mark_list?.company_name?.toString().toLowerCase(),
|
||||
order.invoice?.invoice_number?.toString().toLowerCase(),
|
||||
order.markList?.origin?.toString().toLowerCase(),
|
||||
order.markList?.destination?.toString().toLowerCase()
|
||||
order.mark_list?.origin?.toString().toLowerCase(),
|
||||
order.mark_list?.destination?.toString().toLowerCase()
|
||||
];
|
||||
matchesSearch = searchFields.some(field => field && field.includes(searchTerm.toLowerCase()));
|
||||
}
|
||||
@@ -901,7 +901,7 @@
|
||||
// Initialize pagination and filters
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Set today as default "to" date
|
||||
renderTable();
|
||||
renderTable();
|
||||
updatePaginationControls();
|
||||
|
||||
// Pagination events
|
||||
@@ -1099,7 +1099,7 @@
|
||||
const paginatedItems = filteredOrders.slice(startIndex, endIndex);
|
||||
|
||||
paginatedItems.forEach(order => {
|
||||
const mark = order.markList || null;
|
||||
const mark = order.mark_list || null;
|
||||
const invoice = order.invoice || null;
|
||||
const shipment = order.shipments?.[0] || null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user