Vladimir Tomashevskiy
052560c9b4
Refactor: Create shared AttachmentService and AttachmentModel
...
- Created common AttachmentService for all modules (app/Services/)
- Created common AttachmentModel (app/Models/)
- Created common migration (app/Database/Migrations/)
- Updated Tasks module to use shared AttachmentService
- Added Twig functions: format_filesize(), get_file_icon()
- Removed duplicate TaskAttachmentModel and task_attachments migration
- AttachmentService can be used by any module: task, deal, contact, etc.
2026-02-08 20:34:11 +00:00
Vladimir Tomashevskiy
a9976a5d85
Tasks Module Stage 3: Attachments
...
- Add migration for task_attachments table
- Create TaskAttachmentModel with file handling methods
- Add TaskService methods for upload/delete attachments
- Add API routes for attachments (upload, delete, download)
- Add controller methods for attachment operations
- Add UI section in task view with file upload form
- Add JavaScript handlers for AJAX file operations
2026-02-08 19:43:39 +00:00
Vladimir Tomashevskiy
7ebca3c762
Remove duplicate checklists functionality
...
Checklists were duplicating subtasks functionality. Removed:
- Migration for task_checklists table
- TaskChecklistModel
- Checklist methods from TaskService
- Checklist routes from Routes.php
- Checklist controller methods
- Checklist UI section from show.twig
- Checklist JavaScript functions
Updated TASKS_MODULE_ROADMAP.md
2026-02-08 19:18:19 +00:00
Vladimir Tomashevskiy
4a67f00aa7
Tasks Module Stage 3: Checklists
...
- Add migration for task_checklists table
- Create TaskChecklistModel with CRUD methods
- Add TaskService methods for checklist operations
- Add API routes for checklist endpoints
- Add controller methods for checklist CRUD
- Add UI section in task view with AJAX handlers
2026-02-08 18:40:41 +00:00
Vladimir Tomashevskiy
bf609257c3
Simplify AJAX handlers by using page reload
...
- Use location.reload() instead of DOM manipulation to avoid element lookup errors
- More reliable approach when dealing with dynamic content updates
2026-02-08 18:04:40 +00:00
Vladimir Tomashevskiy
7badf73b50
Use base.js CSRF handling approach like kanban
...
- Remove manual CSRF token handling
- Let base.js automatically add X-CSRF-TOKEN header
- Use same approach as kanban board for AJAX requests
2026-02-08 17:59:09 +00:00
Vladimir Tomashevskiy
735ebd8bd7
Fix CSRF token retrieval for AJAX requests
...
- Use getCsrfToken() function that follows same logic as base.js
- Properly retrieve CSRF token from meta tag, body data, input or cookie
2026-02-08 17:43:03 +00:00
Vladimir Tomashevskiy
a9b08bdc6e
Fix CSRF token in POST body for AJAX requests
...
- Add csrf_token parameter to fetch() body
- CodeIgniter 4 CSRF filter requires token in POST body, not just headers
2026-02-08 16:28:16 +00:00
Vladimir Tomashevskiy
e85390be84
Use base.js CSRF auto-injection for AJAX requests
...
- Remove manual CSRF handling from JavaScript
- base.js already intercepts fetch() and adds X-CSRF-TOKEN automatically
- Simplify JavaScript code for subtasks operations
2026-02-08 15:51:06 +00:00
Vladimir Tomashevskiy
f6aebd8b66
Fix CSRF token syntax in JavaScript
...
- Use Twig {{ csrf_token() }} and {{ csrf_hash() }} helpers
- Remove invalid PHP syntax from JS
- Add getCsrfData() helper function
2026-02-08 15:29:25 +00:00
Vladimir Tomashevskiy
85a920b49a
Fix CSRF token validation for consecutive AJAX requests
...
- Add CSRF token to all AJAX requests
- Fix addSubtask, toggleSubtask, deleteSubtask to include CSRF
2026-02-08 15:20:36 +00:00
Vladimir Tomashevskiy
5bf25d9505
Fix subtask form AJAX submission
...
- Add onsubmit handler to prevent default form submission
- Add addSubtask() function for AJAX form submission
- Update subtasks list dynamically after adding
- Add updateSubtasksCount() helper function
2026-02-08 15:08:42 +00:00
Vladimir Tomashevskiy
cee6c636ad
Tasks Module Stage 2: Subtasks
...
- Create task_subtasks table migration
- Create TaskSubtaskModel with CRUD operations
- Add subtask API methods: addSubtask, toggleSubtask, deleteSubtask
- Update TaskService to include subtasks in getTask()
- Add Routes for subtasks API
- Update show.twig with subtasks UI and JavaScript
2026-02-08 14:55:45 +00:00
Vladimir Tomashevskiy
d7fec7169f
Tasks Module Stage 1: RBAC + Validation + Events Fix
...
- Add canCreate/canEdit/canDelete checks in TasksController
- Add input validation in store() and update() methods
- Fix events naming: task.* (singular) instead of tasks.*
- Add CSRF validation and parameter checks for API endpoints
2026-02-08 14:03:26 +00:00
root
9b8d10bbfa
some fixes
2026-02-08 16:57:25 +03:00
root
725c62a179
start tasks module
2026-01-23 08:48:06 +03:00