Commit Graph

15 Commits

Author SHA1 Message Date
fa9d9dfe0f feat: Add CSRF protection to critical API endpoints
- Add CSRF validation to update_ticket.php
- Add CSRF validation to add_comment.php
- Add CSRF validation to bulk_operation.php
- All POST/PUT requests now require valid CSRF token

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 12:32:34 -05:00
962724d811 better filtering and searching 2026-01-09 11:20:27 -05:00
b781a44ed5 Added settings menu 2026-01-08 23:05:03 -05:00
d27b61c56d No discord send on status update 2026-01-08 13:11:41 -05:00
2086730c9b Fix: Critical API and dark mode issues
Fixed multiple critical issues reported by user:

1. **API Configuration Errors:**
   - Fixed all API files to use correct config path (config/config.php instead of config/db.php)
   - Fixed: get_users.php (bulk assign dropdown now loads users)
   - Fixed: get_template.php (templates now load correctly)
   - Fixed: bulk_operation.php (bulk operations now work)
   - Fixed: assign_ticket.php (manual assignment now works)

2. **Dark Mode Improvements:**
   - Added dark mode support for Activity tab content
   - Ensured proper text and background colors in dark mode

All APIs now properly:
- Load configuration from config/config.php
- Use correct session variables ($_SESSION['user']['user_id'])
- Create and close database connections properly
- Return proper JSON responses

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 19:18:57 -05:00
47775e19c7 Fix: Resolve ticket assignment JSON error
Fixed critical bug in assign_ticket.php that was causing JSON parsing errors:

- Fixed authentication check to use correct session variable ($_SESSION['user']['user_id'])
- Added missing database connection initialization
- Added proper connection cleanup (close)
- Updated all references to use correct session variable
- Changed require paths to use dirname(__DIR__) for consistency

This resolves the "Failed to execute 'json' on 'Response': Unexpected end of JSON input" error that occurred when assigning tickets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 19:07:56 -05:00
ac094c8706 Feature 5: Implement Bulk Actions (Admin Only)
Add comprehensive bulk operations system for admins:

- Created BulkOperationsModel.php with operation tracking and processing
- Added bulk_operation.php API endpoint for bulk operations
- Created get_users.php API endpoint for user dropdown in bulk assign
- Updated DashboardView.php with checkboxes and bulk actions toolbar
- Added JavaScript functions for:
  - Select all/clear selection
  - Bulk close tickets
  - Bulk assign tickets
  - Bulk change priority
- Added comprehensive CSS for bulk actions toolbar and modals
- All bulk operations are admin-only (enforced server-side)
- Operations tracked in bulk_operations table with audit logging
- Supports bulk_close, bulk_assign, and bulk_priority operations

Admins can now select multiple tickets and perform batch operations, significantly improving workflow efficiency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 19:06:33 -05:00
353ce83a36 Feature 4: Implement Ticket Templates
Add ticket template system for quick ticket creation:

- Created TemplateModel.php with full CRUD operations for templates
- Added get_template.php API endpoint to fetch template data
- Updated TicketController to load templates in create() method
- Modified CreateTicketView.php to include template selector dropdown
- Added loadTemplate() JavaScript function to populate form fields
- Templates include: title, description, category, type, and default priority
- Database already seeded with default templates (Hardware Failure, Software Installation, Network Issue, Maintenance Request)

Users can now select from predefined templates when creating tickets, speeding up common ticket creation workflows.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 19:00:42 -05:00
683420cdb9 Feature 3: Implement Status Transitions with Workflow Validation
Add comprehensive workflow management system for ticket status transitions:

- Created WorkflowModel.php for managing status transition rules
- Updated TicketController.php to load allowed transitions for each ticket
- Modified TicketView.php to display dynamic status dropdown with only allowed transitions
- Enhanced api/update_ticket.php with server-side workflow validation
- Added updateTicketStatus() JavaScript function for client-side status changes
- Included CSS styling for status select dropdown with color-coded states
- Transitions can require comments or admin privileges
- Status changes are validated against status_transitions table

This feature enforces proper ticket workflows and prevents invalid status changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 18:57:23 -05:00
99e60795c9 Add Ticket Assignment feature (Feature 2)
- Add assigned_to column support in TicketModel with assignTicket() and unassignTicket() methods
- Create assign_ticket.php API endpoint for assignment operations
- Update TicketController to load user list from UserModel
- Add assignment dropdown UI in TicketView
- Add JavaScript handler for assignment changes
- Integrate with audit log for assignment tracking

Users can now assign tickets to team members via dropdown selector.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 18:36:34 -05:00
bfac062dd3 discord webhook fix 2026-01-01 16:40:04 -05:00
b8a0fb011f Username not live updating & css overlap bug 2026-01-01 16:14:56 -05:00
7b25ec1dd1 SSO Update :) 2026-01-01 15:40:32 -05:00
e05434137c Fixed MAJOR bugs, currently at a semi-stable state 2025-09-05 11:08:56 -04:00
f8ada1d6d1 Re-did everything, Now is modulaar and better bro. 2025-05-16 20:02:49 -04:00