sorted by order date
This commit is contained in:
parent
09e99fcc5a
commit
2f159af60b
@ -3,15 +3,15 @@ import { RecordView } from '../components/rv/RecordView';
|
|||||||
import { ORDER_BOOKING } from '../api/config';
|
import { ORDER_BOOKING } from '../api/config';
|
||||||
import { orderBookingClient } from '../api/clients';
|
import { orderBookingClient } from '../api/clients';
|
||||||
|
|
||||||
export const REPORT_MAP: Record<string, { uid: string; title: string }> = {
|
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' },
|
'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' },
|
'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' },
|
'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' },
|
'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' },
|
'yearly-orders': { uid: ORDER_BOOKING.recordViews.YEARLY_ORDERS, title: 'Yearly Orders' },
|
||||||
'monthly-orders': { uid: ORDER_BOOKING.recordViews.MONTHLY_ORDERS, title: 'Monthly Orders' },
|
'monthly-orders': { uid: ORDER_BOOKING.recordViews.MONTHLY_ORDERS, title: 'Monthly Orders' },
|
||||||
'weekly-orders': { uid: ORDER_BOOKING.recordViews.WEEKLY_ORDERS, title: 'Weekly 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() {
|
export function ReportPage() {
|
||||||
@ -28,6 +28,8 @@ export function ReportPage() {
|
|||||||
client={orderBookingClient}
|
client={orderBookingClient}
|
||||||
rvUid={report.uid}
|
rvUid={report.uid}
|
||||||
title={report.title}
|
title={report.title}
|
||||||
|
sortBy={report.sortBy}
|
||||||
|
sortDir={report.sortDir}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user