Add aftersales work order frontend pages
- Public scan-to-confirm page (/aftersales/:sn) with phone last-4 verification - Admin list + detail pages with state machine, QR generation, reassign, force-close - PublicLayout extracted from PublicQuery so both pages share logo + 备案 chrome - PublicQuery auto-redirects scanned zjbf-sh-* serials to the aftersales page - AdminLayout: new 售后工单 menu entry Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,8 @@ src/
|
||||
- `serialApi` - Serial number management
|
||||
- `companyApi` - Company management
|
||||
- `dashboardApi` - Dashboard statistics
|
||||
- `employeeSerialApi` - Employee serial management
|
||||
- `aftersalesApi` - Aftersales work orders (admin + public)
|
||||
- Auth token automatically added via axios interceptor
|
||||
- All API calls return typed responses based on `src/types/index.ts`
|
||||
|
||||
@@ -97,6 +99,9 @@ src/
|
||||
- Admin pages wrapped with `<AdminRoutes>` layout component
|
||||
- Use `useNavigate()` for programmatic navigation
|
||||
- Use `useLocation()` to get current path
|
||||
- Public routes (no auth): `/login`, `/query`, `/aftersales/:serialNumber`
|
||||
- `PublicQuery` auto-redirects scanned `zjbf-sh-*` serials to `/aftersales/:serialNumber`
|
||||
- Shared public-page chrome (logo + 备案 footer) lives in `components/PublicLayout.tsx`
|
||||
|
||||
### State Management
|
||||
- Use React hooks (`useState`, `useEffect`) for local component state
|
||||
|
||||
Reference in New Issue
Block a user