Z User
|
37e976a732
|
feat: ReactBits micro components integration
Installed 6 ReactBits micro components (src/components/):
- SwipeRow: swipe-to-action cards (lead approve/reject/snooze)
- CometDial: circular dial selector (future: dashboard KPI selector)
- CodeSlots: code input slots (future: API token confirmation)
- FuseButton: fuse-animated CTA with undo window
- SlideCommit: slide-to-confirm (timesheet week lock)
- HoldButton: hold-to-confirm (contract sign, dangerous actions)
Integrated into views:
- Timesheet: SlideCommit replaces 'Woche sperren' button
- Contracts: HoldButton replaces 'E-Signatur anfordern' (hold 1.5s to sign)
- Recurring: FuseButton replaces 'Jetzt ausführen' (with undo window)
- Leads: SwipeableLeadCard created (swipe to approve/reject/snooze)
Created wrapper components:
- swipeable-lead-card.tsx: SwipeRow wrapper for lead cards
- hold-to-confirm.tsx: HoldButton wrapper with loading state
- fuse-cta.tsx: FuseButton wrapper with toast feedback
- slide-to-lock.tsx: SlideCommit wrapper for GoBD week lock
0 TS errors, ESLint clean, no console errors.
|
2026-10-28 02:36:53 +00:00 |
|
Z User
|
de6573b15e
|
feat: Invoice PDF + Beleg file upload with content-addressed storage
2 new features:
1. Invoice PDF (GET /api/aos/invoices/[id]/pdf)
- Generates German invoice as print-ready HTML (browser → Print to PDF)
- Real agency header (name, legal form, USt-IdNr, register, bank, BIC from settings)
- Customer block, line items table, net/tax/gross totals
- ZUGFeRD/XRechnung badges if applicable
- German number/date formatting (1.234,56 € / 27.10.2026)
- GoBD: no-store cache header
- 3.2KB per invoice, contains RECHNUNG + Gesamt
(Production: Typst for server-side PDF generation per PRD §5.2)
2. Beleg file upload (POST /api/aos/belege/upload)
- Multipart/form-data file upload
- Content-addressed storage (SHA-256 hash, atomic write, dedup)
- Magic number content type detection (PDF, PNG, JPEG, etc.)
- Duplicate detection (same hash → 409)
- GoBD retention (8 years for invoices, 6 for others)
- Audit-logged
- Tested: upload OK, duplicate → 409
0 TS errors, ESLint clean.
|
2026-10-28 01:24:48 +00:00 |
|
Z User
|
e45b68bb8b
|
feat: IMAP mail sync with thread-to-contact matching (PRD §6.1)
Real IMAP connection via imapflow library:
- Connects to IMAP server (IMAPFlow, TLS on port 993)
- Fetches recent messages (configurable limit, default 20)
- Extracts: from, fromEmail, subject, date, snippet (200 chars)
- Thread-to-contact matching (PRD §6.1):
1. Match sender email against persons table
2. If no person match, extract domain and match against company.website
3. Returns matchedCompany + matchedPerson for each email
- Audit-logged (action: crm.mailsync:imap)
- Zod validated (host, port, user, password, folder, limit)
- 502 on IMAP connection failure with detail
- 400 on validation failure
Tested: invalid creds → 502 'IMAP connection failed', missing host → 400
|
2026-10-27 22:50:50 +00:00 |
|
Z User
|
fa8dd46571
|
refactor: professional code quality audit
- Fix all TypeScript compilation errors (0 errors in src/)
- Add try/catch error handling to ALL API routes (38 handlers)
- Fix empty catch blocks (api-auth.ts now logs warnings)
- Add aria-labels to all icon-only buttons (WCAG 2.1 AA)
- Fix Prisma type mismatches (OR filter, Person.companyId, Estimate.projectId, Ticket.createdAt)
- Fix webhook PATCH route (moved to [id]/route.ts)
- Fix mobile-bottom-nav type safety
- Fix KB route where-clause type
- Fix test-mail banner null vs undefined
- Fix task comment fetch: add cancellation + error toast
- ESLint: 0 errors, 0 warnings
- 175 files, 24.741 lines of code
|
2026-10-27 12:23:32 +00:00 |
|