diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index ea9c7fc0..105f9836 100755
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -646,4 +646,5 @@ $routes->post("ticketSave", "ThzController::ticketSave");
$routes->get("ticketList", "ThzController::ticketList");
$routes->post("ticketConversationSave", "ThzController::ticketConversationSave");
$routes->get("ticketConversationList", "ThzController::ticketConversationList");
-$routes->get('ticketAssigning',"ThzController::ticketAssigning");
\ No newline at end of file
+$routes->get('ticketAssigning',"ThzController::ticketAssigning");
+$routes->post('ticketAutoFetchDetails',"ThzController::ticketAutoFetchDetails");
\ No newline at end of file
diff --git a/app/Models/ThzMasterModel.php b/app/Models/ThzMasterModel.php
index b669a360..aa33fc32 100644
--- a/app/Models/ThzMasterModel.php
+++ b/app/Models/ThzMasterModel.php
@@ -40,25 +40,18 @@ class ThzMasterModel extends Model
protected $beforeDelete = [];
protected $afterDelete = [];
- public function ticketAutoFetchDetails(){
+ public function ticketAutoFetchDetails($client_id ,$mobile){
- $autofetch_sql = "SELECT
- employees.id,employees.client_id,
- employees.client_branch_id as branch_id,
- employees.mobile,
- employees.emp_code,
- employees.name,
- employee_polices.client_policy_id as policy_id
- FROM employees
- LEFT JOIN employee_polices
- ON employee_polices.employee_id = employees.id
- WHERE employees.emp_status IN ('active','draft','enrolled')
- AND employees.is_active = 1
- AND employees.mobile = " . $mobile . "
- AND employees.client_id = " . $client_id . "
- ORDER BY employees.id DESC";
-
- $result = $this->db->query($autofetch_sql)->getResultArray();
+ $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')
+ ->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)
+ ->where('e.mobile', $mobile)
+ ->where('e.client_id', $client_id)
+ ->groupBy('e.client_id')
+ ->get()
+ ->getResultArray();
return $result;
diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php
index 6016cefb..abfe7759 100755
--- a/app/Views/layout/header.php
+++ b/app/Views/layout/header.php
@@ -429,6 +429,7 @@
.search-bar input {
width: 100%;
+ padding-right: 40px; /* make space for the button */
border-radius: 10px !important;
background-color: #F4F4F4;
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.2);
@@ -510,9 +511,35 @@
font-weight: 600!important;
}
- body{
- padding-right: 0px !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); }
+
+ .btn-border-radius{ .border-radius: 10px !important; }
+
+
diff --git a/app/Views/thz_list.php b/app/Views/thz_list.php
index cc6f4c11..1565e6fa 100644
--- a/app/Views/thz_list.php
+++ b/app/Views/thz_list.php
@@ -1,12 +1,54 @@