Split audits into Weigh Ins (bulk) and Bin Checks (discrete)
Build and push image / build (push) Successful in 57s
Build and push image / build (push) Successful in 57s
Replaces the unified audit system with two purpose-built flows: - Weigh Ins: rebranded audit flow for bulk products (Flower, Concentrate, Tincture) with scale weigh, container weigh, and estimate modes - Bin Checks: new bin-level presence check — select a bin, scan every item, resolve discrepancies (wrong bin, unknown, missing), auto-records presence audits on verified items Adds cadence_days and last_checked to bins table, with per-bin overdue tracking on the dashboard and bins view. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-4
@@ -202,18 +202,27 @@ export const api = {
|
||||
deleteShop: (id: string) =>
|
||||
request<{ ok: true }>(`/shops/${id}`, { method: "DELETE" }),
|
||||
|
||||
createBin: (body: { name: string; capacity?: number }) =>
|
||||
request<{ id: string; name: string; capacity: number }>("/bins", {
|
||||
createBin: (body: { name: string; capacity?: number; cadenceDays?: number }) =>
|
||||
request<{ id: string; name: string; capacity: number; cadenceDays: number; lastChecked: string | null }>("/bins", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
|
||||
updateBin: (id: string, body: { name?: string; capacity?: number }) =>
|
||||
request<{ id: string; name: string; capacity: number }>(`/bins/${id}`, {
|
||||
updateBin: (id: string, body: { name?: string; capacity?: number; cadenceDays?: number }) =>
|
||||
request<{ id: string; name: string; capacity: number; cadenceDays: number; lastChecked: string | null }>(`/bins/${id}`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
|
||||
deleteBin: (id: string) =>
|
||||
request<{ ok: true }>(`/bins/${id}`, { method: "DELETE" }),
|
||||
|
||||
completeBinCheck: (
|
||||
binId: string,
|
||||
body: { date: string; verifiedItemIds: string[]; goneItemIds: string[] },
|
||||
) =>
|
||||
request<{ ok: true; verified: number; gone: number }>(`/bins/${binId}/check`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user