feat: Enhance Gantt chart functionality with task filtering and styling improvements
This commit is contained in:
@@ -97,8 +97,10 @@ class Cron
|
||||
if ( in_array( 6, $task_users ) )
|
||||
$status = 6;
|
||||
|
||||
$row['show_in_calendar'] ? $show_in_calendar = 'on' : $show_in_calendar = 'off';
|
||||
|
||||
$new_task_id = \factory\Tasks::task_save(
|
||||
null, $row['id'], $row['created_by'], $row['name'], $row['text'], $new_date_start, $new_date_end, $row['project_id'], $row['client_id'], $row['pay_rate'], $row['reminders_interval'], $row['recursively'] ? 'on' : 'off', $row['frequency'], $row['period'], $task_users, $row['date_end_month_day'], $row['date_start_month_day'], null, $row['task_change_status'], true, $status, $row['show_in_calendar']
|
||||
null, $row['id'], $row['created_by'], $row['name'], $row['text'], $new_date_start, $new_date_end, $row['project_id'], $row['client_id'], $row['pay_rate'], $row['reminders_interval'], $row['recursively'] ? 'on' : 'off', $row['frequency'], $row['period'], $task_users, $row['date_end_month_day'], $row['date_start_month_day'], null, $row['task_change_status'], true, $status, $show_in_calendar
|
||||
);
|
||||
|
||||
if ( $new_task_id ) {
|
||||
|
||||
@@ -95,7 +95,8 @@ class Tasks
|
||||
'user' => $user,
|
||||
'statuses' => \factory\Tasks::get_statuses(),
|
||||
'open_task_id' => $open_task_id
|
||||
] )
|
||||
] ),
|
||||
'tasks_gantt' => \factory\Tasks::get_tasks_gantt(),
|
||||
] );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user