Commit Graph

10 Commits

Author SHA1 Message Date
josh c91fa1a192 Round 'Was' value in audit modal to 2 decimal places
Build and push image / build (push) Successful in 48s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 01:31:19 -04:00
josh 69ffc5ed26 Remove direct entry option from concentrate audits
Build and push image / build (push) Successful in 52s
Concentrates with a container weight now always use the weigh-container
input — no toggle is shown. Other bulk types (Flower) still get the
toggle between weigh container and direct entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 01:18:27 -04:00
josh a1be29ab6e 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>
2026-05-07 23:11:39 -04:00
josh 4044de7bfc Add timezone preference and fix all date handling to be timezone-aware
Build and push image / build (push) Successful in 56s
Dates were computed using browser/server local time with no explicit timezone,
causing inconsistencies when server runs in UTC. Now all "today" computations
and date formatting use the user's chosen IANA timezone, persisted in
localStorage and selectable from Settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 22:30:01 -04:00
josh 04bf009a83 Scope ScanField by mode: asset ID only for audit/consume, SKU only for add inventory
Build and push image / build (push) Successful in 57s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 20:32:52 -04:00
josh bc81cc8d18 Require asset ID scan in audit and consume modals
Build and push image / build (push) Successful in 47s
No default item selection — modals open with a scan prompt.
Form fields appear only after scanning an asset ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 19:34:31 -04:00
josh b5141f139d Simplify audit modal: asset ID scan only
Build and push image / build (push) Successful in 46s
Remove eyebrow header, dropdown picker, and SKU matching.
Require scanning the physical asset ID to audit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 19:25:15 -04:00
josh a82045d1bd UX overhaul: routing, accessibility, feedback, and polish
Build and push image / build (push) Successful in 50s
Add react-router-dom for URL-based navigation with browser
back/forward, deep links, and bookmarks. Replace window.confirm()
with styled ConfirmDialog. Add toast notifications and success
feedback on consume/audit/gone flows. Add escape-to-close and
focus trapping on modals. Add entrance animations for drawers,
modals, and toasts. Make grids responsive, add sortable inventory
headers, working CSV/JSON export, time-aware greeting, focus-visible
outlines, search clear button, and hover chevrons on inventory rows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 18:54:49 -04:00
josh 02dc6e523f Track inventory at the instance level, not by product
Build and push image / build (push) Successful in 46s
The products table conflated catalog ("kind of thing you scan") with
instance ("this jar I bought") — splitting it lets us record every
purchase as its own asset and autofill brand/shop/price/THC from the
last instance when scanning a known SKU.

- products: sku + strain + name + type + kind (catalog only)
- inventory_items: physical jars with short-UUID asset ids, per-batch
  brand/shop/bin/price/cannabinoids/weight, audits, lifecycle
- audits now key on inventory_id; strains lose brand_id and type
- migration: rename existing products/audits/strains to *_legacy on
  first boot so users keep historical reference, fresh start otherwise
- two-step add flow: scan SKU → select/create product → instance
  details (autofilled from last instance) → generated asset id shown
- ScanField matches asset id first, falls back to SKU
- inventory list defaults flat, "By product" toggle groups instances

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 05:59:46 -04:00
josh 027cf032be Initial commit: Apothecary v0.4.0 2026-05-03 20:19:26 -04:00