diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 9c37e1e8..37685b55 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -189,13 +189,23 @@ class TicketController extends BaseController $isFromDashboard = $this->request->getPost("is_dashboard"); - if (isset($isFromDashboard) && !empty($isFromDashboard) && $isFromDashboard == 1) { + if (isset($isFromDashboard) && !empty($isFromDashboard)){ $data['page_name'] = "Claims"; - $data['ticket_data'] = $this->ticketSearch(3); + if ($isFromDashboard == 1) { + + $data['ticket_data'] = $this->ticketSearch(3); + + }else if ($isFromDashboard == 2){ + $data['ticket_data'] = $this->ticketSearch(4); + + } $data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active', 1)->findAll(); $data['client_list'] = $this->clientModel->select('id,client_name')->where('is_active', 1)->findAll(); + // dd($data); return $this->loadLayout('ticket_search', $data); - }else{ + + } + else{ $data['ticket_data'] = $this->ticketSearch(); $html = view('ticket_list', $data); return $this->respond(['status' => true, 'html' => $html], 200); @@ -239,7 +249,7 @@ class TicketController extends BaseController ->groupBy('tm.id, tm.created_at, latest_history.created_at'); - //action 1 get last 100 rows, action 2 filter and get all rows related to that and action 3 gets according to dashboard + //action 1 get last 100 rows, action 2 filter and get all rows related to that, action 3 gets according to dashboard, action 4 gets according to ACM if ($action == 1) { $query = $db->table('ticket_master tm') @@ -336,6 +346,16 @@ class TicketController extends BaseController } // dd($where); + } else if ($action == 4){ + $acm_id = $this->request->getPost('ids'); + + // dd($acm_id); + if (!empty($acm_id)) { + $where = "tm.acm_id = $acm_id"; + } else { + $where = '1 = 0'; // No valid IDs, return empty result + } + } else { $search_data = $this->request->getPost(); // print_r($search_data); die() @@ -1364,7 +1384,8 @@ class TicketController extends BaseController if ($received_data['report_type'] == "acc_manager_wise_status"){ $viewData['policy_type'] = $received_data['policy_type']; $viewData['account_manager_wise_data'] = $this->ticketMasterModel->accountManagerWiseReport($policy_type,$fromDate,$toDate); - // print_rr($viewData); + + // print_rr($viewData);die(); if ($policy_type == 1){ $viewData['column_order'] = [ 'ACM_NAME', 'ID NOT GENERATED', 'NON ID', 'CDA', 'INFORMATION REQUIRED', @@ -1382,6 +1403,7 @@ class TicketController extends BaseController $ordered_data[] = $temp; } $viewData['tpa_wise_data'] = $ordered_data; + // print_rr($viewData);die(); $html = view('claims_report_acc_manager_wise', $viewData); return $this->respond(['status' => true, 'html' => $html], 200); }else{ @@ -1400,6 +1422,7 @@ class TicketController extends BaseController $ordered_data[] = $temp; } $viewData['tpa_wise_data'] = $ordered_data; + // print_rr($viewData);die(); $html = view('claims_report_acc_manager_wise', $viewData); return $this->respond(['status' => true, 'html' => $html], 200); } diff --git a/app/Models/TicketMasterModel.php b/app/Models/TicketMasterModel.php index d28fd81f..1404190e 100644 --- a/app/Models/TicketMasterModel.php +++ b/app/Models/TicketMasterModel.php @@ -607,6 +607,7 @@ class TicketMasterModel extends Model // Construct the final SQL query $sql = " SELECT + user_profiles.id as ACM_ID, user_profiles.first_name AS ACM_NAME, $dynamicSelect, ($dynamicTotal) AS TOTAL @@ -623,7 +624,6 @@ class TicketMasterModel extends Model "; $result = $this->db->query($sql)->getResultArray(); - // dd($result); return $result; } else { @@ -677,6 +677,7 @@ class TicketMasterModel extends Model // Construct the final SQL query $sql = " SELECT + user_profiles.id as ACM_ID, user_profiles.first_name AS ACM_NAME, $dynamicSelect, ($dynamicTotal) AS TOTAL, @@ -696,8 +697,9 @@ class TicketMasterModel extends Model // Execute the query $result = $this->db->query($sql)->getResultArray(); - // print_rr($result);die(); return $result; + + } } diff --git a/app/Views/claims_report_acc_manager_wise.php b/app/Views/claims_report_acc_manager_wise.php index a629a01c..3816a419 100644 --- a/app/Views/claims_report_acc_manager_wise.php +++ b/app/Views/claims_report_acc_manager_wise.php @@ -18,6 +18,10 @@ .right-align-input { text-align: right; } + + #scroll-horizontal-datatable tbody tr:hover { + background-color: #e0e0e0; + }