Skip to content

Org inventory management UI #29

@GitAddRemote

Description

@GitAddRemote

User Story

As an organization member, I need a dedicated org inventory page that shows org-owned items and member-contributed items with clear ownership labeling, filtered by category and ownership type, and respects my role permissions (read-only vs. editable), so that I can manage and review my organization's collective inventory without confusion about who owns what.

Background

Updated to reflect finalized schema. Inventory is now backed by station_inventory_item with polymorphic owner_type/owner_id ownership. Org-owned rows have owner_type = 'org'. Member-contributed rows have owner_type = 'user' and is_org_available = TRUE. See docs/schema/inventory-catalog-design.md.

Definition of Done

  • Dedicated /org-inventory route and page component created
  • Page displays two labeled sections: Org-Owned and Member-Contributed
  • Ownership-type filter: All | Org-Owned | Member-Contributed — updates without page reload
  • Category filter: populated from GET /api/catalog/categories, multi-select
  • Pagination: server-side, 50 rows per page
  • Permission-aware rendering: users without canManageInventory see read-only rows
  • Org inventory summary section (aggregate totals) above the item list
  • pnpm typecheck passes

Acceptance Criteria

  • GET /api/inventory?ownerType=org&ownerOrgId=:id returns org-owned rows (owner_type='org', owner_id=:id)
  • GET /api/inventory?ownerType=user&orgId=:id&orgAvailable=true returns member-contributed rows (is_org_available=TRUE for members of the org)
  • A user in Org A cannot retrieve inventory for Org B by substituting orgId
  • Summary totals match sum of quantities for the same filters

Depends on

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend app and dashboardinventoryInventory system featuresorgsOrganization-related behaviorui-uxUser interface and experienceuser-storyEnd-user facing feature story

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions