Add container weight tracking for weigh-based concentrate audits
Build and push image / build (push) Successful in 1m6s

Record the total weight of a jar (product + container) at acquisition so
audits can be done by simply re-weighing the sealed jar. The tare is
derived (containerWeight − productWeight), and the audit flow offers a
"Weigh container" toggle that auto-calculates remaining product from the
scale reading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-07 23:11:39 -04:00
parent e9e66ab1cb
commit a1be29ab6e
11 changed files with 205 additions and 26 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
import type { Bootstrap, AuditMode } from "./types.js";
export type BatchOp =
| { action: "update"; id: string; fields: Partial<{ shopId: string | null; binId: string | null; price: number; thc: number; cbd: number; totalCannabinoids: number; purchaseDate: string }> }
| { action: "update"; id: string; fields: Partial<{ shopId: string | null; binId: string | null; price: number; thc: number; cbd: number; totalCannabinoids: number; containerWeight: number | null; purchaseDate: string }> }
| { action: "checkout"; id: string; date: string }
| { action: "checkin"; id: string; date: string; binId: string }
| { action: "finish"; id: string; date: string; rating?: number; notes?: string }
@@ -79,6 +79,7 @@ export const api = {
cbd?: number;
totalCannabinoids?: number;
weight?: number;
containerWeight?: number | null;
countOriginal?: number;
unitWeight?: number;
purchaseDate: string;
@@ -98,6 +99,7 @@ export const api = {
cbd: number;
totalCannabinoids: number;
weight: number;
containerWeight: number | null;
countOriginal: number;
unitWeight: number;
purchaseDate: string;