Add checkout/custody feature for tracking items in personal possession
Build and push image / build (push) Successful in 1m8s
Build and push image / build (push) Successful in 1m8s
Items can now be checked out of their bin into "my custody" and later checked back in or marked consumed. Adds checkout/checkin API endpoints, a My Custody sidebar page, CheckoutFlow and CheckinFlow modals, and updates ProductDetail, Inventory, ConsumeFlow, and MarkGoneFlow to handle the new checked-out status. Bulk items prompt for remaining weight on check-in. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -31,6 +31,7 @@ export interface Stats {
|
||||
series30: { date: string; grams: number }[];
|
||||
series90: { date: string; grams: number }[];
|
||||
activeCount: number;
|
||||
checkedOutCount: number;
|
||||
consumedCount: number;
|
||||
goneCount: number;
|
||||
archivedCount: number;
|
||||
@@ -53,7 +54,7 @@ export function computeStats(data: Bootstrap): Stats {
|
||||
const items = enrichItems(data);
|
||||
const dayKey = (d: Date) => d.toISOString().slice(0, 10);
|
||||
|
||||
const active = items.filter((p) => p.status === "active");
|
||||
const active = items.filter((p) => p.status === "active" || p.status === "checked-out");
|
||||
const consumed = items.filter((p) => p.status === "consumed" && p.consumedDate);
|
||||
const gone = items.filter((p) => p.status === "gone");
|
||||
|
||||
@@ -271,7 +272,8 @@ export function computeStats(data: Bootstrap): Stats {
|
||||
series7,
|
||||
series30,
|
||||
series90,
|
||||
activeCount: active.length,
|
||||
activeCount: items.filter((p) => p.status === "active").length,
|
||||
checkedOutCount: items.filter((p) => p.status === "checked-out").length,
|
||||
consumedCount: consumed.length,
|
||||
goneCount: gone.length,
|
||||
archivedCount: consumed.length + gone.length,
|
||||
|
||||
Reference in New Issue
Block a user