From 79c5e8f5615d1e69e02383571e8c2684ae9a77e7 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Fri, 22 Aug 2025 17:57:37 +0530 Subject: [PATCH 1/3] FIX_UI ticket --- app/Controllers/ThzController.php | 11 ++-- app/Models/ThzMasterModel.php | 2 +- app/Views/layout/header.php | 104 ++++++++++++++++++++++-------- app/Views/thz_notes.php | 27 +++++--- 4 files changed, 100 insertions(+), 44 deletions(-) diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 059ebfce..d679a42a 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -91,7 +91,7 @@ class ThzController extends BaseController } }else{ - $data['page_name'] = "Ticket List"; + $data['page_name'] = "Tickets"; $data['ticket_data'] = $tickets; $data['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu // 2,3,4 remain person varannum. @@ -197,17 +197,14 @@ class ThzController extends BaseController return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200); }else{ $toGetCreatedBy = $result['master'][0]['created_by']; + $toGetMobile = $result['master'][0]['mobile']; $toGetPolicyId = (!empty($result['master'][0]['policy_id']) && strtolower($result['master'][0]['policy_id']) !== 'null') ? $result['master'][0]['policy_id'] : ''; - $result['related_tickets'] = $this->thzMasterModel - ->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name') - ->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left') - ->where('thz_master.created_by', $toGetCreatedBy) - ->findAll(); + $result['related_tickets'] = $this->thzMasterModel->where('mobile', $toGetMobile)->where('thz_id !=', $thz_id)->findAll(); $result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu - // 2,3,4 remain person varannum. + $result['page_name'] = "Tickets"; // 2,3,4 remain person varannum. $result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : ''; return $this->loadLayout('thz_notes', $result); } diff --git a/app/Models/ThzMasterModel.php b/app/Models/ThzMasterModel.php index aa33fc32..b6a6140e 100644 --- a/app/Models/ThzMasterModel.php +++ b/app/Models/ThzMasterModel.php @@ -43,7 +43,7 @@ class ThzMasterModel extends Model public function ticketAutoFetchDetails($client_id ,$mobile){ $result = $this->db->table('employees e') - ->select('e.id, e.email_personal, e.client_id, e.client_branch_id as branch_id, e.mobile, e.emp_code, e.name, ep.client_policy_id as policy_id') + ->select('e.id, e.email_personal,e.email_corporate, e.client_id, e.client_branch_id as branch_id, e.mobile, e.emp_code, e.name, ep.client_policy_id as policy_id') ->join('employee_polices ep', 'ep.employee_id = e.id AND ep.is_active = 1', 'left') ->whereIn('e.emp_status', ['active', 'draft', 'enrolled']) ->where('e.is_active', 1) diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index dc34b27d..8e9ff0a7 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -249,7 +249,7 @@ /* Force all text across the entire app to black */ html, body, * { - color: #000 !important; + color: #000 !important; } @@ -511,33 +511,73 @@ font-weight: 600!important; } - .btn-ternary { - color: #fff !important; - background-color: #E26728; - border-color: #E26728; } - .btn-ternary:hover { - color: #fff !important; - background-color: #B9501F; - border-color: #A6471C; } - .btn-ternary:focus, .btn-ternary.focus { - color: #fff !important; - background-color: #B9501F; - border-color: #A6471C; - box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } - .btn-ternary.disabled, .btn-ternary:disabled { - color: #fff !important; - background-color: #E26728; - border-color: #E26728; } - .btn-ternary:not(:disabled):not(.disabled):active, .btn-ternary:not(:disabled):not(.disabled).active, - .show > .btn-ternary.dropdown-toggle { - color: #fff !important; - background-color: #A6471C; - border-color: #933E19; } - .btn-ternary:not(:disabled):not(.disabled):active:focus, .btn-ternary:not(:disabled):not(.disabled).active:focus, - .show > .btn-ternary:dropdown-toggle:focus { - box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } +/* +#E26728 (base) +#B8521F (darker 1) +#9C461B (darker 2) +#803A16 (darker 3) +rgba(226, 103, 40, 0.5) (transparent) - .btn-border-radius{ border-radius: 10px !important; } +#00999E (base) +#007A7E (darker 1) +#006C70 (darker 2) +#005D61 (darker 3) +rgba(0, 153, 158, 0.5) (transparent) +*/ + +.btn-app-primary { + color: #fff !important; + background-color: #00999E; + border-color: #00999E; } +.btn-app-primary:hover { + color: #fff !important; + background-color: #007A7E; + border-color: #006C70; } +.btn-app-primary:focus, .btn-app-primary.focus { + color: #fff !important; + background-color: #007A7E; + border-color: #006C70; + box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); } +.btn-app-primary.disabled, .btn-app-primary:disabled { + color: #fff !important; + background-color: #00999E; + border-color: #00999E; } +.btn-app-primary:not(:disabled):not(.disabled):active, .btn-app-primary:not(:disabled):not(.disabled).active, + .show > .btn-app-primary.dropdown-toggle { + color: #fff !important; + background-color: #006C70; + border-color: #005D61; } +.btn-app-primary:not(:disabled):not(.disabled):active:focus, .btn-app-primary:not(:disabled):not(.disabled).active:focus, + .show > .btn-app-primary.dropdown-toggle:focus { + box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); } + +.btn-app-ternary { + color: #fff !important; + background-color: #E26728; + border-color: #E26728; } +.btn-app-ternary:hover { + color: #fff !important; + background-color: #B8521F; + border-color: #9C461B; } +.btn-app-ternary:focus, .btn-app-ternary.focus { + color: #fff !important; + background-color: #B8521F; + border-color: #9C461B; + box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } +.btn-app-ternary.disabled, .btn-app-ternary:disabled { + color: #fff !important; + background-color: #E26728; + border-color: #E26728; } +.btn-app-ternary:not(:disabled):not(.disabled):active, .btn-app-ternary:not(:disabled):not(.disabled).active, + .show > .btn-app-ternary.dropdown-toggle { + color: #fff !important; + background-color: #9C461B; + border-color: #803A16; } +.btn-app-ternary:not(:disabled):not(.disabled):active:focus, .btn-app-ternary:not(:disabled):not(.disabled).active:focus, + .show > .btn-app-ternary.dropdown-toggle:focus { + box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } + +.btn-border-radius{ border-radius: 10px !important; } @@ -728,7 +768,15 @@ - + + +
  • + + /assets/images/user_manual_sb.png" alt="Logo" height="20"> + Tickets + +
  • +
  • diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index 6bffa681..71e303f1 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -237,7 +237,7 @@
    - +
    @@ -310,7 +310,7 @@
    @@ -422,16 +422,16 @@ dataType: 'json', success: function(response) { if (response.status === "success") { - toastr.success(response.message, 'success'); + toastr.success(response.message, 'Success'); $('#ticketModal').modal('hide'); form.reset(); window.location.href = "" + id; } else { - toastr.error(response.message, 'error'); + toastr.error(response.message, 'Error'); } }, error: function(xhr) { - toastr.error("Something went wrong!", 'error'); + toastr.error("Something went wrong!", 'Error'); console.error(xhr.responseText); } }); @@ -444,6 +444,17 @@ document.getElementById("thz_id").value = urlParams.get('thz_id'); var id = urlParams.get('thz_id'); var form = document.getElementById("conversationForm"); + // reset any old error styles + form.classList.remove('was-validated'); + + var notes = document.getElementById('notes').value.trim(); + + if (notes === "") { + toastr.warning('Please enter notes', 'Warning'); + form.classList.add('was-validated'); + return; + } + var formData = new FormData(form); $.ajax({ @@ -455,15 +466,15 @@ dataType: 'json', success: function(response) { if (response.status === "success") { - toastr.success(response.message, 'success'); + toastr.success(response.message, 'Success'); form.reset(); window.location.href = "" + id; } else { - toastr.error(response.message, 'error'); + toastr.error(response.message, 'Error'); } }, error: function(xhr) { - toastr.error("Something went wrong!", 'error'); + toastr.error("Something went wrong!", 'Error'); console.error(xhr.responseText); } }); From 11f5f0be3ec3a507884a482fdaabca658c6680f6 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 22 Aug 2025 23:03:09 +0530 Subject: [PATCH 2/3] CHANGE_UI_FIX - VADIVEL J 2025-08-22 --- app/Controllers/ThzController.php | 21 +++++++++++++++------ app/Views/thz_notes.php | 25 ++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 059ebfce..1c0f9535 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -196,19 +196,28 @@ class ThzController extends BaseController if ($returnType === 'api') { return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200); }else{ - $toGetCreatedBy = $result['master'][0]['created_by']; + + $assign_to = $result['master'][0]['assign_to']; + $mobile = $result['master'][0]['mobile']; + $toGetPolicyId = (!empty($result['master'][0]['policy_id']) && strtolower($result['master'][0]['policy_id']) !== 'null') ? $result['master'][0]['policy_id'] : ''; $result['related_tickets'] = $this->thzMasterModel - ->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name') - ->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left') - ->where('thz_master.created_by', $toGetCreatedBy) - ->findAll(); + ->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name') + ->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left') + ->where('thz_master.assign_to', $assign_to) + ->where('thz_master.mobile',$mobile) + ->where('thz_master.thz_id !=',$thz_id) + ->where('thz_master.status !=','Closed') + ->where('thz_master.status !=','Resolved') + ->findAll(); + $result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu // 2,3,4 remain person varannum. - $result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : ''; + $result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : ''; + return $this->loadLayout('thz_notes', $result); } diff --git a/app/Views/thz_notes.php b/app/Views/thz_notes.php index 6bffa681..52dfb006 100644 --- a/app/Views/thz_notes.php +++ b/app/Views/thz_notes.php @@ -327,9 +327,17 @@