Commit Graph

71 Commits

Author SHA1 Message Date
Frudrax Cheng d99c91533c chore: rename dashboard 2026-06-06 14:04:00 +08:00
Frudrax Cheng c4b005adb8 feat: update project order types 2026-06-06 13:58:53 +08:00
Frudrax Cheng 15a9f80b7f feat: restrict permission roles 2026-06-06 13:50:54 +08:00
Frudrax Cheng 2892cfb93d chore: rename permission module 2026-06-06 13:36:48 +08:00
Frudrax Cheng 2d24be0c2a fix: read dashboard stats response 2026-06-05 18:04:23 +08:00
Frudrax Cheng 8f9d3653c8 refactor: remove company management 2026-06-05 18:00:06 +08:00
Frudrax Cheng b39cb86e70 style: compact product trace actions 2026-06-05 17:43:05 +08:00
Frudrax Cheng a693f249a6 style: refine product trace UI 2026-06-05 17:40:13 +08:00
Frudrax Cheng fe8bfe3580 fix: localize date picker calendar 2026-06-05 17:31:32 +08:00
Frudrax Cheng bdd5c65091 style: use date picker for manufacture date 2026-06-05 17:28:27 +08:00
Frudrax Cheng 79ce72f8ea feat: add product trace UI 2026-06-05 17:21:14 +08:00
Frudrax Cheng da11bce1fa style: refine project electronic form 2026-06-04 11:13:29 +08:00
Frudrax Cheng 4208c199b4 style: add project completion action spacing 2026-06-04 10:43:34 +08:00
Frudrax Cheng 8727172be3 style: update project order menu icon 2026-06-04 10:36:36 +08:00
Frudrax Cheng fbd7e063a1 style: improve project order signature input 2026-06-04 10:34:23 +08:00
Frudrax Cheng d8d305c051 feat: add project work order UI 2026-06-04 10:26:05 +08:00
Frudrax Cheng eafe55bef9 Move site images above signatures 2026-06-02 11:25:40 +08:00
Frudrax Cheng b990980490 Show site images only in aftersales detail 2026-06-02 11:23:04 +08:00
Frudrax Cheng 0e05568c7a Compress site images before upload 2026-06-02 11:18:10 +08:00
Frudrax Cheng 2bf43ac3e3 Fix Safari site image upload headers 2026-06-02 11:10:57 +08:00
Frudrax Cheng a19204d4b5 Upload site images during aftersales confirmation 2026-06-02 11:04:38 +08:00
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