Skip to content

User Story: Add catalog items to organization inventory #55

@GitAddRemote

Description

@GitAddRemote

Goal: As an org inventory manager, I can search the synced UEX catalog and add items to a selected organization’s inventory with a location and quantity so we can track shared assets.

Acceptance Criteria

  • Uses local UEX dataset with search by name and category filters; paginated results.
  • From results, I can pick an item, choose a location, enter quantity (decimals), and add to the currently selected org inventory (respecting manage permissions).
  • Success updates the org inventory list immediately; failures show inline errors and do not partially add.
  • If the item/location already exists, the UI clarifies whether we add as a separate row or merge/update to avoid duplicate confusion.
  • Access is restricted to users with org inventory manage permission; non-eligible users don’t see the add flow.

Technical Elaboration

  • Backend: reuse catalog search endpoint (GET /api/uex/items) on synced data only; ensure org inventory create endpoint handles duplicates (consider 409 on same orgId+gameId+uexItemId+locationId) so UI can prompt merge/update.
  • Frontend service: reuse catalog search helper and org inventory create (POST /api/orgs/:orgId/inventory with {gameId, uexItemId, locationId, quantity, notes?}); handle 409 to drive merge/update prompt (call PUT to adjust quantity if user chooses merge).
  • UI: When Org view is active, show “Add org item” CTA opening modal with catalog search, category filter, paginated results, org location selector, quantity (decimal), optional notes. On success, refresh org inventory list and close. On permission failure, show friendly denial.
  • UX: disable submit while loading; inline errors; debounce search ~300–400ms; cap page size 25/50; respect current selectedOrgId and manage-permission gate.
  • Validation: quantity > 0, location required, gameId current; clear messaging on conflicts.

Notes

  • No live UEX API calls; all from synced DB.
  • Keep flow consistent with personal add but permission-gated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend app and dashboardinventoryInventory system featuresui-uxUser interface and experienceuser-storyEnd-user facing feature story

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions