UX and architecture fixes: bulk-delete, template guard, statuses config
Bug fixes: - bulk-delete action called undefined bulkDelete() — wired to the existing showBulkDeleteModal() so the confirmation modal actually shows UX: - Template loader now checks for existing title/description and asks for confirmation before overwriting user-typed content - Visibility select shows a dynamic hint paragraph that updates when the user changes the selection (public/internal/confidential) Architecture: - TICKET_STATUSES added to config as single source of truth; all hardcoded ['Open','Pending','In Progress','Closed'] arrays in DashboardView now read from config; bulk-status modal in dashboard.js reads window.TICKET_STATUSES (set from PHP) with array fallback - ASSET_VERSION now auto-computed from max mtime of dashboard/ticket CSS+JS files so browsers always pick up changes on deploy; manual override still available via ASSET_VERSION in .env - Removed 10 dead standalone stat methods from StatsModel (getOpenTicketCount, getClosedTicketCount, getTicketsByPriority, etc.) — all superseded by the consolidated fetchAllStats() queries, never called externally Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -130,7 +130,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
if (typeof showBulkPriorityModal === 'function') showBulkPriorityModal();
|
||||
break;
|
||||
case 'bulk-delete':
|
||||
if (typeof bulkDelete === 'function') bulkDelete();
|
||||
showBulkDeleteModal();
|
||||
break;
|
||||
case 'clear-selection':
|
||||
clearSelection();
|
||||
@@ -760,10 +760,7 @@ function showBulkStatusModal() {
|
||||
<label for="bulkStatus">New Status:</label>
|
||||
<select id="bulkStatus" class="lt-select">
|
||||
<option value="">Select Status...</option>
|
||||
<option value="Open">Open</option>
|
||||
<option value="Pending">Pending</option>
|
||||
<option value="In Progress">In Progress</option>
|
||||
<option value="Closed">Closed</option>
|
||||
${(window.TICKET_STATUSES || ['Open','Pending','In Progress','Closed']).map(s => `<option value="${s}">${s}</option>`).join('')}
|
||||
</select>
|
||||
</div>
|
||||
<div class="lt-modal-footer">
|
||||
|
||||
Reference in New Issue
Block a user