feat: Enhance Gantt chart functionality with task filtering and styling improvements

This commit is contained in:
2025-04-13 01:01:59 +02:00
parent ebfc82095d
commit 6b40888d06
7 changed files with 90 additions and 23 deletions

View File

@@ -23,7 +23,7 @@ class Tasks
static public function get_tasks_gantt() {
global $mdb;
$tasks = $mdb -> query( 'SELECT t.id, t.name, t.date_start, t.date_end, t.status, t.client_id FROM tasks AS t WHERE show_in_calendar = 1 AND status != 2 ORDER BY date_start ASC' ) -> fetchAll( \PDO::FETCH_ASSOC );
$tasks = $mdb -> query( 'SELECT t.id, t.name, t.date_start, t.date_end, t.status, t.client_id FROM tasks AS t WHERE show_in_calendar = 1 AND status != 2 AND t.date_start <= DATE_ADD(NOW(), INTERVAL 1 MONTH) ORDER BY date_start ASC' ) -> fetchAll( \PDO::FETCH_ASSOC );
foreach ( $tasks as $task ) {
$task_json = [];
$task_json['name'] = $task['client_id'] ? \factory\Crm::get_client_name( (int)$task['client_id'] ) : $task['name'];