Commit Graph

27 Commits

Author SHA1 Message Date
kevin-asprec
58c01d4580 fix: mobile app bugs - payment screen, remittance isolation, invoice sorting, ticket creation
- Fix record payment screen fetching invoice directly instead of relying on collection provider
- Fix getUnremittedPayments tenant isolation (remittance tenantId filter)
- Add invoice status filter and dueDate sort support in controller/service
- Allow technicians to create tickets (role decorator fix)
- Enhance seed data with 10 more pending-installation clients and installation tickets
2026-05-06 03:13:32 +08:00
kevin-asprec
58d77fc67f fix: add missing CreateCommentDto for ticket comments 2026-05-06 02:31:03 +08:00
kevin-asprec
c14521a41d fix: add collector role to API endpoints for mobile dashboard access
Collector users were blocked from ticket, payment, invoice, and client
endpoints requiring 'technician' role. Added 'collector' to @Roles
decorators and the COLLECTOR role to the shared role hierarchy.
2026-05-06 02:15:20 +08:00
kevin-asprec
83ad0cb8d5 fix: resolve TS compilation errors for dev deployment
- Add latitude/longitude Float fields to Client model in schema.prisma
- Rewrite dashboard controller (remove duplicate const data, use getRecentActivity)
- Remove invalid files field from ticket comment create
- Add migration for client coordinates
2026-05-06 01:02:43 +08:00
kevin-asprec
469fa6bb28 feat: add more seed data - 15 clients, 15 tickets with varied statuses 2026-05-04 18:42:16 +08:00
kevin-asprec
94528841d9 fix: mark mustChangePassword migration as applied (column already exists) 2026-05-04 18:37:01 +08:00
kevin-asprec
a66fff68de fix: resolve failed mustChangePassword migration on startup 2026-05-04 18:32:00 +08:00
kevin-asprec
40f30b4a5d fix: resolve TS build errors - missing schema fields, types, and packages
- Add mustChangePassword field to User model in schema.prisma
- Add latitude/longitude fields to Client model (matching existing migration)
- Remove @nestjs/serve-static import from app.module (not in dependencies)
- Add @types/multer to devDependencies and type multer config explicitly
- Create migration for mustChangePassword column

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 17:39:01 +08:00
kevin-asprec
bb3baeb6ac fix: add missing TicketComment reverse relation on Tenant model 2026-05-04 17:16:28 +08:00
kevin-asprec
ff6295e1fc chore: trigger redeploy for comments and notifications 2026-05-04 17:11:34 +08:00
kevin-asprec
555327a891 feat: add TicketComment, TicketAttachment models + notification ticketId 2026-05-04 16:36:55 +08:00
kevin-asprec
29c6b70878 feat: add ticket comments, file attachments, mention notifications
- Comment module with CRUD and file upload via multer
- @mention parsing with user notification
- Assignment notification on ticket update
- Notification service enhanced with ticketId linking
- ServeStaticModule for uploaded files
2026-05-04 16:35:33 +08:00
kevin-asprec
d7ab370bb5 chore: sync seed with overdue invoices for new signups 2026-05-04 14:55:55 +08:00
kevin-asprec
1a0b4916d0 fix: propagate ticket location to client record on save 2026-05-04 14:52:57 +08:00
kevin-asprec
3b032ab7c4 feat: add latitude/longitude columns to tickets table 2026-05-04 14:36:51 +08:00
kevin-asprec
d792a9a9ed fix: accept optional lat/lng body in ticket resolve endpoint 2026-05-04 14:20:58 +08:00
kevin-asprec
c923285c7e feat: add latitude/longitude to ticket update endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 13:21:54 +08:00
kevin-asprec
ff0dd2e418 fix: include phone, latitude, longitude in invoice client data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 12:34:11 +08:00
kevin-asprec
a5ed2cc666 fix: include full payment details in remittance history
findRemittances used `payments: true` which returned raw RemittancePayment
join records without actual payment data. Now fetches full Payment objects
via manual join and maps them to the remittance records so the mobile app
can display client names, amounts, and invoice numbers.
2026-05-03 14:35:27 +08:00
kevin-asprec
bef320f32e feat: add RUN_SEED support and nullable tenantId migration
- New migration: make users.tenantId nullable for super_admin
- Dockerfile: RUN_SEED=true env var triggers seed after migrations
- Seed uses npx tsx (available in node_modules)
2026-04-15 06:04:57 +08:00
kevin-asprec
555bd4a9f8 fix: compile shared package as CommonJS for NestJS compatibility 2026-04-13 16:52:48 +08:00
kevin-asprec
fc704c2d23 merge: develop into main 2026-04-13 13:04:32 +08:00
kevin-asprec
1c4424f2a6 fix: set NODE_ENV=development during build for devDependencies 2026-04-13 12:36:25 +08:00
kevin-asprec
6da4cac2e7 fix: use npx -p @nestjs/cli for nest build 2026-04-13 12:14:04 +08:00
kevin-asprec
2f4323ebea fix: standalone tsconfig and Dockerfile for monorepo split 2026-04-13 12:04:24 +08:00
kevin-asprec
4a8f1e9318 initial: standalone repo from monorepo split 2026-04-13 09:36:55 +08:00
0321239266 Initial commit 2026-04-13 00:50:56 +00:00