Commit Graph

5 Commits

Author SHA1 Message Date
Frudrax Cheng 1ebec18869 Add responsible signature to aftersales confirmation 2026-06-02 10:38:29 +08:00
Frudrax Cheng d1d189528c Decouple aftersales customers from company management 2026-05-28 10:29:17 +08:00
Frudrax Cheng da02be0a4f feat: update aftersales service types and serial format 2026-05-28 09:13:02 +08:00
Frudrax Cheng 6a48b0624f Replace phone last-4 verification with customer signature
Customer now signs on the confirm page instead of inputting the last
4 digits of their phone. Signature is stored as a base64 PNG dataURL
on the work order and shown back to the customer plus archived for
admin review. Reject still bypasses signature but now requires a
reason.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 18:02:04 +08:00
Frudrax Cheng 128bb7cda6 Add aftersales stats to dashboard and service-layer tests
- CompanyStatsOverviewDTO and GetStats() now include aftersales counts
  (total, pending confirmation, closed, rejected) and a recentAftersales list
- aftersales_service_test.go covers YYMMNN sequence, owner-only submit,
  state machine, phone last-4 check, reject increment, force-close
- users_service_test.go covers duplicate username, self-demotion guard,
  last-admin guard, password reset, assignable filter

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 11:04:23 +08:00