From f25ce7e51fee23206f648051512e4339d4ce5956 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Sat, 27 Sep 2025 12:16:45 +0530 Subject: [PATCH 1/4] CHANGE_thz as per another module --- app/Controllers/ThzController.php | 8 +- app/Views/layout/header.php | 25 +-- app/Views/thz_list.php | 44 ++--- app/Views/thz_notes.php | 307 +++++++++++++++--------------- 4 files changed, 187 insertions(+), 197 deletions(-) diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 8a61a1cc..070b01ab 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -137,8 +137,6 @@ class ThzController extends BaseController public function ticketList() { - $data['tab_name'] = "Tickets"; - $data['page_name'] = "Tickets"; try { $returnType = strtolower($this->request->getGet('return_type') ?? 'api'); @@ -166,7 +164,8 @@ class ThzController extends BaseController // 3,4 remain person varannum. $data['client_list'] = $this->clientModel->getCreatedByUserName(); $data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); - + $data['tab_name'] = "Tickets"; + $data['page_name'] = "Tickets"; return $this->loadLayout('thz_list', $data); } @@ -361,6 +360,9 @@ class ThzController extends BaseController $result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : ''; $result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); + + $result['tab_name'] = "Tickets"; + $result['page_name'] = "Tickets"; return $this->loadLayout('thz_notes', $result); } diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 148d73c4..2c987813 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -445,23 +445,16 @@ font-size: 12px; } - - .title-text { - font-weight: 500; - font-style: normal; - font-size: 30px; - line-height: 1; - letter-spacing: 0; - color: black; + .secondary-title { + margin-left: 26px; + display: flex; + align-items: center; } - - .sub-title-text { - font-weight: 500; - font-style: normal; - font-size: 18px; - line-height: 1; - letter-spacing: 0; - color: black; + .secondary-title i { + font-size: 43px; + } + .secondary-title span { + position: relative; } .font-color-black { diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index 7df537c2..cce3adf7 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -16,11 +16,6 @@ table.dataTable tbody td { position: absolute; } -.highlight { - border: 2px solid red; - background-color: #ffe6e6; -} - .column-header { margin-right: 10px; } @@ -31,8 +26,6 @@ table.dataTable tbody td { padding: 0.5rem 1rem; } -/* Modeal class */ - - -
@@ -85,8 +76,8 @@ table.dataTable tbody td { 50) - ? htmlspecialchars(substr($subject, 0, 50)) . "..." + echo (strlen($subject) > 18) + ? htmlspecialchars(substr($subject, 0, 18)) . "..." : htmlspecialchars($subject); ?> @@ -350,17 +341,6 @@ table.dataTable tbody td { text: ' CSV ', className: 'app-btn-primary ', title: 'Tickets', - exportOptions: { - format: { - body: function (data, row, column, node) { - // Replace
with a space - data = data.replace(//gi, " "); - // Remove any other HTML tags - data = data.replace(/<[^>]*>?/gm, ""); - return data.trim(); - } - } - } }, { extend: 'excel', @@ -428,10 +408,10 @@ table.dataTable tbody td { var ticketType = document.getElementById('ticket_type').value.trim(); // Validation checks - if (name === "" || mobile === "" || email === "" || ticketType === "") { - toastr.warning('Please fill all required fields.', 'Warning'); - form.classList.add('was-validated'); - return; + if (message.length === 0) { + toastr.error('Message cannot be empty', 'Warning'); + form.classList.add('was-validated'); + return; } if (message.length > 1500) { @@ -440,6 +420,12 @@ table.dataTable tbody td { return; } + if (subject.length === 0) { + toastr.error('Subject cannot be empty', 'Warning'); + form.classList.add('was-validated'); + return; + } + if (subject.length > 150) { toastr.error('Subject cannot exceed 150 characters', 'Warning'); form.classList.add('was-validated'); @@ -460,6 +446,12 @@ table.dataTable tbody td { return; } + if (name === "" || mobile === "" || email === "" || ticketType === "" || subject === "" || message === "") { + toastr.warning('Please fill all required fields.', 'Warning'); + form.classList.add('was-validated'); + return; + } + var form = document.getElementById("ticketForm"); // your form ID var formData = new FormData(form); diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index 4da6b2e0..b3d26b07 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -1,5 +1,4 @@ +
+

+ + + + Ticket ID - +

-
-
-
- - -
- -

- - - - Ticket ID- -

-
- - -
- - -
-
-
-

Details

- - - - - - -
-
-
-
Ticket ID
-
+
+
+
+
+ +
+
+
+

Details

+ + + + + +
-
-
Name
-
-
-
-
Mobile
-
-
-
-
Policy Number
-
- - ' - .$master[0]['policy_no'].' - - ' - : 'N/A'; ?> +
+
+
Ticket ID
+
-
-
-
Assigned To
-
-
- -
-
Ticket Type
-
-
-
-
Subject
-
-
-
-
Message
-
-
-
-
Related Tickets
-
- - - View - - +
+
Assigned To
+
+
+
Status
+
+ + ' + .$master[0]['status'].' + + ' + : 'N/A'; ?> +
+
+
+
Ticket Type
+
+
+
+
Subject
+
+
+
+
Message
+
+
+
+
Related Tickets
+
+ + + View + + +
+
+
-
-
- - - -
- - -
-
-

Conversation

-
-
+ +
+ +
+
+

Conversation

+
+
$conv): ?>

-
+

@@ -321,21 +309,24 @@ hr{ 0/1500
- +
-
- +
-