From a6451c787e70a77db21505601111f21ed8f1e7e1 Mon Sep 17 00:00:00 2001
From: Marcus Hill
Date: Fri, 27 Dec 2024 20:57:38 +0000
Subject: [PATCH] Client Portal Ticketing - Show attachments for each reply
---
portal/ticket.php | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/portal/ticket.php b/portal/ticket.php
index be0598966..0c6914e72 100644
--- a/portal/ticket.php
+++ b/portal/ticket.php
@@ -52,6 +52,13 @@
$ticket_closed_at = nullable_htmlentities($ticket_row['ticket_closed_at']);
$ticket_feedback = nullable_htmlentities($ticket_row['ticket_feedback']);
+ // Get Ticket Attachments (not associated with a specific reply)
+ $sql_ticket_attachments = mysqli_query(
+ $mysqli,
+ "SELECT * FROM ticket_attachments
+ WHERE ticket_attachment_reply_id IS NULL
+ AND ticket_attachment_ticket_id = $ticket_id"
+ );
// Get Tasks
$sql_tasks = mysqli_query( $mysqli, "SELECT * FROM tasks WHERE task_ticket_id = $ticket_id ORDER BY task_order ASC, task_id ASC");
@@ -106,6 +113,14 @@
+
+ $name | View";
+ }
+ ?>
@@ -195,6 +210,14 @@
$user_initials = initials($row['user_name']);
$avatar_link = "../uploads/users/$user_id/$user_avatar";
}
+
+ // Get attachments for this reply
+ $sql_ticket_reply_attachments = mysqli_query(
+ $mysqli,
+ "SELECT * FROM ticket_attachments
+ WHERE ticket_attachment_reply_id = $ticket_reply_id
+ AND ticket_attachment_ticket_id = $ticket_id"
+ );
?>
mb-3">
@@ -227,6 +250,14 @@
+
+
$name |
View";
+ }
+ ?>