sorted by order date

This commit is contained in:
suryac 2026-08-04 15:19:39 +05:30
parent 09e99fcc5a
commit 2f159af60b

View File

@ -3,15 +3,15 @@ import { RecordView } from '../components/rv/RecordView';
import { ORDER_BOOKING } from '../api/config';
import { orderBookingClient } from '../api/clients';
export const REPORT_MAP: Record<string, { uid: string; title: string }> = {
'product-wise-orders': { uid: ORDER_BOOKING.recordViews.PRODUCT_WISE_ORDERS, title: 'Product Wise Orders' },
'route-wise-orders': { uid: ORDER_BOOKING.recordViews.ROUTE_WISE_ORDERS, title: 'Route Wise Orders' },
'so-wise-orders': { uid: ORDER_BOOKING.recordViews.SO_WISE_ORDERS, title: 'SO Wise Orders' },
export const REPORT_MAP: Record<string, { uid: string; title: string; sortBy?: string; sortDir?: 'asc' | 'desc' }> = {
'product-wise-orders': { uid: ORDER_BOOKING.recordViews.PRODUCT_WISE_ORDERS, title: 'Product Wise Orders', sortBy: 'order_date', sortDir: 'desc' },
'route-wise-orders': { uid: ORDER_BOOKING.recordViews.ROUTE_WISE_ORDERS, title: 'Route Wise Orders', sortBy: 'order_date', sortDir: 'desc' },
'so-wise-orders': { uid: ORDER_BOOKING.recordViews.SO_WISE_ORDERS, title: 'SO Wise Orders', sortBy: 'order_date', sortDir: 'desc' },
'so-wise-visits': { uid: ORDER_BOOKING.recordViews.SO_WISE_VISITS, title: 'SO Wise Visits' },
'yearly-orders': { uid: ORDER_BOOKING.recordViews.YEARLY_ORDERS, title: 'Yearly Orders' },
'monthly-orders': { uid: ORDER_BOOKING.recordViews.MONTHLY_ORDERS, title: 'Monthly Orders' },
'weekly-orders': { uid: ORDER_BOOKING.recordViews.WEEKLY_ORDERS, title: 'Weekly Orders' },
'store-wise-products': { uid: ORDER_BOOKING.recordViews.STORE_WISE_PRODUCTS, title: 'Store Wise Products' },
'store-wise-products': { uid: ORDER_BOOKING.recordViews.STORE_WISE_PRODUCTS, title: 'Store Wise Products', sortBy: 'order_date', sortDir: 'desc' },
};
export function ReportPage() {
@ -28,6 +28,8 @@ export function ReportPage() {
client={orderBookingClient}
rvUid={report.uid}
title={report.title}
sortBy={report.sortBy}
sortDir={report.sortDir}
/>
);
}