Tickets (vendor ↔ admin)
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Summary
Section titled “Summary”Vendors open tickets in vendor web at /dashboard/support. Messages on a ticket form a thread: replies show an author kind (admin, vendor, vendor_employee, or retail user) plus a display name, matching how each message is stored (user_type + user_id on the comment row).
Where to use it
Section titled “Where to use it”- Vendor: Dashboard → Support (sidebar under Organization). List, filter, create a ticket, open a ticket to read the description and discussion, and post replies. The ticket detail dialog loads the thread with
limit = 5per page (no in-list scroll),TablePaginationBarfor pagination (same pattern as other dashboard tables). While comments load the first time, skeleton rows keep the modal height stable; when changing pages or refetching after a reply, the previous messages stay visible with a light loading overlay instead of flashing back to skeletons. A slim progress bar at the top of the thread indicates send in progress. - Admin: Tickets at
/dashboard/support-tickets— List view uses status tabs + table pagination; Kanban always shows all status columns (no status-tab filter on the board; vendor/store filters use sharedFormSelectField). Each column has a capped height with an internal scroll, loads the first batch fromGET /admin/support-ticketswithstatus+ pagination, then Load more fetches the next page for that column only. Detail at/dashboard/support-tickets/:idmatches vendor discussion UX:SupportDiscussionThreadChrome, skeleton / overlay / pending bar,placeholderData,limit = 5,TablePaginationBarwith from–to / total; header shows status / priority from the ticket API plus assignee.
API (vendor JWT)
Section titled “API (vendor JWT)”All routes require Authorization: Bearer (vendor auth). Base path: /vendor/support-tickets.
| Method | Path | Purpose |
|---|---|---|
GET | /vendor/support-tickets | Paginated list (page, limit, optional status, priority, category, store_id, search). |
POST | /vendor/support-tickets | Create ticket (subject, description, optional priority, category, store_id must belong to vendor). |
GET | /vendor/support-tickets/:id | Ticket detail (vendor-scoped). |
GET | /vendor/support-tickets/:id/comments | Paginated thread: query page (default 1), limit (default 10, max 100). Comments are newest first. Response shape { data, meta: { total, page, limit, total_pages } }. |
POST | /vendor/support-tickets/:id/comments | Post reply (body). |
Admin API parity
Section titled “Admin API parity”Admin GET /admin/support-tickets/:id/comments uses the same query parameters and { data, meta } response shape as the vendor comments endpoint (newest first, server-side pagination).
Access control
Section titled “Access control”vendor-module-access: the/dashboard/supportroute is registered so owners and employees can open it (same pattern as notifications when the product wants broad access).- Data scope: list and detail only return tickets for the authenticated
vendor_id. Optionalstore_idfilter must reference a store owned by that vendor.
Operational notes
Section titled “Operational notes”- Requires database mode (
DB_ENABLED/ configured TypeORM repositories). If repositories are not wired, the API responds with 503 and a clear error code. - Ticket
statusvalues follow the shared support-ticket enum (e.g.open,in_progress,waiting,resolved,closed); vendors create tickets inopenstate.
Related
Section titled “Related”- Vendor panel overview — routing,
ROUTE_RULES, and dashboard shell. - Notifications & help settings — in-app notifications (separate from support threads).