richardtekula
176d3c5fec
Refactor: Split jmap.service.js into modules and update Slovak translations
...
- Split 753-line jmap.service.js into modular structure:
- jmap/config.js: JMAP configuration functions
- jmap/client.js: Base JMAP requests (jmapRequest, getMailboxes, getIdentities)
- jmap/discovery.js: Contact discovery from JMAP
- jmap/search.js: Email search functionality
- jmap/sync.js: Email synchronization
- jmap/operations.js: Email operations (markAsRead, sendEmail)
- jmap/index.js: Re-exports for backward compatibility
- Update all imports across codebase to use new module structure
- Translate remaining English error/log messages to Slovak:
- email.service.js: JMAP validation messages
- admin.service.js: Email account creation error
- audit.service.js: Audit event logging error
- timesheet.service.js: File deletion error
- database.js: Database error message
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-05 11:11:41 +01:00
richardtekula
6f4a31e9de
Code quality improvements from code review
...
- Add admin-only authorization for company and projects CRUD operations
- Create requireAccountId middleware to eliminate code duplication
- Standardize error handling (use next(error) consistently)
- Change error messages to Slovak language
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-05 11:03:32 +01:00
richardtekula
81f75d285e
Refactor: code quality improvements
...
- Extract admin.service.js from admin.controller.js (proper layering)
- Remove console.log statements from todo.controller.js
- Fix inconsistent error handling in auth.controller.js (return next)
- Remove logger.debug calls from contact.controller.js
- Add transaction management to contact.service.js addContact()
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-05 07:25:49 +01:00
richardtekula
35dfa07668
Improve centralized error handling
2025-12-04 07:39:52 +01:00
richardtekula
ca93b6f2d2
fix email issues, add company,project,todos
2025-11-21 13:56:02 +01:00
richardtekula
bb851639b8
Add Timesheets API with file upload and role-based access
...
Backend Features:
- Timesheets database table (id, userId, fileName, filePath, fileType, fileSize, year, month, timestamps)
- File upload with multer (memory storage, 10MB limit, PDF/Excel validation)
- Structured file storage: uploads/timesheets/{userId}/{year}/{month}/
- RESTful API endpoints:
* POST /api/timesheets/upload - Upload timesheet
* GET /api/timesheets/my - Get user's timesheets (with filters)
* GET /api/timesheets/all - Get all timesheets (admin only)
* GET /api/timesheets/:id/download - Download file
* DELETE /api/timesheets/:id - Delete timesheet
- Role-based permissions: users access own files, admins access all
- Proper error handling and file cleanup on errors
- Database migration for timesheets table
Technical:
- Uses req.user.role for permission checks
- Automatic directory creation for user/year/month structure
- Blob URL cleanup and proper file handling
- Integration with existing auth middleware
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-21 08:35:30 +01:00
richardtekula
178b18baa5
Add debug logging for markContactEmailsAsRead and remove password change restriction
2025-11-20 08:00:14 +01:00
richardtekula
1e7c1eab90
option for more emails,fix jmap service,add table email accounts
2025-11-19 13:15:45 +01:00
richardtekula
da01d586fc
initialize git, basic setup for crm
2025-11-18 13:53:28 +01:00