Commit Graph

5 Commits

Author SHA1 Message Date
richardtekula
12acd68156 refactor: Move course dates from registracie to kurzy table
- Add datumOd and datumDo columns to kurzy table
- Remove datumOd, datumDo, pocetUcastnikov from registracie table
- Update schema, validators, and services accordingly
- Certificate generation now uses course dates
- Migration preserves existing data by copying most recent dates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:52:56 +01:00
richardtekula
2fee1f39bc refactor: Extract certificate template to separate file with template selection
- Move HTML template to src/templates/certificates/AIcertifikat.html
- Add template rendering with {{variable}} and {{#if}} syntax
- Add CERTIFICATE_TEMPLATES registry for multiple templates
- Accept templateName parameter in generateCertificate
- Add hasCertificate check to prevent duplicate certificates
- Add hasCertificate field to getCombinedTableData query

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:24:14 +01:00
richardtekula
225936e64a feat: Team leader role permissions, certificate generation, and bug fixes
- Add team_leader access to /admin/users endpoint for user list viewing
- Add PDF certificate generation for AI Kurzy with Puppeteer
- Add certificate assets (background, signatures)
- Add getPrilohaById and download endpoint for attachments
- Fix time tracking service permissions for team_leader
- Fix timesheet controller/service permissions for team_leader
- Fix calendar badge to include reminders in count
- Add lastSeen to message service for online indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:58:42 +01:00
richardtekula
a4a81ef88e feat: Multi-feature CRM update
- Add team_leader role with appropriate permissions
- Add lastSeen timestamp for chat online indicator
- Add needsFollowup flag to ucastnici table
- Add getTodayCalendarCount endpoint for calendar badge
- Add company reminders to calendar data
- Enhance company search to include phone and contacts
- Update routes to allow team_leader access to kurzy, services, timesheets

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:23:57 +01:00
richardtekula
57e6a2ea45 refactor: Split ai-kurzy.service.js into domain-specific files
Split 445-line monolith into:
- ai-kurzy/kurzy.service.js: course CRUD + stats
- ai-kurzy/ucastnici.service.js: participant CRUD
- ai-kurzy/registracie.service.js: registration CRUD, combined table,
  field updates, and document (prilohy) operations

Original ai-kurzy.service.js becomes a barrel export preserving all
existing import paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 07:43:32 +01:00