diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 75b95c76..acb156bd 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -659,4 +659,5 @@ $routes->post("ticketSave", "ThzController::ticketSave"); $routes->get("ticketList", "ThzController::ticketList"); $routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); $routes->get("ticketConversationList", "ThzController::ticketConversationList"); -$routes->post('ticketAutoFetchDetails',"ThzController::ticketAutoFetchDetails"); \ No newline at end of file +$routes->post('ticketAutoFetchDetails',"ThzController::ticketAutoFetchDetails"); +// $routes->match(['get','post','put'], 'ticketType', 'ThzController::ticketType'); \ No newline at end of file diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 7126cd69..98b2a821 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -4055,10 +4055,25 @@ class ClientController extends AdminController { // ---------for client----------------------------------------------------------------------------- + $role_id = get_role_id(); + $user_id = get_session_userid(); + + + if ($role_id == 2 || $role_id == 3) { + $clients = $this->clientModel - ->select("*, DATE_FORMAT(dob, '%d-%m-%Y') as dob") - ->where('is_active', 1) - ->findAll(); + ->select("clients.*, DATE_FORMAT(clients.dob, '%d-%m-%Y') as dob") + ->join('client_rm', 'client_rm.client_id = clients.id') + ->where('client_rm.user_id', $user_id) + ->where('clients.is_active', 1) + ->findAll(); + } else { + + $clients = $this->clientModel + ->select("*, DATE_FORMAT(dob, '%d-%m-%Y') as dob") + ->where('is_active', 1) + ->findAll(); + } $clientIds = array_column($clients, 'id'); @@ -5064,6 +5079,10 @@ class ClientController extends AdminController // $res = $empServiceController->employeesCorrectionProcess(['file_id' => '1681']); // dd( $res); + // $EmployeeMultiEventServiceController = new EmployeeMultiEventServiceController(); + // $res = $EmployeeMultiEventServiceController->constructMultiEventData(['file_id' => '1056']); + // dd($res); + // ---------- POLICY TRANSACTION CONTROLLER -------------------------------------------------------------------------------- $policyTransactionController = new PolicyTransactionController(); @@ -5181,6 +5200,7 @@ class ClientController extends AdminController // $data['data'] = $BDSReportController->getBAPClientData(); // return $this->loadLayout('irda_bap_client_report_list', $data); + // $data['data'] = $BDSReportController->getClientData(1); // return $this->loadLayout('irda_client_report_list', $data); diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index dd80cd05..40e8af2b 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -270,10 +270,11 @@ class EmployeeController extends AdminController $client_id = $this->request->getPost('client_id'); $policy_id = $this->request->getPost('policy_id'); $branch_id = $this->request->getPost('branch_id'); + $hr_file_id = $this->request->getPost('hr_file_id') ?? null; $action = $this->request->getPost('upload-action-type'); $status = 'inprogress'; - $file_id = $this->fileModel->insert(['file_name' => $filename, 'client_id' => $client_id, 'policy_id' => $policy_id, 'created_by' => $loggedInUserID, 'status' => $status, 'action' => $action, 'client_branch_id' => $branch_id,'uploaded_by' => 1]); //here field policy_id have client_policy_id and not policy id from policy master + $file_id = $this->fileModel->insert(['file_name' => $filename, 'client_id' => $client_id, 'policy_id' => $policy_id, 'created_by' => $loggedInUserID, 'status' => $status, 'action' => $action, 'client_branch_id' => $branch_id,'uploaded_by' => 1, 'hr_file_id' => $hr_file_id]); //here field policy_id have client_policy_id and not policy id from policy master $this->myLogger->logme("error", '{file_id} uploaded success', ['file_id' => $file_id]); //start validation process diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 91833826..4fc7d1c4 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3902,7 +3902,9 @@ class EmployeeRestController extends AdminController $filePath = $uploadPath . $record[0]['file_name']; if (!file_exists($filePath)) { - return $this->failNotFound("File not found on server"); + // return $this->failNotFound("File not found on server"); + $data['message'] = 'The Physical File Not Found'; + return view('errors/404', $data); } // Force file download @@ -3960,11 +3962,46 @@ class EmployeeRestController extends AdminController $request = service('request'); // Start builder from model + // $builder = $this->hrFileUploadModel + // ->select('hr_file_upload.* , c.short_name , cb.branch_name , lc.name as first_name') + // ->join('clients c', 'c.id = hr_file_upload.client_id AND c.is_active = 1', 'left') + // ->join('client_branch cb', 'cb.id = hr_file_upload.client_branch_id AND cb.is_active = 1', 'left') + // ->join('level_contacts lc', 'lc.id = hr_file_upload.created_by AND lc.contact_type = "client" AND lc.is_active = 1', 'left'); + $builder = $this->hrFileUploadModel - ->select('hr_file_upload.* , c.short_name , cb.branch_name , lc.name as first_name') + ->select(' + hr_file_upload.id, + hr_file_upload.client_id, + hr_file_upload.client_branch_id, + hr_file_upload.policy_id, + hr_file_upload.policy_no, + hr_file_upload.file_name, + hr_file_upload.file_action, + hr_file_upload.created_at, + hr_file_upload.created_by, + hr_file_upload.updated_at, + hr_file_upload.updated_by, + c.short_name, + cb.branch_name, + lc.name as first_name, + CASE + WHEN f.status IS NULL + THEN hr_file_upload.status + ELSE CONCAT(UCASE(LEFT(f.status, 1)), LCASE(SUBSTRING(f.status, 2))) + END AS status + ', false) ->join('clients c', 'c.id = hr_file_upload.client_id AND c.is_active = 1', 'left') ->join('client_branch cb', 'cb.id = hr_file_upload.client_branch_id AND cb.is_active = 1', 'left') - ->join('level_contacts lc', 'lc.id = hr_file_upload.created_by AND lc.contact_type = "client" AND lc.is_active = 1', 'left'); + ->join('level_contacts lc', 'lc.id = hr_file_upload.created_by AND lc.contact_type = "client" AND lc.is_active = 1', 'left') + ->join( + '(SELECT f1.* + FROM files f1 + WHERE f1.is_active = 1 + ORDER BY f1.id DESC + LIMIT 1) f', + 'f.hr_file_id = hr_file_upload.id', + 'left' + ); // Allowed filter keys $filters = [ diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index 9f7d7341..cada5a8f 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -248,12 +248,14 @@ class PolicyTransactionController extends BaseController // policy Transaction Create function start public function createInceptionPolicy() - { - // print_r($this->request->getPost()); die; + { + $post_data = $this->request->getPost() ?? []; + $this->myLogger->logme('error', 'Policy Trancaction form data : '. json_encode($post_data)); + $id = $this->request->getPost('id'); $data = $this->preparePolicyData(); $data['cd_ac_pk'] = $this->request->getPost('cd_ac_no'); - // print_r($this->request->getPost()); die; + $this->myLogger->logme('error', 'Policy Trancaction modified form data ( insert data ) : '. json_encode($data)); if (!$id) { @@ -997,10 +999,10 @@ class PolicyTransactionController extends BaseController $data['is_active'] = 0; $policy_transaction_data = $this->policyTransactionModel->where('id', $id)->first(); if($policy_transaction_data['policy_type_id'] > 7){ - $this->policyTransactionModel->where('id', $id)->set($data)->update(); $this->PTCOShareDetailsModel->where('pt_id', $id)->set($data)->update(); $this->clientPolicyModel->where('id', $policy_transaction_data['client_policy_id'])->set($data)->update(); + $this->policyTransactionModel->where('client_policy_id', $policy_transaction_data['client_policy_id'])->set($data)->update(); }else{ $this->policyTransactionModel->where('id', $id)->set($data)->update(); $this->PTCOShareDetailsModel->where('pt_id', $id)->set($data)->update(); diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 059ebfce..e286d651 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -13,6 +13,7 @@ use App\Models\UserModel; use App\Models\ClientPolicyModel; use App\Models\ClientModel; use App\Models\TicketMailTemplateModel; +// use App\Models\TicketTypesModel; class ThzController extends BaseController @@ -28,6 +29,7 @@ class ThzController extends BaseController protected $clientModel; protected $ticketMailTemplateModel; + // protected $ticketTypesModel; public function __construct() { @@ -81,6 +83,9 @@ class ThzController extends BaseController $data = $this->request->getGet(); + if ($returnType === 'web' && in_array(get_role_id(), [2,3,4])) { + $data['assign_to'] = $data['assign_to'] ?? get_session_userid(); + } $tickets = $this->fetchTicketsBasedOnrole($data); @@ -91,7 +96,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. @@ -196,24 +201,70 @@ 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); } } + // public function ticketType() + // { + // $method = $this->request->getMethod(); // get, post + + // if ($method === 'get') { + + // $types = $this->ticketTypesModel->where('is_active', 1)->findAll(); + // if (empty($types)) { + // return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404); + // } + // return $this->response->setJSON(['status' => 'success','data' => $types])->setStatusCode(200); + + // } + + // if ($method === 'post') { + + // $data = $this->request->getPost(); + // if (!empty($data['id'])) { + // $text = "update"; + // $result = $this->ticketTypesModel->update($data['id'], $data); + // $updateID = $data['id']; + // } else { + // $text = "create"; + // $insertID = $this->ticketTypesModel->insert($data); + // $result = true; + // } + + // $id = isset($insertID) && !empty($insertID) ? $insertID : $updateID ; + + // return $this->response->setJSON([ + // 'status' => $id ? 'success' : 'error', + // 'message' => $id ? "Ticket Type {$text}d successfully " : "Unable to {$text} ticket type. Please try again." , + // 'id' => $id + // ])->setStatusCode($id ? 200 : 400); + // } + // return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404); + // } /************************************************** PRIVATE FUNCTIONS ********************************************************/ diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index 800f464b..53ab6586 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -2469,6 +2469,7 @@ class TicketController extends BaseController ') ->join('user_profiles as up', 'claim_dump_files.created_by = up.id', 'left') ->where('claim_dump_files.is_active', 1) + ->orderBy('claim_dump_files.id', 'desc') ->findAll(); return $this->loadLayout('claim_dump_file_list', $data); diff --git a/app/Controllers/TicketServiceController.php b/app/Controllers/TicketServiceController.php index e6c137f4..d2265378 100644 --- a/app/Controllers/TicketServiceController.php +++ b/app/Controllers/TicketServiceController.php @@ -720,16 +720,16 @@ class TicketServiceController extends BaseController 'col_name' => 'Emp. Mobile', 'is_mandatory' => false, 'data_type' => 'string', - 'format' => 'phone', + 'format' => null, 'allowed_values' => null ], "emp_email" => [ 'col_idx' => 14, 'col_cell_name' => 'O', 'col_name' => 'Emp mail id', - 'is_mandatory' => false, + 'is_mandatory' => true, 'data_type' => 'string', - 'format' => 'email', + 'format' => null, 'allowed_values' => null ], "claim_collection" => [ @@ -774,7 +774,7 @@ class TicketServiceController extends BaseController 'col_name' => 'DOA', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "dod" => [ @@ -783,7 +783,7 @@ class TicketServiceController extends BaseController 'col_name' => 'DOD', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "claim_amount" => [ @@ -801,7 +801,7 @@ class TicketServiceController extends BaseController 'col_name' => 'Date of Claim Receipt', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "date_claim_registration" => [ @@ -810,7 +810,7 @@ class TicketServiceController extends BaseController 'col_name' => 'Date of Claim Registration', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "date_latest_query_raise" => [ @@ -819,7 +819,7 @@ class TicketServiceController extends BaseController 'col_name' => 'Date - Latest Query Raise', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "date_latest_query_resolution" => [ @@ -828,7 +828,7 @@ class TicketServiceController extends BaseController 'col_name' => 'Date - Latest Query Resolution', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "approved_amt" => [ @@ -846,7 +846,7 @@ class TicketServiceController extends BaseController 'col_name' => 'Date of Approval', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "utr_settlement" => [ @@ -864,7 +864,7 @@ class TicketServiceController extends BaseController 'col_name' => 'Date of Settlement', 'is_mandatory' => false, 'data_type' => 'date', - 'format' => 'm/d/Y', + 'format' => 'd/m/Y', 'allowed_values' => null ], "reason" => [ @@ -976,11 +976,12 @@ class TicketServiceController extends BaseController $columns_to_check = $excel_data_and_headers['claim_dump_excel_columns']; // dd($columns_to_check); - $client_data = $this->clientModel->where('is_active', 1)->where('client_type', 1)->findAll(); - $insurer_data = $this->insurerModel->where('is_active', 1)->findAll(); - $tpa_data = $this->TPAModel->where('is_active', 1)->findAll(); - $claim_status_data = $this->ticketClaimStatusModel->select('id, claim_status')->where('is_active', 1)->orderBy('id', 'asc')->groupBy('claim_status')->findAll(); - + //if upload the unwanted file upload handle + if(count($columns_to_check) == 0){ + $message = "Wrong file was uploaded"; + $this->claimDumpFileModel->where('id', $file_id)->set(['status' => 'failed', 'reason' => json_encode(['error_summary' => array_count_values([5]), 'error_data' => $message])])->update(); + return array('error_summary' => [5], 'error_data' => $message); + } //Store the error data by this structure $result = ['error_type' => 1, 'error_summary' => [], 'error_data' => []]; @@ -988,6 +989,7 @@ class TicketServiceController extends BaseController //excel data is empty than through the error if(count($excel_data ?? []) <= 1){ $message = "Uploaded file is empty"; + $this->claimDumpFileModel->where('id', $file_id)->set(['status' => 'failed', 'reason' => json_encode(['error_summary' => array_count_values([5]), 'error_data' => $message])])->update(); return array('error_summary' => [5], 'error_data' => $message); } @@ -1007,6 +1009,11 @@ class TicketServiceController extends BaseController return array('error_summary' => [6], 'error_data' => $message); } + $client_data = $this->clientModel->where('is_active', 1)->where('client_type', 1)->findAll(); + $insurer_data = $this->insurerModel->where('is_active', 1)->findAll(); + $tpa_data = $this->TPAModel->where('is_active', 1)->findAll(); + $claim_status_data = $this->ticketClaimStatusModel->select('id, claim_status')->where('is_active', 1)->orderBy('id', 'asc')->groupBy('claim_status')->findAll(); + //remove header unset($excel_data[0]); @@ -1178,7 +1185,7 @@ class TicketServiceController extends BaseController $columns_to_check = $excel_data_and_headers['claim_dump_excel_columns']; // dd($columns_to_check); - $result = ['error_type' => 2, 'error_summary' => [], 'error_data' => []]; + $result = ['error_type' => 1, 'error_summary' => [], 'error_data' => []]; //remove header unset($excel_data[0]); @@ -1206,17 +1213,26 @@ class TicketServiceController extends BaseController //excel file Account Manager Details like Name and Mobile Number $excel_acm_data = $row[$acm_column_index] ?? null; + // var_dump($excel_acm_data); die; $acm_name = null; $acm_mobile = null; //seperate the Account Manager Name and Mobile No if (!empty($excel_acm_data)) { + $excel_acm_data = str_replace(['–', '—'], '-', $excel_acm_data); $parts = array_map('trim', explode('-', $excel_acm_data, 2)); $acm_name = $parts[0] ?? null; $acm_mobile = $parts[1] ?? null; + + // ensure mobile number is digits only + if ($acm_mobile !== null) { + $acm_mobile = preg_replace('/\D/', '', $acm_mobile); + } } + // dd($acm_name, $acm_mobile); + $params = [ 'client_name' => $row[$client_column_index] ?? null, 'policy_no' => $row[$policy_no_column_index] ?? null, @@ -1274,9 +1290,9 @@ class TicketServiceController extends BaseController // dd($acm_data); if (count($acm_data) == 0) { array_push($result['error_summary'], 10); - $result['error_data'][$row_key][$emp_name_column_index]['col_name'] = $columns_to_check['employee_name']['col_name']; //push column name - $result['error_data'][$row_key][$emp_name_column_index]['col_idx'] = $emp_name_column_index; //push column index - $result['error_data'][$row_key][$emp_name_column_index]['error'][] = "This Acount Manager not exist in the system"; + $result['error_data'][$row_key][$acm_column_index]['col_name'] = $columns_to_check['acm']['col_name']; //push column name + $result['error_data'][$row_key][$acm_column_index]['col_idx'] = $acm_column_index; //push column index + $result['error_data'][$row_key][$acm_column_index]['error'][] = "This Acount Manager not exist in the system"; } } @@ -1455,7 +1471,8 @@ class TicketServiceController extends BaseController $header_with_column_index = $this->getTheColumnIndex($excel_data[0], $this->actualHeaders, $returnType); //Sanitize the excel data - // $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data); + $excel_data = ExcelSanitizeHelper::sanitizeArrayData($excel_data); + // dd($excel_data); $data = [ 'claim_dump_excel_columns' => $header_with_column_index, @@ -1499,7 +1516,8 @@ class TicketServiceController extends BaseController } private function constructClaimData($excel_data, $db_data, $columns_to_check) - { + { + // dd($db_data); $client_column_index = $columns_to_check['corporate']['col_idx']; $policy_no_column_index = $columns_to_check['policy_no']['col_idx']; $insurer_column_index = $columns_to_check['insurer']['col_idx']; @@ -1591,15 +1609,18 @@ class TicketServiceController extends BaseController //get the acountmanager data $acm_data = $ticketMasterModal->getAcmUserDetails($params) ?? []; + // dd($acm_data); //get the claim status id from the database $claim_status_data = $this->ticketClaimStatusModel - ->select('id, claim_status') + ->select('id, claim_status, ticket_type') ->where('is_active', 1) ->where('ticket_type', $db_data['ticket_type_id']) ->where('LOWER(claim_status)', strtolower($excel_status_data)) ->first(); + // dd($claim_status_data); + $claim_status_id = $claim_status_data['id'] ?? null; //initialize Ticket controller for the other data @@ -1618,9 +1639,10 @@ class TicketServiceController extends BaseController } } - $db_data['insured_name'] = $db_data['insured_emp_id'] ?? null; + $db_data['insured_name'] = $excel_data[$insured_name_column_index] ?? null; //get Insured emp name and Insured emp id $insured_data = $ticketMasterModal->getInsuredDetails($db_data); + // dd($insured_data); //handle remarks based on the status $return_remarks = null; @@ -1639,15 +1661,15 @@ class TicketServiceController extends BaseController 'claim_status_id' => $claim_status_id ?? null, 'acm_id' => $acm_data['id'] ?? null, 'insurer_id' => $db_data['insurer_id'] ?? null, - 'tpa_id' => $excel_tpa_id_data ?? $db_data['tpa_id'] ?? null, + 'tpa_id' => $db_data['tpa_id'] ?? null, 'client_id' => $db_data['client_id'] ?? null, 'emp_id' => $db_data['emp_id'] ?? null, 'client_policy_id' => $db_data['client_policy_id'] ?? null, 'policy_no' => $db_data['policy_no'] ?? null, 'emp_code' => $db_data['emp_code'] ?? null, - 'tpa_no' => $db_data['tpa_no'] ?? null, + 'tpa_no' => $excel_tpa_id_data ?? $db_data['tpa_no'] ?? null, 'emp_name' => $db_data['emp_name'] ?? null, - 'relationship' => $excel_relationship_data ?? null, + 'relationship' => strtolower($excel_relationship_data) ?? null, 'emp_mobile' => $excel_emp_mobile_data ?? $db_data['emp_mobile'] ?? null, 'emp_mail' => $excel_emp_email_data ?? $db_data['emp_mail'] ?? null, @@ -1655,7 +1677,7 @@ class TicketServiceController extends BaseController 'claim_type' => $cliam_type_id ?? null, 'insured_emp_id' => $insured_data['emp_id'] ?? null, - 'insured_name' => $insured_data['name'] ?? $db_data['insured_emp_id'] ?? null, + 'insured_name' => $insured_data['name'] ?? $excel_data[$insured_name_column_index] ?? null, 'hospital_name' => $excel_hospital_data ?? null, 'claim_amount' => $excel_claim_amount_data ?? null, @@ -1693,6 +1715,7 @@ class TicketServiceController extends BaseController 'approved_description' => null ]; + // dd($ticketMaster); return $ticketMaster; } diff --git a/app/Models/FileModel.php b/app/Models/FileModel.php index 5b27a7d4..ff4f584e 100755 --- a/app/Models/FileModel.php +++ b/app/Models/FileModel.php @@ -20,7 +20,8 @@ class FileModel extends Model "policy_id", "client_branch_id", "uploaded_by", - "updated_by" + "updated_by", + "hr_file_id", ]; 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/Models/TicketMasterModel.php b/app/Models/TicketMasterModel.php index 013e5ad7..ab733a4b 100644 --- a/app/Models/TicketMasterModel.php +++ b/app/Models/TicketMasterModel.php @@ -1059,10 +1059,10 @@ class TicketMasterModel extends Model $relationship = $params['relationship'] ?? null; $insured_name = $params['insured_name'] ?? null; - $client_name = "6-Eleven"; - $emp_code = "EMP0020K12"; - $emp_name = "Lokesh"; - $policy_no = "GMC-1999/2000/2021/2022"; + // $client_name = "6-Eleven"; + // $emp_code = "EMP0020K12"; + // $emp_name = "Lokesh"; + // $policy_no = "GMC-1999/2000/2021/2022"; $builder = $this->db->table('employees e'); @@ -1106,7 +1106,7 @@ class TicketMasterModel extends Model $builder->where('LOWER(e.relationship)', strtolower('self')); $query = $builder->get(); - $result = $query->getResultArray(); + $result = $query->getRowArray(); return $result; } @@ -1123,7 +1123,7 @@ class TicketMasterModel extends Model $builder->where('user_profiles.is_active', 1); $builder->where('user_profiles.mobile', trim($acm_mobile)); $query = $builder->get(); - $result = $query->getResultArray(); + $result = $query->getRowArray(); return $result; } @@ -1161,8 +1161,8 @@ class TicketMasterModel extends Model $builder->where('ep.client_policy_id', trim($policy_id)); $query = $builder->get(); - $result = $query->getResultArray(); - + $result = $query->getRowArray(); + // dd($this->db->getLastQuery()); return $result; } diff --git a/app/Models/TicketTypesModel.php b/app/Models/TicketTypesModel.php new file mode 100644 index 00000000..33f31915 --- /dev/null +++ b/app/Models/TicketTypesModel.php @@ -0,0 +1,44 @@ + + .reload:hover { cursor: pointer; } + + .table th, + .table td { + padding: 8px; + } + + table.dataTable tbody td { + padding: 4px 4px !important; + } + + .addbtnStyle{ + margin-left: 20px !important; + } + + .dataTables_filter { + position: absolute; + } + -
+
@@ -39,7 +57,7 @@
- + -->
@@ -121,6 +139,34 @@
+ + + \ No newline at end of file diff --git a/app/Views/employee_upload.php b/app/Views/employee_upload.php index 7f1ae499..ab566571 100755 --- a/app/Views/employee_upload.php +++ b/app/Views/employee_upload.php @@ -129,7 +129,6 @@ option:disabled { - - -