Suppliers (Admin)
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Executive summary
Section titled “Executive summary”Suppliers supports searchable list, overview stats, modal create/edit, and detail with catalog/inventory context links. Debounced search and pagination match other admin tables.
Goals and non-goals
Section titled “Goals and non-goals”| Goals | Non-goals |
|---|---|
| Maintain supplier master data | Run procurement approvals inside this UI |
| Quick create/edit from list | Replace ERP supplier sync |
Current platform behavior
Section titled “Current platform behavior”- 400ms debounced search; 10 rows/page; overview from
fetchAdminSuppliersOverviewwhere wired.
Sequence: happy path
Section titled “Sequence: happy path”- Open Suppliers → search → open row or create in modal.
- Save → verify in list and detail.
Security and operations
Section titled “Security and operations”- Supplier contacts may be sensitive—restrict exports and shared logins.
Test scenarios (UAT / QA)
Section titled “Test scenarios (UAT / QA)”| ID | Scenario | Expected |
|---|---|---|
| SP1 | Search | Debounced; list updates |
| SP2 | Create | Modal save → row appears |
| SP3 | Detail | Related context loads |
Routes
Section titled “Routes”| Path | Purpose |
|---|---|
/dashboard/suppliers | Searchable list, overview stats, create/edit in a modal |
/dashboard/suppliers/:id | Supplier detail (related catalog and inventory context) |
- Search — debounced (400ms), resets pagination to page 1.
- Pagination — 10 rows per page; overview stats: total/active suppliers, total purchased, outstanding to suppliers (with overdue sub-line when applicable); data table with actions.
- Create / edit —
SupplierModalopens from the toolbar; editing pre-fills from the selected row. - Delete — confirmation dialog, then
deleteAdminSupplier; success toast and query invalidation.
Product catalog screens can also reference suppliers when configuring items; the supplier detail route aggregates supplier metadata plus related lists (for example products and lots) as implemented in detail.tsx.
Detail
Section titled “Detail”Use the detail Overview tab for item/lot counts, purchase totals, outstanding balance, and overdue debt (unpaid lots with a purchase date before today), plus supplier metadata and catalog link count.