From edf9371ffabafd620f0816ab8a983a0662edbbf4 Mon Sep 17 00:00:00 2001 From: Hugo Sampaio Date: Thu, 16 May 2024 11:00:04 -0300 Subject: [PATCH 1/3] show tasks progress bar on tickets view --- tickets.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tickets.php b/tickets.php index 14954ec4..7bd7cac0 100644 --- a/tickets.php +++ b/tickets.php @@ -395,6 +395,23 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']); $ticket_reply_created_at_time_ago = timeAgo($ticket_reply_created_at); } + + // Get Tasks + $sql_tasks = mysqli_query( $mysqli, "SELECT * FROM tasks WHERE task_ticket_id = $ticket_id ORDER BY task_created_at ASC"); + $task_count = mysqli_num_rows($sql_tasks); + // Get Completed Task Count + $sql_tasks_completed = mysqli_query($mysqli, + "SELECT * FROM tasks + WHERE task_ticket_id = $ticket_id + AND task_completed_at IS NOT NULL" + ); + $completed_task_count = mysqli_num_rows($sql_tasks_completed); + + // Tasks Completed Percent + if($task_count) { + $tasks_completed_percent = round(($completed_task_count / $task_count) * 100); + } + ?> "> From d4da95a6f17fb633b949c286ce2f3d7c8fdb14a1 Mon Sep 17 00:00:00 2001 From: Hugo Sampaio Date: Thu, 16 May 2024 11:01:34 -0300 Subject: [PATCH 2/3] show bar on html --- tickets.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tickets.php b/tickets.php index 7bd7cac0..260578a2 100644 --- a/tickets.php +++ b/tickets.php @@ -435,6 +435,12 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']); + + +
+
/
+
+ From d1aab02721d543feb3dafc9be8aa0d64f88545af Mon Sep 17 00:00:00 2001 From: Hugo Sampaio Date: Thu, 16 May 2024 11:04:25 -0300 Subject: [PATCH 3/3] tasks table header --- tickets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tickets.php b/tickets.php index 260578a2..d68420c6 100644 --- a/tickets.php +++ b/tickets.php @@ -284,7 +284,7 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']); Number - Subject + Subject / Tasks Client / Contact