Skip to content

Add Create Inventory form for properties and tax lots#71

Open
nllong wants to merge 1 commit into
mainfrom
inventory-create-form
Open

Add Create Inventory form for properties and tax lots#71
nllong wants to merge 1 commit into
mainfrom
inventory-create-form

Conversation

@nllong

@nllong nllong commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

Ports the legacy AngularJS "Create Inventory" form (create a Property or Tax Lot, optionally linking a related record) into a standalone InventoryCreateComponent at /{properties|taxlots}/create. Frontend-only — it calls the backend form_create endpoints that already exist in SEED-platform/seed.

Changes

  • InventoryService.createInventory()POST /api/v3/${type}/form_create/ with organization_id + optional related_view_id; centralized ErrorService handling. New InventoryFormCreateState/Data + FormCreateResponse types.
  • InventoryCreateComponent (standalone) — access level / level instance / cycle selectors; a column-rows table with Material autocomplete over all columns; All Canonical Fields / All Extra Data Fields / Reset / Add Column; column list profile select; live validation (cycle + ALI required, no duplicate display names, ≥1 matching-criteria value per present table); unknown typed names become extra_data string columns.
  • Save flow — confirm dialog, then POST primary and (if the related record has data) POST the related with related_view_id. Property lot_number is linked to taxlot jurisdiction_tax_lot_id.
  • Route + navcreate route registered before :id; "Create Property" and "Create Tax Lot" navigation entries.
  • i18n — all user-facing strings go through Transloco; new keys added to public/i18n/en_US.json.

Design note

The legacy post-save "success modal that offers to view the record" is replaced with a success snackbar + automatic navigation to /{type}/{view_id} (idiomatic SPA). The pre-save confirm dialog is kept. A null view_id (duplicate/merge) shows an info snackbar and does not navigate.

Backend dependency

Requires the form_create endpoints from SEED-platform/seed#4918 (branch 4846-create-property-form). To test, run a backend on that branch and point the dev proxy at it via SEED_HOST in .env.

Verification

pnpm lint (eslint + prettier + stylelint) and pnpm build pass.

Port the legacy AngularJS "Create Inventory" form into a standalone
InventoryCreateComponent at /{properties|taxlots}/create.

- Add InventoryService.createInventory() calling POST
  /api/v3/{type}/form_create/ with organization_id + optional
  related_view_id, plus request/response types.
- Standalone form: access level / instance / cycle selectors, a
  column-rows table with Material autocomplete over all columns,
  All Canonical / All Extra Data / Reset / Add Column, profile select,
  live validation, confirm dialog, success snackbar + navigation.
- Link property lot_number to taxlot jurisdiction_tax_lot_id; POST
  primary then related with related_view_id.
- Wire the create route (before :id) and Create Property / Create Tax
  Lot nav entries. All user-facing strings via Transloco.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant