Commit Graph

4 Commits

Author SHA1 Message Date
f46b1c31b5 feat: Add CSRF protection to assign and filter APIs
- Add CSRF validation to assign_ticket.php
- Add CSRF validation to saved_filters.php
- Supports POST, PUT, and DELETE methods

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 12:33:23 -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
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