diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php index 0c17c4c0..5045453a 100644 --- a/app/Views/thz_list.php +++ b/app/Views/thz_list.php @@ -255,7 +255,7 @@ table thead th { Ticket No - Name + Name Policy Number Ticket Type Subject @@ -294,14 +294,14 @@ table thead th { format('d/m/Y') . "
" . $cdt->format('h:i a') . ""; + echo $cdt->format('d/m/Y') . "
" . $cdt->format('h:i a') . ""; endif; ?> format('d/m/Y') . "
" . $udt->format('h:i a') . ""; + echo $udt->format('d/m/Y') . "
" . $udt->format('h:i a') . ""; endif; ?> @@ -436,13 +436,15 @@ table thead th {
- + + 0/150
- + + 0/1500
@@ -725,19 +727,21 @@ $(document).ready(function() { text: ' Export ', className: 'btn app-btn-secondary app-btn-border-radius app-text-white', buttons: [ - { - extend: 'csv', - text: 'CSV', - title: 'ticket-List' - }, - { - extend: 'excel', - text: ' Excel', - title: 'ticket-List', - exportOptions: { - orthogonal: 'sort' - } - } + { + extend: 'csv', + text: ' CSV ', + title: 'Tickets', + className: 'app-btn-primary app-text-white', + }, + { + extend: 'excel', + text: ' EXCEL ', + title: 'Tickets', + exportOptions: { + orthogonal: 'sort' + }, + className: 'app-btn-primary app-text-white', + } ] } ], @@ -757,6 +761,39 @@ $(document).ready(function() { } else { console.error("Table Not found."); } + + const subjectInput = document.getElementById("subject"); + const subjectCounter = document.getElementById("subjectCounter"); + + subjectInput.addEventListener("input", function () { + const subjectLength = subjectInput.value.length; + subjectCounter.textContent = `${subjectLength}/150`; + + if (subjectLength > 150) { + toastr.error('Subject cannot exceed 150 characters', 'Warning'); + subjectInput.classList.add('is-invalid'); + } else { + subjectInput.classList.remove('is-invalid'); + } + }); + + + const messageInput = document.getElementById("message"); + const messageCounter = document.getElementById("messageCounter"); + + messageInput.addEventListener("input", function () { + const messageLength = messageInput.value.length; + messageCounter.textContent = `${messageLength}/1500`; + + if (messageLength > 1500) { + toastr.error('Message cannot exceed 1500 characters', 'Warning'); + messageInput.classList.add('is-invalid'); + } else { + messageInput.classList.remove('is-invalid'); + } + }); + + }); function viewTicket(ticket_id){ diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index 11ce9466..f3a53b7c 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -157,7 +157,7 @@ hr{
-
+