perf: limit cut plan to active orders
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
This commit is contained in:
@@ -222,12 +222,13 @@ export const downloadDatabaseDiagnostic = async (): Promise<void> => {
|
||||
|
||||
export const fetchProductionOrders = async (
|
||||
dateRange: DateRange,
|
||||
filters?: { search?: string },
|
||||
filters?: { search?: string; activeOnly?: boolean },
|
||||
options?: CacheOptions
|
||||
): Promise<ProductionOrderSummary> => {
|
||||
const params = buildDateRangeParams(dateRange);
|
||||
const search = filters?.search?.trim();
|
||||
if (search) params.set('search', search);
|
||||
if (filters?.activeOnly) params.set('activeOnly', 'true');
|
||||
|
||||
const path = `/production-orders?${params.toString()}`;
|
||||
return getCachedAnalytics(path, async () => {
|
||||
|
||||
Reference in New Issue
Block a user