Fix dashboard stat tiles and add sidebar date filters
- Created Today tile: no longer limits to open statuses (count is all statuses) - Closed Today tile: filters by closed_at range, not updated_at - Add closed_from/closed_to support to TicketModel and DashboardController - Add Created/Updated/Closed date range inputs to sidebar filter panel - Apply button collects date inputs; Clear All removes them - removeFilter handles date chip removal (clears both _from and _to) - Active filter chips shown for date ranges Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,6 +121,18 @@ class TicketModel {
|
||||
$paramTypes .= 's';
|
||||
}
|
||||
|
||||
// Date range - closed_at
|
||||
if (!empty($filters['closed_from'])) {
|
||||
$whereConditions[] = "DATE(t.closed_at) >= ?";
|
||||
$params[] = $filters['closed_from'];
|
||||
$paramTypes .= 's';
|
||||
}
|
||||
if (!empty($filters['closed_to'])) {
|
||||
$whereConditions[] = "DATE(t.closed_at) <= ?";
|
||||
$params[] = $filters['closed_to'];
|
||||
$paramTypes .= 's';
|
||||
}
|
||||
|
||||
// Priority range
|
||||
if (!empty($filters['priority_min'])) {
|
||||
$whereConditions[] = "t.priority >= ?";
|
||||
|
||||
Reference in New Issue
Block a user