feat(queries): next-number options for project/order create modals
This commit is contained in:
@@ -82,3 +82,12 @@ export const orderDetailOptions = (id: string | undefined) =>
|
|||||||
queryFn: () => jsonQuery<OrderData>(`/api/admin/orders/${id}`),
|
queryFn: () => jsonQuery<OrderData>(`/api/admin/orders/${id}`),
|
||||||
enabled: !!id,
|
enabled: !!id,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const orderNextNumberOptions = () =>
|
||||||
|
queryOptions({
|
||||||
|
queryKey: ["orders", "next-number"],
|
||||||
|
queryFn: () =>
|
||||||
|
jsonQuery<{ next_number?: string; number?: string }>(
|
||||||
|
"/api/admin/orders/next-number",
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|||||||
@@ -109,3 +109,12 @@ export const projectFilesOptions = (projectId: number, path: string) =>
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const projectNextNumberOptions = () =>
|
||||||
|
queryOptions({
|
||||||
|
queryKey: ["projects", "next-number"],
|
||||||
|
queryFn: () =>
|
||||||
|
jsonQuery<{ next_number?: string; number?: string }>(
|
||||||
|
"/api/admin/projects/next-number",
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user