-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
backendBackend services and logicBackend services and logicinventoryInventory system featuresInventory system featurestech-storyTechnical implementation storyTechnical implementation story
Description
Goal: Provide reusable catalog search/select plumbing (API + UI component) backed by our synced UEX data so inventory add flows can use it without live UEX calls.
Acceptance Criteria
- API endpoint (or confirm existing) to query synced UEX items with search, category filter, pagination; returns identifiers/names/category, and any metadata needed for inventory creation.
- Frontend service helper for catalog search that both personal and org inventory flows can call.
- Reusable UI selector component to search/paginate the catalog and return the chosen item (no live UEX requests).
- Handles large result sets efficiently (pagination + debounce), with error states surfaced.
- Includes basic tests (API/service/component) for search, pagination, and selection wiring.
Technical Elaboration
- Backend: add or confirm
GET /api/uex/itemsthat queries synced tables with ILIKE search on name, category filter, limit/offset (cap to 100), default sort by name asc; return{items, total, limit, offset}withuexId,name,categoryId,categoryName(and any needed metadata for inventory creation). Add indexes as needed (name search, category). - Frontend service: add
searchCataloghelper (newuex.service.tsor extend inventory service) with params{search?, categoryId?, limit?, offset?}and debounced usage. - UI component: build
CatalogPicker(modal-friendly) that renders search box, category select, paginated results list; exposesonSelect(item); shows loading/error states; configurable page size. Backed by the service helper and debounce (300–400ms). - Hook: optional
useCatalogSearchto encapsulate search/filters/pagination state for reuse by personal/org add modals. - Testing: backend unit/integration for search/filter/pagination; frontend unit for service (axios mocked) and component behavior (debounce, pagination, selection).
Notes
- Designed to be shared by issues 54/55 add flows; no live UEX calls.
Metadata
Metadata
Assignees
Labels
backendBackend services and logicBackend services and logicinventoryInventory system featuresInventory system featurestech-storyTechnical implementation storyTechnical implementation story