Commit Graph

50 Commits

Author SHA1 Message Date
Frudrax Cheng 99d8e87727 Add completion time to aftersales form 2026-06-02 10:48:10 +08:00
Frudrax Cheng aa99e17119 Align aftersales form signatures inline 2026-06-02 10:44:13 +08:00
Frudrax Cheng 30e3ac67d2 Require dual signatures for aftersales confirmation 2026-06-02 10:38:40 +08:00
Frudrax Cheng d216a25364 Refine aftersales form labels and signature 2026-06-02 10:29:45 +08:00
Frudrax Cheng cb88f18166 Update aftersales electronic form layout 2026-06-02 10:24:40 +08:00
Frudrax Cheng 31df505735 Update aftersales confirmation labels 2026-06-02 10:14:13 +08:00
Frudrax Cheng 345ed223e2 Simplify aftersales electronic form title 2026-05-29 10:07:22 +08:00
Frudrax Cheng 421bab087c Show only QR code in electronic form header 2026-05-29 10:04:57 +08:00
Frudrax Cheng aaf5fc6911 Add QR code to aftersales electronic form 2026-05-29 10:01:22 +08:00
Frudrax Cheng 6067e8621a Add aftersales electronic order form 2026-05-29 09:53:46 +08:00
Frudrax Cheng 78cec2c65d Constrain archived signature display height 2026-05-28 10:48:36 +08:00
Frudrax Cheng 7747995b3f Allow portrait signature confirmation 2026-05-28 10:45:14 +08:00
Frudrax Cheng 2a614851db Improve Android signature orientation detection 2026-05-28 10:39:29 +08:00
Frudrax Cheng 0f4ec91dc1 Move employee QR action to operations column 2026-05-28 10:33:31 +08:00
Frudrax Cheng 79b1287932 Document aftersales company boundary 2026-05-28 10:29:24 +08:00
Frudrax Cheng 06da68e41b Add employee serial QR query support 2026-05-28 10:24:49 +08:00
Frudrax Cheng b9bc8f5419 Refactor employee management 2026-05-28 10:05:56 +08:00
Frudrax Cheng 8b930ff44d fix: improve Android orientation detection in signature overlay 2026-05-28 09:42:31 +08:00
Frudrax Cheng 04b4ed5884 feat: unify employee management with inline code assignment 2026-05-28 09:40:22 +08:00
Frudrax Cheng fe784f9e2b feat: merge account management into employee page 2026-05-28 09:30:30 +08:00
Frudrax Cheng aace7ef6e5 docs: align aftersales README and AGENTS conventions 2026-05-28 09:15:34 +08:00
Frudrax Cheng 2262b39d04 feat: update aftersales labels and service type options 2026-05-28 09:13:04 +08:00
Frudrax Cheng 0f6d4a5f07 Use real device rotation for signature overlay
CSS transform: rotate(90deg) only rotates the visual; pointer events
still fire in the unrotated viewport coordinate system, and
canvas.getBoundingClientRect returns the rotated bounding box with
swapped width/height. signature_pad computed stroke positions from
clientX/clientY minus that swapped rect, so most strokes landed
outside the canvas drawing buffer. The brief flash of marks visible
when the phone was rotated back to portrait was the small fraction of
points that happened to land inside the canvas, revealed once the CSS
rotation was undone.

Drop the CSS fake-landscape and gate the signature pad behind real
device orientation: portrait shows a rotate-your-phone prompt, and
the pad only renders in landscape where the coordinate system is
clean. Attempt screen.orientation.lock('landscape') where supported;
iOS users with portrait lock see the prompt with a hint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 09:17:56 +08:00
Frudrax Cheng ab5acbc452 Open signature in a landscape overlay and fix mobile touch
The inline signature pad on the confirm page was unusable on phones:
the canvas had a fixed 480px internal width but shrank via max-width
on small screens, so pointer coordinates landed in only the top-left
fraction of the drawing buffer. Edge-of-screen strokes also collided
with iOS Safari back-swipe.

Tapping the new signature trigger now opens a full-screen overlay
that rotates to landscape (via 100dvh/100dvw + CSS rotate on portrait
phones, plus an opportunistic screen.orientation.lock) so customers
get the widest possible signing area, away from the system edge.

Also swap the hand-rolled drawing logic for signature_pad, with a
ResizeObserver-driven resize that preserves strokes via
toData/fromData and scales the canvas to devicePixelRatio.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 09:11:05 +08:00
Frudrax Cheng 1d944b0fd3 Replace phone verification with canvas signature on confirm page
Adds a canvas-based SignaturePad component used on the customer
confirm page. Authorize now requires a non-empty signature; reject
opens a required reason modal. The archived signature is shown to
the customer after confirming and on the admin detail page.

Also fixes the confirm page being clipped at the top when its
content exceeds the viewport: the public layout used
height:100vh + overflow:hidden which cropped the centered card.
Switched to min-height:100vh so tall content can scroll naturally.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 18:02:18 +08:00
Frudrax Cheng f61004ba12 Show aftersales stats and recent orders on dashboard
- Adds a second row of cards (total / pending / closed / rejected)
- New "最近售后工单" table linking to detail pages
- DashboardStats type extended; dashboardApi maps backend overview

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 11:04:25 +08:00
Frudrax Cheng eab66bc3e9 Add user management page and technician picker for reassign
- New /admin/users page (admin only) for creating technicians,
  editing role/email, resetting passwords, deleting users
- AftersalesDetail reassign modal now uses a searchable Select
  populated from /api/users/assignable instead of raw user ID input
- Menu entry only shown to admins

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 10:58:02 +08:00
Frudrax Cheng 6fef517556 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>
2026-05-26 10:51:25 +08:00
cynosura 11f3eda668 Change department to position 2026-03-02 14:02:16 +08:00
cynosura 76d5cdf542 Remove Generate.tsx 2026-03-02 13:36:21 +08:00
cynosura 54d6b31da6 Update package.json 2026-03-02 13:01:05 +08:00
cynosura 76ea5a2e06 Add employee code assignment function 2026-03-02 12:58:05 +08:00
cynosura d2dac6091e add AGENTS.md 2026-02-12 19:33:57 +08:00
cynosura ff767837e7 fix package.json 2026-02-07 17:06:29 +08:00
cynosura 2a3399d436 fix typo 2026-02-07 16:40:07 +08:00
cynosura a93a90ff2d update package.json 2026-02-07 16:34:20 +08:00
cynosura bef7416ecb chore: update package.json dependencies 2026-02-07 01:44:11 +08:00
cynosura b76ef06c62 style: enhance visual hierarchy of Profile page components 2026-02-06 21:39:28 +08:00
cynosura e5b391f7b7 style(ui): polish Profile page layout and user info display 2026-02-06 21:23:13 +08:00
cynosura 9c1e923336 perf(vite): implement manual chunks for vendor code splitting 2026-02-06 21:01:14 +08:00
cynosura a0871524ac style: polish overall user interface and layout 2026-02-06 20:59:28 +08:00
cynosura b94e7f42a4 fix: fix typo in PrivateRoute component name 2026-02-06 17:21:29 +08:00
cynosura cecedb2843 perf(auth): eliminate login page flicker by moving session check to App.tsx 2026-02-06 17:13:22 +08:00
cynosura 205b8925b4 fix(auth): improve login error feedback for better UX 2026-02-06 17:04:05 +08:00
cynosura aa81871cfe fix(auth): improve login error feedback for better UX 2026-02-06 16:58:12 +08:00
cynosura a506ebfccd fix: add error feedback for failed login attempts 2026-02-06 16:53:17 +08:00
cynosura 18803d07be feat: improve user interface layout for better accessibility 2026-02-06 16:18:54 +08:00
cynosura a7dd3e49a9 feat: improve user interface layout for better accessibility 2026-02-06 15:40:26 +08:00
cynosura 9961b9f87a chore: add .npmrc 2026-02-06 15:05:09 +08:00
cynosura 5fc7b33b3b Initial commit 2026-02-06 14:06:49 +08:00