Vendors (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”Vendors covers onboarding and lifecycle: list with inline store hooks, create full page, detail/edit. Tied to stores and zones for multi-tenant operations.
Goals and non-goals
Section titled “Goals and non-goals”| Goals | Non-goals |
|---|---|
| Register and maintain vendor accounts | Replace contract/legal onboarding |
| Tie vendors to stores for operations | Document payment settlement with acquirer |
Current platform behavior
Section titled “Current platform behavior”- Routes: list, create,
:id,:id/edit(see table). - Stat tiles may be partial—see list section for live vs placeholder.
Sequence: happy path
Section titled “Sequence: happy path”- Create vendor → fill legal/business fields → save.
- Attach or verify stores from list inline actions.
- Assign or change a platform package from list actions.
- Open detail for audit trail and contacts.
- Check overview package card to confirm active package window.
Security and operations
Section titled “Security and operations”- KYB/PII — restrict exports; align with legal retention.
- Offboarding: disable vendor + unlink stores per runbook.
Test scenarios (UAT / QA)
Section titled “Test scenarios (UAT / QA)”| ID | Scenario | Expected |
|---|---|---|
| VN1 | Create vendor | Appears in list |
| VN2 | Inline store action | Store association updates |
| VN3 | Zone admin | Cannot see other zones |
| VN4 | Assign package | Vendor gets new active platform package |
Routes
Section titled “Routes”| Path | Purpose |
|---|---|
/dashboard/vendors | Vendor list and inline store management |
/dashboard/vendors/create | Create vendor (full page form) |
/dashboard/vendors/:id | Vendor detail |
/dashboard/vendors/:id/edit | Edit vendor |
- Search — debounced (400ms), pagination size 10.
- Stats row — placeholder values (—) in the current UI for total / active / inactive / new (labels are i18n-backed).
- Vendor modals — create/edit via
VendorFormModal; delete viaDeleteVendorModal. - Deep link —
?edit=<vendorId>opens the edit modal when the list loads. - Stores per vendor — Add / edit / delete store modals (
AddStoreModal,EditStoreModal,DeleteStoreModal) for the selected vendor. - Package assignment — Assign package action opens a modal of active platform packages and calls
PATCH /admin/vendors/:id/membership-package. If an open platform package exists, it is canceled and replaced.
Detail overview
Section titled “Detail overview”- Package block — Overview now shows the active package (
name/code), effective window (starts_at→ends_at), and duration days. - Source API —
GET /admin/vendors/:id/membership-packagereturns the current open platform package (ornullif none).
Customer membership products (admin assist)
Section titled “Customer membership products (admin assist)”GET /admin/vendors/:id/customer-membership-products— lists activevendor_customeraudience membership products for picking membership lines on Admin → Orders → Create (optionalstore_idquery narrows plans scoped to that store). Matches vendor POS membership-picker filtering.
Vendor accounts power which stores exist under a tenant; vendor staff use the separate vendor web app. Operational lifecycle (invite, suspend) follows your backend and business rules; the UI exposes list and CRUD affordances above.