fix: Resolve multiple UI and API bugs
- Remove is_active filter from get_users.php (column doesn't exist) - Fix ticket ID validation regex in upload_attachment.php (9-digit format) - Fix createSettingsModal reference to use openSettingsModal from settings.js - Add error handling for dependencies tab to prevent infinite loading - Add try-catch wrapper to ticket_dependencies.php API - Make export dropdown visible only when tickets are selected - Export only selected tickets instead of all filtered tickets Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,11 +47,16 @@ if ($conn->connect_error) {
|
||||
ResponseHelper::serverError('Database connection failed');
|
||||
}
|
||||
|
||||
$dependencyModel = new DependencyModel($conn);
|
||||
$auditLog = new AuditLogModel($conn);
|
||||
try {
|
||||
$dependencyModel = new DependencyModel($conn);
|
||||
$auditLog = new AuditLogModel($conn);
|
||||
} catch (Exception $e) {
|
||||
ResponseHelper::serverError('Failed to initialize models: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
|
||||
try {
|
||||
switch ($method) {
|
||||
case 'GET':
|
||||
// Get dependencies for a ticket
|
||||
@@ -139,5 +144,8 @@ switch ($method) {
|
||||
default:
|
||||
ResponseHelper::error('Method not allowed', 405);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
ResponseHelper::serverError('An error occurred: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
|
||||
Reference in New Issue
Block a user