v0.15.0 — Inventory depth (HomeBox parity) + Locations page

Rounds out Inventory toward HomeBox, and gives Locations a real home.

Inventory:
- Attach manuals, receipts, and warranty docs (any file), not just photos —
  attachment uploader now has a kind picker; WARRANTY kind added
- Richer purchase/warranty: purchasedFrom, warrantyDetails, lifetimeWarranty,
  insured (item dialog + detail facts + header badge)
- Schedule recurring maintenance from an item (creates a Task linked via
  itemId); item detail shows its maintenance with overdue flagged. Task create
  now accepts itemId/animalId

Locations:
- New Locations page + nav: browse/add/rename/move/delete the whole place tree
  (LocationManager over the existing /api/locations routes); shows plant/item
  counts per place. The spot to merge near-dupes before dropping legacy zone

Verified end-to-end against a running server (new fields round-trip, maintenance
task links to item, MANUAL attachment stored). tsc + 33 tests + build green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 00:34:07 -05:00
parent cffa739056
commit 63569aabd3
15 changed files with 481 additions and 21 deletions

View File

@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "Item" ADD COLUMN "insured" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "lifetimeWarranty" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "purchaseFrom" TEXT,
ADD COLUMN "warrantyDetails" TEXT;

View File

@@ -314,12 +314,16 @@ model Item {
containedItems Item[] @relation("ItemNesting")
// Durable attributes
value Decimal? @db.Decimal(10, 2)
purchaseDate DateTime?
warrantyExpiry DateTime?
serial String?
modelNumber String?
brand String?
value Decimal? @db.Decimal(10, 2) // purchase price
purchaseDate DateTime?
purchaseFrom String? // where it was bought
warrantyExpiry DateTime?
warrantyDetails String? // freeform warranty terms
lifetimeWarranty Boolean @default(false)
insured Boolean @default(false)
serial String?
modelNumber String?
brand String? // brand / manufacturer
// Consumable attributes (Pantry phase)
barcode String?