MERGE_CODE_MERGE : RV

This commit is contained in:
VENKATESHWARAN 2025-10-06 09:55:10 +05:30
commit 7e34612e57
116 changed files with 16723 additions and 16102 deletions

View File

@ -101,6 +101,6 @@ class Autoload extends AutoloadConfig
* @phpstan-var list<string>
*/
public $helpers = ['uuid','session','utility', 'form', 'url', 'oauth', 'fileupload',
'excel_import_export', 'file', 'drive','ExcelSanitizeHelper', 'api_helper','ExceptionHelper'
'excel_import_export', 'file', 'drive','ExcelSanitizeHelper', 'api_helper','exception'
];
}

View File

@ -124,6 +124,8 @@ $routes->group("/client", ["filter" => "authMVC"], function ($routes) {
$routes->post("edit", "ClientController::editClientBranch");
$routes->get("list/(:any)", "ClientController::getSingleBranchDataById/$1");
$routes->get("remove/(:any)", "ClientController::removeClientBranch/$1");
$routes->post("auto_fetch_branch","ClientController::auto_fetch_branch");
$routes->post("auto_fetch_branch_details","ClientController::auto_fetch_branch_details");
});
$routes->group("relation", ["filter" => "authMVC"], function ($routes) {
@ -676,6 +678,7 @@ $routes->post('claimStatusCheck','VidalApiController::claimStatusCheck');
$routes->post('newClaim','VidalApiController::newClaim');
$routes->post('enrollment','VidalApiController::enrollment');
// General Tickets
$routes->post("ticketSave", "ThzController::ticketSave");
$routes->get("ticketList", "ThzController::ticketList");

View File

@ -27,7 +27,8 @@ class AppContentManagementController extends AdminController
public function add_image_index()
{
$this->myLogger->logme('error','Addvertisement Image list function called');
$headerData['page_name'] = 'Addvertisement Image List';
$headerData['tab_name'] = 'Addvertisement Images';
$headerData['page_name'] = 'Addvertisement Images';
$data['addImageList'] = $this->addImgModel->findAll();
// dd($data);
@ -86,6 +87,7 @@ class AppContentManagementController extends AdminController
public function frontend_content(){
$data['test'] = $this->feContentModel->findAll();
$headerData['tab_name'] = 'Front-End Content';
$headerData['page_name'] = 'Front-End Content';
echo view('layout/header', $headerData);

View File

@ -180,6 +180,9 @@ class BDSReportController extends AdminController
'BAP-Insurer' => 'bapInsurer',
'Client' => 'client'
];
$data['page_name'] = "IRBA Report";
return $this->loadLayout('irba_report', $data);
} else {
@ -914,6 +917,7 @@ class BDSReportController extends AdminController
$data['default_end'] = $default_start->format('d-m-Y');
$data['default_start'] = $default_start->modify('-60 days')->format('d-m-Y');
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
$data['tab_name'] = "Renewal Report";
$data['page_name'] = "Renewal Report";
return $this->loadLayout('renewal_search', $data);
} else {
@ -1013,6 +1017,7 @@ class BDSReportController extends AdminController
public function accountMangerStatusBDSReport()
{
$data['tab_name'] = "Account Manager BDS Report";
$data['page_name'] = "Account Manager BDS Report";
$sql = "
@ -1130,6 +1135,7 @@ class BDSReportController extends AdminController
public function getMultiReport($report_type){
$data['tab_name'] = "BDS Report";
$data['page_name'] = "BDS Report";
if ($report_type == 1){

View File

@ -143,9 +143,9 @@ class ClientController extends AdminController
// Perform the query
$builder = $db->table($table);
if(is_array($value)){
if (is_array($value)) {
$isDuplicate = $builder->where($value)->where('is_active', 1)->countAllResults() > 0;
}else{
} else {
$isDuplicate = $builder->where($field, $value)->where('is_active', 1)->countAllResults() > 0;
}
@ -192,7 +192,7 @@ class ClientController extends AdminController
// ["filePath" => ROOTPATH."public/assets/images/login_bg.jpg","fileName" => "login_bg.jpg"]
// ];
$attachments = [];
$res = MailHelper::send_email(['mail' => $email, 'subject' => 'Mail Via Attachment Testing URL', 'message' => $message,'attachments' => $attachments]);
$res = MailHelper::send_email(['mail' => $email, 'subject' => 'Mail Via Attachment Testing URL', 'message' => $message, 'attachments' => $attachments]);
print_rr($res);
echo '------------------------------------------------------------------------------------------';
@ -205,21 +205,20 @@ class ClientController extends AdminController
// dd($client_id, $emp_code, $policy_id, $mail_active);
if(empty($policy_id)){
if (empty($policy_id)) {
$client_policy_ids = $this->employeeModel
->select('employee_polices.client_policy_id')
->join('employee_polices', 'employees.id = employee_polices.employee_id')
->where('employees.client_id', $client_id )
->where('employees.emp_code', $emp_code )
->where('employee_polices.is_active', 1 )
->where('employees.is_active', 1 )
->where('employees.client_id', $client_id)
->where('employees.emp_code', $emp_code)
->where('employee_polices.is_active', 1)
->where('employees.is_active', 1)
->findAll();
$client_policy_ids2 = array_column($client_policy_ids, 'client_policy_id');
$client_policy_id = array_unique($client_policy_ids2);
}else{
} else {
$client_policy_id = json_decode($policy_id, true);
}
@ -233,36 +232,34 @@ class ClientController extends AdminController
$mail_send_return1 = '';
$mail_send_return2 = '';
if (!is_null($client_policy_id) && is_array($client_policy_id))
{
if (!is_null($client_policy_id) && is_array($client_policy_id)) {
$empData = $this->employeeModel->where('emp_code', $emp_code )->where('client_id', $client_id ) ->where('is_active', 1 )->findAll();
$empData = $this->employeeModel->where('emp_code', $emp_code)->where('client_id', $client_id)->where('is_active', 1)->findAll();
// dd($empData);
$filteredEmpData = array_filter($empData, fn($item) => $item['relationship'] === 'Self');
// dd($filteredEmpData);
$array_list = [];
foreach ($client_policy_id as $key => $value)
{
$find = $this->employeeModel->getEmpFamilybyEmpCode(client_policy_id: $value,emp_code: $emp_code,client_id: $client_id,emp_status:['draft','enrolled'],policy_status:['draft','enrolled']);
if(count($find) > 0){
foreach ($client_policy_id as $key => $value) {
$find = $this->employeeModel->getEmpFamilybyEmpCode(client_policy_id: $value, emp_code: $emp_code, client_id: $client_id, emp_status: ['draft', 'enrolled'], policy_status: ['draft', 'enrolled']);
if (count($find) > 0) {
$array_list[] = $find;
}
}
// dd($array_list);
$notification = $this->notificationModel->where('client_id' ,$client_id)->where('template_name', 'member_review_and_summary_mail')->first();
$notification = $this->notificationModel->where('client_id', $client_id)->where('template_name', 'member_review_and_summary_mail')->first();
if (isset($notification) && $notification['enabled'] == 1) {
$params ['array_list'] = $array_list;
$params ['client_policy_id'] = $client_policy_id;
$params ['emp_code'] = $emp_code;
$params ['client_id'] = $client_id;
$params ['notification'] = $notification;
$params['array_list'] = $array_list;
$params['client_policy_id'] = $client_policy_id;
$params['emp_code'] = $emp_code;
$params['client_id'] = $client_id;
$params['notification'] = $notification;
$params['common'] = [
'client_id' => $filteredEmpData[0]['client_id'],
'client_branch_id' => $filteredEmpData[0]['client_branch_id'],
@ -274,10 +271,10 @@ class ClientController extends AdminController
// dd($params);
$wholeData =sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
$wholeData = sendMailNotification::sendMailNotification('member_review_and_summary_mail', $params);
// print_r($wholeData); die;
if($mail_active == 1){
if ($mail_active == 1) {
$mail_send_return = MailHelper::send_email($wholeData[0]);
$this->myLogger->logme("error", $mail_send_return);
}
@ -322,10 +319,9 @@ class ClientController extends AdminController
// }
// }
}else{
} else {
$this->myLogger->logme("error", 'Member Review Mail Configuration not Enable for this client');
}
}
print_r($wholeData);
@ -346,21 +342,20 @@ class ClientController extends AdminController
{
// dd($client_id, $emp_code, $policy_id, $mail_active);
if(empty($policy_id)){
if (empty($policy_id)) {
$client_policy_ids = $this->employeeModel
->select('employee_polices.client_policy_id')
->join('employee_polices', 'employees.id = employee_polices.employee_id')
->where('employees.client_id', $client_id )
->where('employees.emp_code', $emp_code )
->where('employee_polices.is_active', 1 )
->where('employees.is_active', 1 )
->where('employees.client_id', $client_id)
->where('employees.emp_code', $emp_code)
->where('employee_polices.is_active', 1)
->where('employees.is_active', 1)
->findAll();
$client_policy_ids2 = array_column($client_policy_ids, 'client_policy_id');
$client_policy_id = array_unique($client_policy_ids2);
}else{
} else {
$client_policy_id = json_decode($policy_id, true);
}
@ -474,7 +469,8 @@ class ClientController extends AdminController
public function index()
{
$this->myLogger->logme('error', 'Client list function called');
$headerData['page_name'] = 'Client List';
$headerData['tab_name'] = 'Client List';
$headerData['page_name'] = 'Clients'; // Both Browser Tab name And Page name are same.
$data['clientList'] = $this->clientModel->getCreatedByUserName();
$data['client_rm'] = $this->clientRMModel->getAllClientRM();
$data['lead_data'] = $this->leadsModel->getLeadForInsertClientList();
@ -599,7 +595,8 @@ class ClientController extends AdminController
public function clientOnboarding()
{
$this->myLogger->logme('error', 'Client Onboarding function called');
$headerData['page_name'] = 'Client Onboarding';
$headerData['tab_name'] = 'Client Onboarding';
$headerData['page_name'] = 'Clients';
$data['entity'] = $this->kycEntityTypeModel->findAll();
$data['kyc_docs'] = $this->kycDocsModel->findAll();
@ -621,19 +618,23 @@ class ClientController extends AdminController
// dd($data['placeHolders']);
// auto fetch client list and branch list from pre
$data['auto_fetch_client_list'] = $this->getClientListFromPre();
echo view('layout/header', $headerData);
echo view('client_onboarding', $data);
echo view('layout/footer');
}
// In your controller
public function deposit($id = null , $requestFrom = null , $policyId = null)
public function deposit($id = null, $requestFrom = null, $policyId = null)
{
$headerData['page_name'] = 'Client Deposit';
$headerData['tab_name'] = 'Client Deposit';
$headerData['page_name'] = 'Clients';
$data['clientName'] = $this->clientModel->where('id', $id)->find();
$data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id,$policyId);
$data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id, $policyId);
$data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($id);
@ -642,14 +643,16 @@ class ClientController extends AdminController
$data['balances'] = $balances;
// dd($data);
if($requestFrom == 'rest'){ return $data; }
if ($requestFrom == 'rest') {
return $data;
}
echo view('layout/header', $headerData);
echo view('client_deposit_list', $data);
echo view('layout/footer');
}
public function view_Deposit($insurerId , $requestFrom = null , $param = null)
public function view_Deposit($insurerId, $requestFrom = null, $param = null)
{
// Load your model to fetch data based on $clientId and $insurerId
// $subTypeOptions = [
@ -671,14 +674,14 @@ class ClientController extends AdminController
];
$data['subTypeOptions'] = $subTypeOptions;
$headerData['page_name'] = 'Client Deposit';
$headerData['tab_name'] = 'Client Deposit';
$headerData['page_name'] = 'Clients';
$loggedInUserID = get_session_userid();
// $data['clientData']= $this->clientPolicyModel->getinsurerswithinsurenceid($insurerId);
if($requestFrom == 'rest')
{
if ($requestFrom == 'rest') {
$clientId = $param['client_id'];
$cd_ac_pk = $param['cd_ac_pk'];
}else{
} else {
$clientId = $this->request->getGet('client_id');
$cd_ac_pk = $this->request->getGet('cd_ac_pk');
}
@ -689,7 +692,9 @@ class ClientController extends AdminController
$data['deposiamount'] = $this->clientPolicyModel->getDepositSummary($clientId, $insurerId, $cd_ac_pk);
$data['cd_ac_pk'] = $cd_ac_pk;
if($requestFrom == 'rest'){ return $data; }
if ($requestFrom == 'rest') {
return $data;
}
// Load the view for the new list page;
echo view('layout/header', $headerData);
@ -713,11 +718,11 @@ class ClientController extends AdminController
->first();
if(!empty($record_date)){
if (!empty($record_date)) {
// Prepare the array with data
$date = \DateTime::createFromFormat('d/m/Y', $record_date);
$record_date = $date->format('Y-m-d');
}else{
} else {
$record_date = null;
}
@ -751,7 +756,8 @@ class ClientController extends AdminController
{
$this->myLogger->logme('error', 'Edit Client Onboarding function called');
$headerData['page_name'] = 'Edit Client Onboarding';
$headerData['tab_name'] = 'Edit Client Onboarding';
$headerData['page_name'] = 'Clients';
$editData['RM'] = $this->userModel->where('is_active', 1)->findAll();
$editData['tpa'] = $this->tpaBranchModel->getTpaBranchesWithTpaNames();
@ -792,8 +798,12 @@ class ClientController extends AdminController
$editData['client_policy']['role'] = get_role_id();
$editData['notification'] = $this->notificationModel->select('template_name,enabled')->where('client_id', $id)->findAll();
$editData['placeHolders'] = ['member_name', 'member_mobile', 'nhance_logo', 'tpa_id', 'ecard_download_link', 'client_logo', 'policy_no', 'member_summary', 'app_link', 'post_enrollment_app_link', 'client_name'];
$editData['api_data'] = $this->clientApi->where("client_id", $id)->where("is_active",1)->first();
$editData['api_data'] = $this->clientApi->where("client_id", $id)->where("is_active", 1)->first();
// dd($editData);
$editData['auto_fetch_client_list'] = $this->getClientListFromPre();
echo view('layout/header', $headerData);
echo view('client_onboarding', $editData);
echo view('layout/footer');
@ -817,7 +827,7 @@ class ClientController extends AdminController
$data['is_download_btn'] = 1;
}
if(empty($data['parent_client_id'])){
if (empty($data['parent_client_id'])) {
$data['parent_client_id'] = null;
}
@ -851,7 +861,7 @@ class ClientController extends AdminController
$data['is_download_btn'] = 1;
}
if(empty($data['parent_client_id'])){
if (empty($data['parent_client_id'])) {
$data['parent_client_id'] = null;
}
// print_r($data);die;
@ -890,9 +900,9 @@ class ClientController extends AdminController
$insert = $this->clientKYCDocsModel->insert($data);
if ($insert) {
// $kycDocs = $this->clientKYCDocsModel->where('client_id', $this->request->getPost('client_id'))->findAll();
if($form_type == "others"){
if ($form_type == "others") {
$kycDocs = $this->generateKycOthersTable($this->request->getPost('client_id'));
}else{
} else {
$kycDocs = $this->generateKycPrimaryTable($this->request->getPost('client_id'));
}
return $this->respond(['status' => true, 'code' => 200, 'data' => $kycDocs, 'file_name' => $File], 200);
@ -920,9 +930,9 @@ class ClientController extends AdminController
if ($insert) {
// $kycDocs = $this->clientKYCDocsModel->getKycDocsName($id);
if($form_type == "others"){
if ($form_type == "others") {
$kycDocs = $this->generateKycOthersTable($this->request->getPost('client_id'));
}else{
} else {
$kycDocs = $this->generateKycPrimaryTable($this->request->getPost('client_id'));
}
return $this->respond(['status' => true, 'code' => 200, 'data' => $kycDocs], 200);
@ -1070,7 +1080,7 @@ class ClientController extends AdminController
$this->myLogger->logme('error', 'Client branch CREATE function called');
$data = $this->request->getPost();
// var_dump($data); die;
if (!isset($data['sez'])) {
$data['sez'] = 0;
} elseif ($data['sez']) {
@ -1383,9 +1393,9 @@ class ClientController extends AdminController
$data['insurer_id'] = $insurerId;
$tpaValue = (string) $this->request->getPost('tpa');
if(!empty($tpaValue) || $tpaValue !== ''){
if (!empty($tpaValue) || $tpaValue !== '') {
list($tpaBranchId, $tpaId) = explode('-', $tpaValue);
}else{
} else {
$tpaBranchId = null;
$tpaId = null;
}
@ -1461,7 +1471,7 @@ class ClientController extends AdminController
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($client_id);
$clientPoliceData['role'] = get_role_id();
if($policy_transaction_data > 0){
if ($policy_transaction_data > 0) {
$r = Jobs::addJob(['job_name' => 'updatePolicyTransactionDataWhileClinetPolicyUpdate', 'payload' => [
'old_client_policy_data' => $old_client_policy_data ?? null,
'new_client_policy_data' => $new_client_policy_data ?? null,
@ -1504,7 +1514,6 @@ class ClientController extends AdminController
} else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to remove policy'], 200);
}
} else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'The policy has active employees'], 200);
@ -1990,8 +1999,15 @@ class ClientController extends AdminController
// Check differences and prepare update data
$fields_to_check = [
'client_branch_id', 'policy_type', 'insurer_id', 'insurer_branch_id',
'cd_ac_pk', 'policy_end_date', 'policy_start_date', 'tpa_id', 'tpa_branch_id'
'client_branch_id',
'policy_type',
'insurer_id',
'insurer_branch_id',
'cd_ac_pk',
'policy_end_date',
'policy_start_date',
'tpa_id',
'tpa_branch_id'
];
foreach ($fields_to_check as $field) {
@ -2045,12 +2061,10 @@ class ClientController extends AdminController
'message' => "Policy transaction(s) updated.",
'updated_ids' => $updated_pt_ids
];
} else {
$this->myLogger->logme("error", "No active policy_transaction records found for update.");
return ['status' => "Failed", 'message' => "No active policy_transaction records found."];
}
} catch (\Throwable $e) {
$this->myLogger->logme("error", "Exception during policy_transaction update: " . $e->getMessage());
return [
@ -2096,7 +2110,6 @@ class ClientController extends AdminController
$errors[] = "No change or failed update for ID {$row['id']}";
}
}
} catch (\Exception $e) {
$errors[] = "Error updating pt_id {$pt_id}: " . $e->getMessage();
}
@ -2185,7 +2198,8 @@ class ClientController extends AdminController
}
}
public function generateKycPrimaryTable($client_id){
public function generateKycPrimaryTable($client_id)
{
$db = db_connect();
$builder = $db->table('kyc_docs kd');
@ -2210,7 +2224,8 @@ class ClientController extends AdminController
}
public function generateKycOthersTable($client_id){
public function generateKycOthersTable($client_id)
{
$result['data'] = $this->clientKYCDocsModel
->where('is_active', 1)
@ -2700,7 +2715,7 @@ class ClientController extends AdminController
if ($value !== null && $value !== '') {
$data[$field] = $needsCleanup ? str_replace(',', '', $value) : $value;
}else{
} else {
$data[$field] = $value;
}
}
@ -3115,7 +3130,7 @@ class ClientController extends AdminController
$value = $this->request->getPost($field);
if ($value !== null) {
$data[$field] = str_replace(',', '', $value);
}else{
} else {
$data[$field] = $value;
}
}
@ -3125,7 +3140,7 @@ class ClientController extends AdminController
$value = $this->request->getPost($field);
if ($value !== null) {
$data[$field] = $value;
}else{
} else {
$data[$field] = $value;
}
}
@ -3819,10 +3834,10 @@ class ClientController extends AdminController
$cd_data = array_merge($cd_data, $client_cd_data);
if($return_type == "internal"){
if(!empty($cd_data)){
if ($return_type == "internal") {
if (!empty($cd_data)) {
return $cd_data;
}else{
} else {
return [];
}
}
@ -3863,7 +3878,6 @@ class ClientController extends AdminController
$newKey = implode(' ', array_map('ucfirst', explode('_', $original_key)));
$data['enrollment_display_key'][$newKey] = $policy_terms[$original_key] ?? " ";
} else {
$data[$key] = $value;
@ -4421,9 +4435,9 @@ class ClientController extends AdminController
$cd_data = array_merge($cd_data, $client_cd_data);
if (!empty($cd_data)) {
return $this->respond([ 'status' => true,'code' => 200, 'data' => $cd_data], 200);
return $this->respond(['status' => true, 'code' => 200, 'data' => $cd_data], 200);
} else {
return $this->respond(['status' => false,'code' => 404,'client_id' => $client_id,'insurer_id' => $insurer_id,'insurer_branch_id' => $insurer_branch_id ], 200);
return $this->respond(['status' => false, 'code' => 404, 'client_id' => $client_id, 'insurer_id' => $insurer_id, 'insurer_branch_id' => $insurer_branch_id], 200);
}
}
@ -4461,7 +4475,7 @@ class ClientController extends AdminController
// Add additional fields if client type is 2
if ($client_type == 2) {
$client_data = array_merge($client_data, [
'dob' => change_date_format($postData['dob'],'d/m/Y','Y-m-d'),
'dob' => change_date_format($postData['dob'], 'd/m/Y', 'Y-m-d'),
'aadhar' => $postData['aadhar'],
'phone' => $postData['phone'],
'entity_type_id' => 7
@ -4519,7 +4533,7 @@ class ClientController extends AdminController
$client_type = $postData['client_type'] ?? null;
$client_insert = null;
if($client_type == 2){
if ($client_type == 2) {
$client_data = [
'client_type' => $postData['client_type'],
@ -4530,8 +4544,7 @@ class ClientController extends AdminController
];
$client_insert = $this->clientModel->insert($client_data);
}else if($client_type == 1){
} else if ($client_type == 1) {
$client_data = [
'client_type' => $postData['client_type'],
@ -4656,7 +4669,6 @@ class ClientController extends AdminController
];
$client_insert = $this->clientModel->insert($client_data);
} else if ($client_type == 1) {
$client_data = [
@ -4734,11 +4746,9 @@ class ClientController extends AdminController
'vehicles' => $vehicles,
'message' => 'Vehicle created successfully'
], 200);
} else {
return $this->respond(['status' => false, 'message' => 'Failed to created vehicle'], 200);
}
} else if (isset($data['owner']) && !empty($data['owner'])) {
$vehicle_data = [
@ -4780,7 +4790,6 @@ class ClientController extends AdminController
'vehicles' => $vehicles,
'message' => 'Vehicle created successfully'
], 200);
} else {
return $this->respond(['status' => false, 'message' => 'Failed to created vehicle'], 200);
}
@ -5036,30 +5045,28 @@ class ClientController extends AdminController
$is_addon = $data[$i]['is_addon'];
$payable_arr = [];
if (in_array($data[$i]['policy_type_id'], [2,3]) && $is_addon == 1) {
$payable_arr = [ "self" => 0, "spouse" => 0, "childern" => 0, "elders" => 0, ];
if (in_array($data[$i]['policy_type_id'], [2, 3]) && $is_addon == 1) {
$payable_arr = ["self" => 0, "spouse" => 0, "childern" => 0, "elders" => 0,];
} else if ($data[$i]['policy_type_id'] == 3 && $is_addon == 3) {
$payable_arr = ["self" => 1,"spouse" => 1,"childern" => 1,"elders" => 1,];
$payable_arr = ["self" => 1, "spouse" => 1, "childern" => 1, "elders" => 1,];
} else if (in_array($data[$i]['policy_type_id'], [4, 5])) {
$payable_arr = ["self" => 1,"spouse" => 1,"childern" => 1,"elders" => 1,];
$payable_arr = ["self" => 1, "spouse" => 1, "childern" => 1, "elders" => 1,];
}
// Initialize an empty array for the ordered policy terms
$orderedPolicyTerms = [];
if(in_array($data[$i]['policy_type_id'], [2,3,4,5])){
if (in_array($data[$i]['policy_type_id'], [2, 3, 4, 5])) {
// Set default value of copayzonewisecopay to "empty"
// $ans = isset($policyTerms['copayzonewisecopay']) ? $policyTerms['copayzonewisecopay'] : 'empty';
// add is_payable_employee for the GMC Policy
if (isset($policyTerms['age_ratio'])) {
if(!isset($policyTerms['is_payable_employee'])){
if (!isset($policyTerms['is_payable_employee'])) {
$aliment_index = array_search('age_ratio', array_keys($policyTerms));
$orderedPolicyTerms[] = [
"key" => "is_payable_employee",
@ -5097,7 +5104,7 @@ class ClientController extends AdminController
// Add ailmentcapping and ailmentcappingdata if they exist
if (isset($policyTerms['ailmentcapping'])) {
if(!isset($policyTerms['ailment_capping_details'])){
if (!isset($policyTerms['ailment_capping_details'])) {
$aliment_index = array_search('ailmentcapping', array_keys($policyTerms));
$orderedPolicyTerms[] = [
"key" => "ailment_capping_details",
@ -5106,12 +5113,11 @@ class ClientController extends AdminController
];
}
}
}else {
} else {
// add is_payable_employee for the GMC Policy
if (isset($policyTerms['age_ratio'])) {
if(!isset($policyTerms['is_payable_employee'])){
if (!isset($policyTerms['is_payable_employee'])) {
$aliment_index = array_search('age_ratio', array_keys($policyTerms));
$orderedPolicyTerms[] = [
"key" => "is_payable_employee",
@ -5121,9 +5127,9 @@ class ClientController extends AdminController
"position" => $aliment_index + 1,
];
}
}else{
} else {
if(!isset($policyTerms['is_payable_employee'])){
if (!isset($policyTerms['is_payable_employee'])) {
$orderedPolicyTerms[] = [
"key" => "is_payable_employee",
"value" => [
@ -5133,7 +5139,6 @@ class ClientController extends AdminController
];
}
}
}
foreach ($orderedPolicyTerms as $term) {
@ -5155,7 +5160,7 @@ class ClientController extends AdminController
}
}
if(in_array($data[$i]['policy_type_id'], [2,3,4,5])){
if (in_array($data[$i]['policy_type_id'], [2, 3, 4, 5])) {
if (!isset($policyTerms['waiver_of_90_days_waiting_period'])) {
$policyTerms['waiver_of_90_days_waiting_period'] = "";
@ -5204,8 +5209,7 @@ class ClientController extends AdminController
if (!isset($policyTerms['enrollment_display_key'])) {
$policyTerms['enrollment_display_key'] = $this->existingGMCDisplayValueTransform($policyTerms);
}
} else if($data[$i]['policy_type_id'] == 1){
} else if ($data[$i]['policy_type_id'] == 1) {
if (!isset($policyTerms['medical_expenses_medical_extension'])) {
$policyTerms['medical_expenses_medical_extension'] = "";
@ -5250,7 +5254,6 @@ class ClientController extends AdminController
if (!isset($policyTerms['enrollment_display_key'])) {
$policyTerms['enrollment_display_key'] = $this->existingGPADisplayValueTransform($policyTerms);
}
}
// dd($policyTerms);
@ -5557,7 +5560,7 @@ class ClientController extends AdminController
// $res = $empServiceController->employeesSIEnhanceProcess(['file_id' => '978']);
// $res = $empServiceController->employeeDisembark(['file_id' => '1681']);
// $res = $empServiceController->employeesCorrectionProcess(['file_id' => '2033']);
dd( $res);
dd($res);
$EmployeeMultiEventServiceController = new EmployeeMultiEventServiceController();
// $res = $EmployeeMultiEventServiceController->constructMultiEventData(['file_id' => '1069']);
@ -5831,19 +5834,15 @@ class ClientController extends AdminController
public function enrollmentAddonSIAmountDropdown($client_policy_id)
{
if(!empty($client_policy_id)){
if (!empty($client_policy_id)) {
$client_policy_details = $this->clientPolicyModel->where('id', $client_policy_id)->where('policy_status', 1)->where('is_active', 1)->first();
if(!empty($client_policy_details) && $client_policy_details['policy_type_id'] == 3 && $client_policy_details['is_addon'] == 3){
if (!empty($client_policy_details) && $client_policy_details['policy_type_id'] == 3 && $client_policy_details['is_addon'] == 3) {
$base_policy_id = $client_policy_details['base_policy'] ?? 0;
if(!empty($base_policy_id)){
if (!empty($base_policy_id)) {
}
}
}
}
@ -5858,7 +5857,7 @@ class ClientController extends AdminController
->orderBy('id', 'desc')
->first();
if($cd_amount){
if ($cd_amount) {
return $this->respond(['status' => true, 'code' => 200, 'data' => $cd_amount], 200);
} else {
return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200);
@ -6573,7 +6572,7 @@ class ClientController extends AdminController
if ($subKey !== 'Quote Asked' && isset($subVal['Total'])) {
$proposals[$key] = $value;
break;
}else{
} else {
$proposals[$key] = $value;
}
}
@ -6582,16 +6581,15 @@ class ClientController extends AdminController
if ($key === '' && isset($value['']) && is_array($value[''])) {
// Capture empty key to push it later
$emptyKeyData[$key] = $value;
}else{
} else {
$others[$key] = $value;
}
}
}
// dd($proposals, $others, $emptyKeyData);
// Sort proposals by their insurer's total
uasort($proposals, function($a, $b) {
uasort($proposals, function ($a, $b) {
$totalA = 0;
$totalB = 0;
@ -6658,9 +6656,9 @@ class ClientController extends AdminController
if (in_array($header['parentHeader'], array_keys($sortedProposalOrder))) {
$proposalHeaders[$header['parentHeader']] = $header;
} else {
if($header['parentHeader'] == "Action"){
if ($header['parentHeader'] == "Action") {
$actionHeader[] = $header;
}else{
} else {
$staticHeaders[] = $header;
}
}
@ -6696,9 +6694,9 @@ class ClientController extends AdminController
if (in_array($entry['parentth'], array_keys($sortedProposalOrder))) {
$proposalData[$entry['parentth']][] = $entry;
} else {
if($entry['parentth'] == "Action"){
if ($entry['parentth'] == "Action") {
$actionData[] = $entry;
}else{
} else {
$staticData[] = $entry;
}
}
@ -6717,9 +6715,9 @@ class ClientController extends AdminController
$increament = 0;
foreach ($reorderedProposalData as $key => &$value) {
if($dubParTh == $value['parentth']){
if ($dubParTh == $value['parentth']) {
$value['parentth'] = 'Proposal ' . ($increament);
}else{
} else {
$dubParTh = $value['parentth'];
$increament = $increament + 1;
$value['parentth'] = 'Proposal ' . ($increament);
@ -6764,20 +6762,18 @@ class ClientController extends AdminController
$receivedData = $this->request->getPost();
if (!empty($receivedData['id'])){
if (!empty($receivedData['id'])) {
$status = $this->clientApi->save($receivedData);
}else{
} else {
$status = $this->clientApi->insert($receivedData);
}
if ($status){
return $this->respond(['status'=>"Sucesss",'message'=>"Submitted Successfully"],200);
}else{
return $this->respond(['status'=>"Failed",'message'=>"Submission Faild"],500);
if ($status) {
return $this->respond(['status' => "Sucesss", 'message' => "Submitted Successfully"], 200);
} else {
return $this->respond(['status' => "Failed", 'message' => "Submission Faild"], 500);
}
}
public function sendToken()
@ -6787,10 +6783,10 @@ class ClientController extends AdminController
$token = ClientTokenHelper::generateKey($client_id);
if ($token){
return $this->respond(['status' => 'success', 'token' => $token,'message' => "Token Generated Successfully"],200);
}else{
return $this->respond(['status' => "Failed","message"=>"Token Generation Failed, Try Again After some time"],500);
if ($token) {
return $this->respond(['status' => 'success', 'token' => $token, 'message' => "Token Generated Successfully"], 200);
} else {
return $this->respond(['status' => "Failed", "message" => "Token Generation Failed, Try Again After some time"], 500);
}
}
@ -6817,7 +6813,8 @@ class ClientController extends AdminController
$post_client_data = $this->clientModel->where('id', $client_id)->where('is_active', 1)->first();
$hrAccessData['post_hr_data'] = $this->clientBranchModel
->select('lc.id as post_hr_id, lc.name as hr_name, lc.mobile as hr_mobile, lc.email as hr_mail')
->select('lc.id as post_hr_id, lc.name as hr_name, lc.mobile as hr_mobile, lc.email as hr_mail ,
client_branch.id as post_branch_id , client_branch.branch_name as post_branch_name')
->join('level_contacts lc', 'client_branch.id = lc.ref_id')
->where('client_branch.is_active', 1)
->where('lc.is_active', 1)
@ -6826,7 +6823,7 @@ class ClientController extends AdminController
->findAll();
$hrAccessData['post_policy_data'] = $this->clientPolicyModel
->select('client_policy.id as client_policy_id, client_policy.policy_no as policy_no, policy_type.policy_type, client_policy.policy_status')
->select('client_policy.id as client_policy_id, client_policy.policy_no as policy_no, policy_type.policy_type, client_policy.policy_status , client_policy.client_branch_id as branch_id')
->join('policy_type', 'client_policy.policy_type_id = policy_type.id')
->where('client_policy.is_active', 1)
->where('client_policy.client_id', $client_id)
@ -6855,22 +6852,23 @@ class ClientController extends AdminController
$hrAccessData['pre_hr_data'] = [];
$hrAccessData['pre_policy_data'] = [];
$combinedHrAccessData = $this->constructHrAccessData($hrAccessData, $client_id);
$combinedHrAccessData = $this->constructHrAccessData($hrAccessData, $client_id , $pre_client_data['id']??'');
return $combinedHrAccessData;
}
$pre_client_data = $db2->table('clients')->where('is_active', 1)->where('short_name', $post_client_data['short_name'])->get()->getRowArray();
if(empty($pre_client_data)){
if (empty($pre_client_data)) {
$hrAccessData['pre_hr_data'] = [];
$hrAccessData['pre_policy_data'] = [];
$combinedHrAccessData = $this->constructHrAccessData($hrAccessData, $client_id);
$combinedHrAccessData = $this->constructHrAccessData($hrAccessData, $client_id , $pre_client_data['id']??'');
return $combinedHrAccessData;
}
$hrAccessData['pre_hr_data'] = $db2->table('client_branch')
->select('lc.id as pre_hr_id, lc.name as hr_name, lc.mobile as hr_mobile, lc.email as hr_mail')
->select('lc.id as pre_hr_id, lc.name as hr_name, lc.mobile as hr_mobile, lc.email as hr_mail
, client_branch.id as pre_branch_id , client_branch.branch_name as pre_branch_name ' )
->join('level_contacts lc', 'client_branch.id = lc.ref_id')
->where('client_branch.is_active', 1)
->where('lc.is_active', 1)
@ -6880,7 +6878,7 @@ class ClientController extends AdminController
->getResultArray();
$hrAccessData['pre_policy_data'] = $db2->table('client_policy')
->select('client_policy.id as client_policy_id, client_policy.policy_no as policy_no, policy_type.policy_type, client_policy.policy_status')
->select('client_policy.id as client_policy_id, client_policy.policy_no as policy_no, policy_type.policy_type, client_policy.policy_status , client_policy.client_branch_id as branch_id')
->join('policy_type', 'client_policy.policy_type_id = policy_type.id')
->where('client_policy.is_active', 1)
->where('client_policy.client_id', $pre_client_data['id'])
@ -6888,16 +6886,16 @@ class ClientController extends AdminController
->orderBy('client_policy.policy_status', 'desc')
->get()
->getResultArray();
// dd($hrAccessData);
$combinedHrAccessData = $this->constructHrAccessData($hrAccessData, $client_id);
$combinedHrAccessData = $this->constructHrAccessData($hrAccessData, $client_id ,$pre_client_data['id']);
return $combinedHrAccessData;
}
public function constructHrAccessData($data, $client_id)
public function constructHrAccessData($data, $client_id , $pre_client_id)
{
// dd($data);
// print_rr($data);die;
$preHrs = $data['pre_hr_data'];
$postHrs = $data['post_hr_data'];
$hrAccessTableData = $data['hr_access_table_data'];
@ -6913,7 +6911,10 @@ class ClientController extends AdminController
'post_hr_id' => $post['post_hr_id'],
'hr_name' => $post['hr_name'],
'hr_mobile' => $post['hr_mobile'],
'hr_mail' => $post['hr_mail']
'hr_mail' => $post['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null,
'post_branch_name' => $post['post_branch_name'] ?? null
];
unset($preHrs[$index]); // remove matched pre_hr
$found = true;
@ -6927,7 +6928,10 @@ class ClientController extends AdminController
'post_hr_id' => $post['post_hr_id'],
'hr_name' => $post['hr_name'],
'hr_mobile' => $post['hr_mobile'],
'hr_mail' => $post['hr_mail']
'hr_mail' => $post['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null ,
'post_branch_name' => $post['post_branch_name'] ?? null
];
}
}
@ -6939,7 +6943,10 @@ class ClientController extends AdminController
'post_hr_id' => null,
'hr_name' => $pre['hr_name'],
'hr_mobile' => $pre['hr_mobile'],
'hr_mail' => $pre['hr_mail']
'hr_mail' => $pre['hr_mail'],
'pre_branch_id' => $pre['pre_branch_id'] ?? null,
'post_branch_id' => $post['post_branch_id'] ?? null ,
'post_branch_name' => $post['post_branch_name'] ?? null
];
}
@ -6964,9 +6971,12 @@ class ClientController extends AdminController
'hr_name' => $hr['hr_name'] ?? null,
'hr_mobile' => $hr['hr_mobile'] ?? null,
'hr_mail' => $hr['hr_mail'] ?? null,
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null
];
}
} else {
// First create a map of HR data by post_hr_id for quick lookup
$hrMap = [];
@ -7000,7 +7010,11 @@ class ClientController extends AdminController
'allowed_cd' => json_decode($access['allowed_cd'], true) ?? [],
'hr_name' => $hr['hr_name'],
'hr_mobile' => $hr['hr_mobile'],
'hr_mail' => $hr['hr_mail']
'hr_mail' => $hr['hr_mail'],
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null
];
// Remove from map so we know it's been processed
@ -7025,6 +7039,10 @@ class ClientController extends AdminController
'hr_name' => $hr['hr_name'] ?? null,
'hr_mobile' => $hr['hr_mobile'] ?? null,
'hr_mail' => $hr['hr_mail'] ?? null,
'pre_branch_id' => $hr['pre_branch_id'] ?? null,
'post_branch_id' => $hr['post_branch_id'] ?? null ,
'post_branch_name' => $hr['post_branch_name'] ?? null ,
'pre_client_id' => $pre_client_id ?? null
];
}
}
@ -7034,8 +7052,6 @@ class ClientController extends AdminController
$resultData['pre_policy_data'] = $data['pre_policy_data'];
$resultData['post_policy_data'] = $data['post_policy_data'];
$resultData['post_cd_data'] = $data['post_cd_data'];
// echo '**********************************************';
// print_rr($resultData);die();
return $resultData;
}
@ -7078,6 +7094,10 @@ class ClientController extends AdminController
// INSERT or UPDATE
if (empty($value['pk']) || (int)$value['pk'] === 0) {
print_rr("inside insert block");
print_rr($value);die;
unset($value['pk']); // Prevent insert error
$insertedId = $this->HRAccessControlModel->insert($value);
if ($insertedId === false) {
@ -7086,6 +7106,9 @@ class ClientController extends AdminController
$success[] = "Inserted row at index {$index} with ID {$insertedId}.";
} else {
$update = $this->HRAccessControlModel->update($value['pk'], $value);
print_rr("inside update block");
print_rr($value);die;
if ($update === false) {
throw new \Exception('Update failed for ID ' . $value['pk'] . ': ' . json_encode($this->HRAccessControlModel->errors()));
}
@ -7119,7 +7142,6 @@ class ClientController extends AdminController
'details' => $success,
'data' => $html,
], 200);
} else {
return $this->respond([
'status' => false,
@ -7457,6 +7479,84 @@ class ClientController extends AdminController
return $this->respond(['status' => true, 'message' => 'Demo client data wiped successfully'], 200);
}
private function getClientlistFromPre (){
$db2 = \Config\Database::connect('preDB');
$auto_fetch_client_list = $db2->table('clients')
->select('id,client_name')
->where('is_active',1)
->get()->getResultArray()??[];
return $auto_fetch_client_list;
}
public function auto_fetch_branch(){
$data = $this->request->getPost();
$db2 = \Config\Database::connect('preDB');
$auto_fetch_branch_list = $db2->table('client_branch')
->select('id,branch_name')
->where('client_id',$data['client_id'])
->where('is_active',1)
->get()->getResultArray()??[];
return
empty($auto_fetch_branch_list)
? $this->response->setJSON([
'status' => false,
'message' => 'branch list is empty',
'data' => []
])->setStatusCode(400)
: $this->response->setJSON([
'status' => true,
'message' => 'branch list is found' ,
'data' => $auto_fetch_branch_list
])->setStatusCode(200);
}
public function auto_fetch_branch_details(){
$data = $this->request->getPost();
$db2 = \Config\Database::connect('preDB');
$auto_fetch_branch_details = $db2->table('client_branch')
->where('client_id',$data['client_id'])
->where('id',$data['branch_id'])
->where('is_active',1)
->get()->getResultArray()??[];
return empty($auto_fetch_branch_details)
? $this->response->setJSON([
'status' => false,
'message' => 'branch details is empty',
'data' => []
])->setStatusCode(400)
: $this->response->setJSON([
'status' => true,
'message' => 'branch details found' ,
'data' => $auto_fetch_branch_details
])->setStatusCode(200);
}
}

View File

@ -259,7 +259,7 @@ class DashboardController extends AdminController
// dd(get_role_id(),user_team());
// dd($data);
$data['tab_name'] = 'Dashboard';
$data['page_name'] = 'Dashboard';
echo view('layout/header', $data);

View File

@ -135,6 +135,9 @@ class EmployeeController extends AdminController
// dd($this->request->getGet());
$this->myLogger->logme('error', 'list called');
$data['page_name'] = "Members";
$this->loadLayout('employee_list', $data);
}
@ -307,6 +310,7 @@ class EmployeeController extends AdminController
return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => 'file upload success'], 200);
}
$data['tab_name'] = 'View Inception';
$data['page_name'] = 'View Inception';
//for TPA/insurer upload
@ -786,6 +790,9 @@ class EmployeeController extends AdminController
}
$this->myLogger->logme('error', 'list called');
$data['page_name'] = "Endorsement";
$this->loadLayout('endorsement_list', $data);
}
@ -830,6 +837,9 @@ class EmployeeController extends AdminController
// dd($data);
$this->myLogger->logme('error', 'list called');
$data['page_name'] = "Enrollment";
return $this->loadLayout('enrollment_list', $data);
}
@ -3039,6 +3049,8 @@ class EmployeeController extends AdminController
// print_r($data); die;
// }
$data['page_name'] = "Retail Endorsement";
$this->loadLayout('retail_endorsement_list', $data);
}

View File

@ -12,18 +12,18 @@ class ICICILombardController extends AdminController
public function generateAuthToken($scope = 'esbhealth')
{
helper('api');
$url = 'https://ilesbapigee.insurancearticlez.com/generate-jwt-token';
$url = env('ICICI_TOKEN_URL');
$method = 'POST';
$headers = [
'Content-Type: application/x-www-form-urlencoded'
];
$body = [
'grant_type' => 'password',
'username' => 'Nhanceins',
'password' => 'SSWW7bFNaLxxQyw',
'scope' => $scope,
'client_id' => 'Nhanceins',
'client_secret' => 'P4W0G6TAYMa0MV8bbVSx4pTAqbCcUIg48kCWa6PJykAhGWzPmpPr0iLuNWtz5wqN'
'grant_type' => env('ICICI_GRANT_TYPE'),
'username' => env('ICICI_USER_NAME'),
'password' => env('ICICI_PASSWORD'),
'scope' => env('ICICI_API_SCOPE'),
'client_id' => env('ICICI_CLIENT_ID'),
'client_secret' => env('ICICI_CLIENT_SECRET')
];
$response = call_third_party_api($url, $method, $headers, $body);
@ -42,8 +42,6 @@ class ICICILombardController extends AdminController
public function createEnrollmentBatch()
{
$client_id = $this->request->getGet('client_id');
$client_branch_id = $this->request->getGet('client_branch_id');
$policy_id = $this->request->getGet('policy_id');
@ -61,7 +59,7 @@ class ICICILombardController extends AdminController
$token = $tokenResponse['data']['access_token'];
$url = 'https://ilesbapigee.insurancearticlez.com/health/ilservices/health/v1/enrollment/batchcreation';
$url = env('ICICI_BASE_URL').'/batchcreation';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
@ -71,7 +69,7 @@ class ICICILombardController extends AdminController
//Prepare body data
$db = \Config\Database::connect();
$data = $db->table('employee_polices ep')
->select('cp.policy_no as policyNumber,
->select('cp.policy_no as policyNumber, cp.cd_ac_no as CDBGAccountNumber,
e.id,e.emp_code as MemberEmpId, e.doj as DOJ, e.name as InsuredName, e.dob as DOB, e.relationship as Relationship,
e.gender as Gender, ep.date_coverage as DOC,ep.basic_cover_si as SumInsured, e.email_corporate as EmailId
')
@ -85,7 +83,7 @@ class ICICILombardController extends AdminController
->getResultArray();
$body = $this->formatPolicyData($data);
dd($body);
// dd($body);
$response = call_third_party_api($url, 'POST', $headers, $body, true); // true = raw body mode
// print_rr(json_encode($response));die();
@ -108,7 +106,7 @@ class ICICILombardController extends AdminController
$token = $tokenResponse['data']['access_token'];
$url = 'https://ilesbapigee.insurancearticlez.com/health/ilservices/health/v1/enrollment/batchstatus';
$url = env('ICICI_BASE_URL').'/batchstatus';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json'
@ -144,7 +142,7 @@ class ICICILombardController extends AdminController
// print_rr($token);
$url = 'https://ilesbapigee.insurancearticlez.com/health/ilservices/health/v1/enrollment/fetchuhid';
$url = env('ICICI_BASE_URL').'/fetchuhid';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json'
@ -161,7 +159,6 @@ class ICICILombardController extends AdminController
return $this->response->setJSON($response);
}
public function formatPolicyData($data)
{
// Helper to format date
@ -203,7 +200,7 @@ class ICICILombardController extends AdminController
// Final body
return [
"PolicyNumber" => $data[0]['policyNumber'] ?? null,
"CDBGAccountNumber" => "CD-MUM-0026",
"CDBGAccountNumber" => $data[0]['CDBGAccountNumber'] ?? null , // "CD-MUM-0026",
"CorrelationId" => $generateUUID(),
"MemberDetails" => $memberDetails
];

View File

@ -142,6 +142,7 @@ class LeadsController extends BaseController
public function viewLeadsList()
{
$data['tab_name'] = 'Leads';
$data['page_name'] = 'Leads';
// Set basic data
@ -899,6 +900,7 @@ class LeadsController extends BaseController
: null;
$data['question_json'] = $lead_data['question_json'];
$data['tab_name'] = $type == 2 ? 'QCR' : 'RFQ';
$data['page_name'] = $type == 2 ? 'QCR' : 'RFQ';
$data['lead_data'] = $lead_data;

View File

@ -107,7 +107,8 @@ class MasterController extends AdminController
public function insurerList()
{
$this->myLogger->logme('error','Insurer list function called');
$headerData['page_name'] = 'Insurer List';
$headerData['tab_name'] = 'Insurer List';
$headerData['page_name'] = 'Insurers';
$data['insurerList'] = $this->insurerModel->where('is_active',1)->findAll();
$data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
// echo '<pre>';
@ -154,7 +155,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Edit Insurer Onboarding function called');
$headerData['page_name'] = 'Edit Insurer Master';
$headerData['tab_name'] = 'Edit Insurer Master';
$headerData['page_name'] = 'Insurers';
$types = array(
(object) array('id' => 'pvt', 'name' => 'PVT'),
@ -245,7 +247,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Insurer Onboarding function called');
$headerData['page_name'] = 'Insurer Master';
$headerData['tab_name'] = 'Insurer Master';
$headerData['page_name'] = 'Insurers';
$types = array(
(object) array('id' => 'pvt', 'name' => 'PVT'),
@ -504,7 +507,8 @@ class MasterController extends AdminController
public function tpaList()
{
$this->myLogger->logme('error','TPA list function called');
$headerData['page_name'] = 'TPA List';
$headerData['tab_name'] = 'TPA List';
$headerData['page_name'] = 'TPA';
$data['tpaList'] = $this->tpaModel->where('is_active',1)->findAll();
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
// echo '<pre>';
@ -550,7 +554,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','TPA Onboarding function called');
$headerData['page_name'] = 'TPA Master';
$headerData['tab_name'] = 'TPA Master';
$headerData['page_name'] = 'TPA';
// print_r($data['types']);die();
@ -664,7 +669,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Edit TPA Onboarding function called');
$headerData['page_name'] = 'Edit TPA Master';
$headerData['tab_name'] = 'Edit TPA Master';
$headerData['page_name'] = 'TPA';
$tpa_data = $this->tpaModel->where(['id' => $id, 'is_active' => 1])->first();
@ -833,7 +839,8 @@ class MasterController extends AdminController
public function kycList()
{
$this->myLogger->logme('error','KYC list function called');
$headerData['page_name'] = 'KYC List';
$headerData['tab_name'] = 'KYC List';
$headerData['page_name'] = 'KYC';
$data['kycList'] = $this->kycEntityTypeModel->where('is_active',1)->findAll();
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
// echo '<pre>';
@ -879,7 +886,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','KYC Onboarding function called');
$headerData['page_name'] = 'KYC Master';
$headerData['tab_name'] = 'KYC Master';
$headerData['page_name'] = 'KYC';
// print_r($data['types']);die();
@ -944,7 +952,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Edit KYC Onboarding function called');
$headerData['page_name'] = 'Edit KYC Master';
$headerData['tab_name'] = 'Edit KYC Master';
$headerData['page_name'] = 'KYC';
$editData['kyc'] = $this->kycEntityTypeModel->where(['id' => $id, 'is_active' => 1])->first();
$editData['kyc_docs'] = $this->kycDocsModel->where(['kyc_type_id' => $id, 'is_active' => 1])->findAll();
@ -1022,7 +1031,8 @@ class MasterController extends AdminController
public function policyTypeList()
{
$this->myLogger->logme('error','Policy Type list function called');
$headerData['page_name'] = 'Policy Type List';
$headerData['tab_name'] = 'Policy Type List';
$headerData['page_name'] = 'Policy Type';
$data['policyList'] = $this->policyTypeModel->where('is_active',1)->findAll();
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
// echo '<pre>';
@ -1068,7 +1078,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Policy Type Onboarding function called');
$headerData['page_name'] = 'Policy Type Master';
$headerData['tab_name'] = 'Policy Type Master';
$headerData['page_name'] = 'Policy Type';
// print_r($data['types']);die();
@ -1130,7 +1141,8 @@ class MasterController extends AdminController
{
$this->myLogger->logme('error','Edit KYC Onboarding function called');
$headerData['page_name'] = 'Edit Policy Type';
$headerData['tab_name'] = 'Edit Policy Type';
$headerData['page_name'] = 'Policy Type';
$editData['policytype'] = $this->policyTypeModel->where(['id' => $id, 'is_active' => 1])->first();
$editData['policies'] = $this->policesModel->select('policies.*, insurers.name as insurer_name')
@ -1222,7 +1234,8 @@ class MasterController extends AdminController
//start CD Master list
public function CDMasterList()
{
$data['page_name'] = 'CD Master List';
$data['tab_name'] = 'CD Master List';
$data['page_name'] = 'CD Master';
$data['CD_Master_Data'] = $this->CDMasterModel->getCDMasterList();
$data['insurers'] = $this->insurerModel->where('is_active', 1)->findAll();
$data['insurer_branch'] = $this->insurerBranchModel->where('is_active', 1)->findAll();
@ -1605,8 +1618,8 @@ class MasterController extends AdminController
//Vehicle Master data Function
public function VehicleMasterList()
{
$data['page_name'] = 'Vehicle Master List';
{ $data['tab_name'] = 'Vehicle Master';
$data['page_name'] = 'Vehicles';
$data['vehicle_type'] = [
'two_wheeler' => 'Two Wheeler',
'four_wheeler' => 'Four Wheeler',

View File

@ -114,6 +114,7 @@ class PolicyTransactionController extends BaseController
// Policy Transaction Inception
public function viewInception()
{
$data['tab_name'] = 'Policy';
$data['page_name'] = 'Policy';
// Static arrays for dropdowns
@ -1075,6 +1076,7 @@ class PolicyTransactionController extends BaseController
// echo '<pre>';
// !dd($this->getEndorsementDataForEdit(17));
$data['tab_name'] = 'Endorsement';
$data['page_name'] = 'Endorsement';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
$data['issuer_branch'] = $this->nhanceBranchModel->where('is_active', 1)->findAll();
@ -1771,7 +1773,7 @@ class PolicyTransactionController extends BaseController
//get BDS Reports data old function
public function reportBDSOld()
{
$data['tab_name'] = 'BDS Report';
$data['page_name'] = 'BDS Report';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -1833,6 +1835,7 @@ class PolicyTransactionController extends BaseController
public function reportBDS()
{
$data['tab_name'] = 'BDS Report';
$data['page_name'] = 'BDS Report';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -1926,6 +1929,7 @@ class PolicyTransactionController extends BaseController
public function reportVarience()
{
$data['tab_name'] = 'Variance Report';
$data['page_name'] = 'Variance Report';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -1975,6 +1979,7 @@ class PolicyTransactionController extends BaseController
public function reportBusinessList()
{
$data['tab_name'] = 'Business Report';
$data['page_name'] = 'Business Report';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -2015,6 +2020,7 @@ class PolicyTransactionController extends BaseController
public function reportFinanceList()
{
$data['tab_name'] = 'Finance Report';
$data['page_name'] = 'Finance Report';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -2055,6 +2061,7 @@ class PolicyTransactionController extends BaseController
public function reportOutstanding()
{
$data['tab_name'] = 'Outstanding Report';
$data['page_name'] = 'Outstanding Report';
$data['issuer'] = [1 => 'JIBS', 2 => 'Nhance'];
@ -2133,6 +2140,7 @@ class PolicyTransactionController extends BaseController
->findAll();
// dd( $this->insurerStatements->getLastQuery());
$data['tab_name'] = 'Statement Upload';
$data['page_name'] = 'Statement Upload';
$this->loadLayout('insurer_statement_list', $data);
@ -2710,8 +2718,8 @@ class PolicyTransactionController extends BaseController
$data['files'] = array_merge($pt_files, $kyc_files, $batch_files, $files);
// dd($data['files']);
}
$data['page_name'] = 'Documents Search';
$data['tab_name'] = 'Documents Search';
$data['page_name'] = 'Documents';
$data['customers'] = $this->clientModel->select('id,client_name,short_name as display_value')->where('is_active', 1)->get()->getResultarray();
$data['policies'] = $this->clientPolicyModel->select("client_policy.id,client_policy.policy_no,policy_type.policy_type,concat(policy_type.policy_type,' - ',client_policy.policy_no) as display_value")

View File

@ -625,7 +625,7 @@ class RestAuthenticationController extends AdminController
public function getVerifiedHrData()
{
try {
// try {
// mobile number
$otp_verification = isset($this->request->getJSON()->otp_verification) ? $this->request->getJSON()->otp_verification : null;
$mobile_number = isset($this->request->getJSON()->mobile_no) ? $this->request->getJSON()->mobile_no : null;
@ -660,23 +660,26 @@ class RestAuthenticationController extends AdminController
if(isset($this->request->getJSON()->mobile_no)){
$hrData = $this->hrModel ->select('level_contacts.* , client_branch.client_id as client_id')
$getAllhrData = $this->hrModel->select('level_contacts.mobile , level_contacts.email , clients.id as client_id, clients.client_name, clients.short_name , client_branch.id as client_branch_id,client_branch.branch_name')
->join('client_branch', 'level_contacts.ref_id = client_branch.id', 'left')
->join('clients', 'client_branch.client_id = clients.id', 'left')
->where('level_contacts.mobile', $mobile_number )
->where('level_contacts.contact_type', 'client')
->find();
->findAll();
}else if(isset($this->request->getJSON()->otp)){
$this->hrModel->where('email', $email)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update();
$hrData = $this->hrModel ->select('level_contacts.* , client_branch.client_id as client_id')
$getAllhrData = $this->hrModel->select('level_contacts.mobile , level_contacts.email , clients.id as client_id, clients.client_name, clients.short_name , client_branch.id as client_branch_id,client_branch.branch_name')
->join('client_branch', 'level_contacts.ref_id = client_branch.id', 'left')
->join('clients', 'client_branch.client_id = clients.id', 'left')
->where('level_contacts.email', $email )
->where('level_contacts.contact_type', 'client')
->find();
->findAll();
}
print_rr($getAllhrData); die;
$HRAccessData = $this->getHRAccessData( $hrData['0']['id'] , 'post_enrollment');
if(isset($HRAccessData['allowed_modules'])){ $hrData['0']['allowed_modules'] = json_decode($HRAccessData['allowed_modules'],true)['post']; }else{ $hrData['0']['allowed_modules'] = []; }
@ -690,11 +693,11 @@ class RestAuthenticationController extends AdminController
} else {
return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP" ],200);
}
} catch (\Exception $e) {
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500);
return $this->respond(['status' => 'failed','code' => 404,'data' => "" ],200);
}
// } catch (\Exception $e) {
// return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500);
// }
}
@ -991,7 +994,7 @@ class RestAuthenticationController extends AdminController
// // $result = $employeeData;
// return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
// } else {
// return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200);
// return $this->respond(['status' => 'failed','code' => 404,'data' => ""],200);
// }
// } catch (\Exception $e) {
// return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500);
@ -1016,7 +1019,7 @@ class RestAuthenticationController extends AdminController
// print_r($mpin);
if (!$mpin) {
return $this->respond(['status' => 'failed', 'code' => 400, 'data' => 'MPIN is required'], 400);
return $this->respond(['status' => 'failed', 'code' => 400, 'data' => "", 'message' => 'MPIN is required'], 400);
}
if ($mobile_number) {
@ -1057,7 +1060,7 @@ class RestAuthenticationController extends AdminController
$employeeData = $builder->orderBy('employees.id', 'desc')->first();
} else {
return $this->respond(['status' => 'failed', 'code' => 400, 'data' => 'Mobile number or Email ID is required'], 400);
return $this->respond(['status' => 'failed', 'code' => 400, 'data' => "", 'message' => 'Mobile number or Email ID is required'], 400);
}
$lastQuery = $this->employeeModel->db->getLastQuery();
@ -1095,14 +1098,14 @@ class RestAuthenticationController extends AdminController
log_message('error', ' ************************************* POST END **************************************** ');
log_message('error', ' ');
return $this->respond(['status' => 'failed','code' => 404,'data' => 'Invalid MPIN'], 200);
return $this->respond(['status' => 'failed','code' => 404, 'data' => "", 'message' => 'Invalid MPIN'], 200);
}
} catch (\Exception $e) {
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - verifyMpin: Exception: " . $e->getMessage() . " --- Line: " . $e->getLine() . " --- Trace: " . $e->getTraceAsString());
log_message('error', ' ');
log_message('error', ' ************************************* POST END **************************************** ');
log_message('error', ' ');
return $this->respond(['status' => 'failed','code' => 500, 'data' => $e->getMessage()], 500);
return $this->respond(['status' => 'failed','code' => 500, 'data' => "", 'message' => $e->getMessage()], 500);
}
}

View File

@ -5,6 +5,7 @@ namespace App\Controllers;
use App\Controllers\BaseController;
use App\Models\EmployeePolicyModel;
use App\Models\InsurerBranchModel;
use App\Models\RFQModel;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\API\ResponseTrait;
use Dompdf\Dompdf;
@ -313,4 +314,36 @@ class TestingController extends BaseController
return $html;
}
public function viewRFQNonEb()
{
$insurerBranchModel = new InsurerBranchModel();
$data['page_name'] = "RFQ NON EB";
$data['insurer'] = $insurerBranchModel->getInsurerBranchesWithInsurerNames();
// dd($data);
return $this->loadLayout('view_rfq_non_eb_new', $data);
}
public function saverfq(){
$json = $this->request->getPost('json');
$json = json_encode($json);
print_r($json);
// $data['lead_id'] = 10000;
// $data['json'] = $json;
// $rfq = new RFQModel();
// $rfq->insert($data);
}
public function exportExcel()
{
$rfq = new RFQModel();
$policy_data = $rfq->where('lead_id', 10000)->first();
// print_rr($policy_data['json']); die;
$policy_data = json_decode($policy_data['json'], true);
$policy_data = array_slice($policy_data, 0, -2);
print_rr($policy_data); die;
dd($policy_data);
}
}

View File

@ -120,9 +120,8 @@ class ThzController extends BaseController
if ($returnType === 'api') {
if (empty($tickets)) {
// return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found'])->setStatusCode(404);
$this->myLogger->logme('error', 'empty tickets in ticket list: ' . json_encode($tickets));
throw new \RuntimeException('No tickets found', 400);
return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found'])->setStatusCode(404);
}
} else {
$data['ticket_data'] = $tickets;

View File

@ -362,6 +362,7 @@ class TicketController extends BaseController
$data['modeOFIntimate'] = $this->modeOFIntimate;
$data['priorityType'] = $this->priorityType;
$data['claimType'] = $this->claimType;
$data['tab_name'] = "Claims";
if ($this->request->is('get')) {
$data['page_name'] = "Claims";
$data['claim_status'] = $this->claimStatus->select('id,ticket_type,claim_status')->where('is_active', 1)->findAll();
@ -1123,6 +1124,9 @@ class TicketController extends BaseController
// dd($data['ticket_data']);
$data['ticket_type'] = $this->ticketType;
$data['trigger_type'] = $this->triggerType;
$data['page_name'] = "Claims";
return $this->loadLayout('ticket_mail_template', $data);
}
@ -1744,6 +1748,8 @@ class TicketController extends BaseController
'tat_band_wise' => 'TAT Wise Status Report'
];
//
$data['tab_name'] = "Claim Reports";
$data['page_name'] = "Claims";
$this->loadLayout('ticket_reports', $data);
} else {
$received_data = $this->request->getPost();
@ -2187,6 +2193,8 @@ class TicketController extends BaseController
$data['viewer'] = !empty($empView) ? $empView : 0;
// dd($data);
return view('ticket_feedback_form', $data);
}else{
@ -2217,7 +2225,7 @@ class TicketController extends BaseController
public function feedbackList(){
$data['feedback_data'] = $this->ticketMasterModel->select("ticket_master.*,clients.client_name")->join("clients","clients.id = ticket_master.client_id")->where("ticket_master.is_active",1)->where("ticket_master.feedback_json IS NOT NULL", null, false)->where("ticket_master.feedback_json !=", "")->findAll();
$data['page_name'] = "Claims";
// dd($data);
$this->loadLayout("ticket_feedback_list",$data);
}
@ -2610,7 +2618,8 @@ class TicketController extends BaseController
public function claimDumpUpload()
{
$data['page_name'] = "Claim Dupm Upload";
$data['tab_name'] = "Claim Dupm Upload";
$data['page_name'] = "Claims";
if($this->request->is('get')){

View File

@ -55,7 +55,8 @@ class UserController extends AdminController
public function list()
{
$data['page_name'] = 'User';
$data['tab_name'] = 'Users';
$data['page_name'] = 'Users';
$this->myLogger->logme('error','User list function called');
$data['UserList'] = $this->userModel->getUserList();
// echo '<pre>';
@ -588,6 +589,7 @@ class UserController extends AdminController
$data = $this->request->getPost();
if (!empty($data['id'])) {
$text = "update";
$data['updated_by'] = get_session_userid();
$result = $this->partnerStaffModel->update($data['id'], $data);
$updateID = $data['id'];
} else {
@ -595,6 +597,11 @@ class UserController extends AdminController
$data['role_id'] = 1;
$data['created_by'] = get_session_userid();
$insertID = $this->partnerStaffModel->insert($data);
if($insertID){
$details['manager_id'] = $insertID;
$details['updated_by'] = get_session_userid();
$this->partnerStaffModel->update($insertID, $details);
}
$result = true;
}

View File

@ -198,7 +198,7 @@ class VidalApiController extends BaseController
helper('api');
$url = ''. getenv('VIDAL_API_BASE_URL').'/enrollmendataservice';
$url = getenv('VIDAL_API_BASE_URL').'/enrollmendataservice';
$method = 'POST';
$headers = [

View File

@ -25,6 +25,7 @@ class ClientBranchModel extends Model
"gst",
"sez",
"units",
"pre_branch_id"
];
public function getBranchAndContactByBranchId($branch_id){

View File

@ -13,6 +13,9 @@ class HRAccessControlModel extends Model
'pre_hr_id',
'post_hr_id',
'post_client_id',
'pre_client_id',
'pre_branch_id',
'post_branch_id',
'allowed_modules',
'allowed_pre_policies',
'allowed_active_policies',

View File

@ -105,6 +105,7 @@ class LeadsModel extends Model
'next_reminder_date',
'is_insurer_auto_mail',
'quote_received_insurer',
'acm_id',
];

View File

@ -182,21 +182,20 @@
</style>
<p style="color:black;font-size:x-large;margin-left:20px !important;margin-bottom:20px;"><b>Dashboard</b></p>
<?php if(in_array(get_role_id(), [1,2,3,4,5]) || (in_array(ENROLLMENT_TEAM_ID, user_team()) || in_array(CLAIMS_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
<div class="row" id="client_add" style="margin-top: -32px;">
<div class="row" id="client_add" >
<div class="col-12">
<!-- <div class="card"> -->
<div class="card-body">
<ul class="nav nav-pills navtab-bg">
<ul class="nav nav-pills navtab-bg nav-dash" >
<?php if(in_array(get_role_id(), [1,2,3,5])) { ?>
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#pending-actions-dash-tab" data-toggle="tab" aria-expanded="false"
class="nav-link px-3 py-1 dash-anchor" id="pending_actions_tab">
class="nav-link px-3 py-1 dash-anchor nav-dash" id="pending_actions_tab">
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_pending_actions.png" alt="Logo" height="14" class="inactive_pending" >
<img src="<?= base_url() . "public"; ?>/assets/images/active_pending_actions.png" alt="Logo" height="14"
class="active_pending" style="display:none;">
@ -210,7 +209,7 @@
<?php if(in_array(get_role_id(), [1,2,3,5]) || (get_role_id() == 4 && in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()))) { ?>
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#bds-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor" id="bds_tab">
<a href="#bds-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor nav-dash" id="bds_tab">
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_bds.png" alt="Logo" height="14" class="inactive_bds">
<img src="<?= base_url() . "public"; ?>/assets/images/active_bds.png" alt="Logo" height="14"
class="active_bds " style="display:none;">
@ -226,7 +225,7 @@
$isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team()) ? 'active show' : '';
?>
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#claims-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor" id="claims_tab">
<a href="#claims-dash-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor nav-dash" id="claims_tab">
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_claims.png" alt="Logo" height="14" class="inactive_claims">
<img src="<?= base_url() . "public"; ?>/assets/images/active_claims.png" alt="Logo" height="14"
class="active_claims " style="display:none;">
@ -241,7 +240,7 @@
$isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID,user_team()) ? 'active show' : '';
?>
<li class="nav-item d-flex justify-content-center align-items-center ">
<a href="#leads-dash-tab " data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor" id="leads_tab" >
<a href="#leads-dash-tab " data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1 dash-anchor nav-dash" id="leads_tab" >
<img src="<?= base_url() . "public"; ?>/assets/images/inactive_leads_and_bds_renewal.png" alt="Logo" height="14" class="inactive_leads">
<img src="<?= base_url() . "public"; ?>/assets/images/active_leads_and_bds_renewal.png" alt="Logo" height="14"
class="active_leads " style="display:none;">

View File

@ -348,12 +348,13 @@ table.dataTable tbody td {
<div class="col-12">
<div class="card">
<div class="card-body maincard">
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Users</h4>
</div>
</div>
</div> -->
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="1" id="user-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">Name</th>
@ -391,15 +392,15 @@ table.dataTable tbody td {
</table>
<!-- <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head">
<thead class="bg-light">
<tr>
<th>Ticket ID</th>
<th class="app-text-left">Name</th>
<th class="text-left">Name</th>
<th>Policy Number</th>
<th>Ticket Type</th>
<th>Subject</th>
<th>Status</th>
<th class="app-text-left">Assign To</th>
<th class="text-left">Assign To</th>
<th>Created At</th>
<th>Updated At</th>
</tr>
@ -409,18 +410,18 @@ table.dataTable tbody td {
<?php foreach($ticket_data as $index => $row){ ?>
<tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;">
<td class="app-text-right"><?php echo $row['thz_id']; ?></td>
<td class="app-text-left">
<td class="text-right"><?php echo $row['thz_id']; ?></td>
<td class="text-left">
<?php echo $row['name']; ?>
<span class="text-custom-grey"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br>
<span class="text-custom-grey"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span>
</td>
<td class="app-text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
<td class="text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
? $row['policy_no']
: 'N/A'; ?>
</td>
<td class="app-text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td>
<td class="app-text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
<td class="text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td>
<td class="text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
<?php
$subject = $row['subject'] ? $row['subject'] : 'N/A';
echo (strlen($subject) > 50)
@ -428,9 +429,9 @@ table.dataTable tbody td {
: htmlspecialchars($subject);
?>
</td>
<td class="app-text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td>
<td class="app-text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td>
<td class="app-text-left">
<td class="text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td>
<td class="text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td>
<td class="text-left">
<?php if (!empty($row['created_at'])):
$cd = date("j F Y", strtotime($row['created_at']));
$ct = date("h:i a", strtotime($row['created_at']));
@ -438,7 +439,7 @@ table.dataTable tbody td {
endif;
?>
</td>
<td class="app-text-left">
<td class="text-left">
<?php if (!empty($row['updated_at'])):
$ud = date("j F Y", strtotime($row['updated_at']));
$ut = date("h:i a", strtotime($row['updated_at']));
@ -885,10 +886,14 @@ table.dataTable tbody td {
}
],
paging: true,
pageLength: 25,
pageLength: 10,
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
initComplete: function () {
$(".dt-buttons").prepend(`
@ -1439,7 +1444,7 @@ table.dataTable tbody td {
hour12: false
};
let uploaded = date.toLocaleString('en-GB', options).replace(',', '');
let color = file.incentive_file_name ? "app-text-success" : "app-text-black";
let color = file.incentive_file_name ? "app-text-success" : "font-color-black";
let download_url = "<?= base_url('user/download-incentive-file/') ?>" + encodeURIComponent(file.id);
let im = file.incentive_month;
@ -1450,10 +1455,10 @@ table.dataTable tbody td {
<div class="d-flex align-items-center justify-content-between border rounded p-2 bg-white">
<div class="d-flex align-items-center">
<div class="file-icon-box d-flex align-items-center justify-content-center">
<i class="mdi mdi-file-document-outline app-text-black" style="font-size: 24px;"></i>
<i class="mdi mdi-file-document-outline font-color-black" style="font-size: 24px;"></i>
</div>
<div class="ml-2">
<div class="font-weight-bold app-text-black small text-truncate"
<div class="font-weight-bold font-color-black small text-truncate"
title="${file.incentive_file_name}"
style="max-width: 265px;">
${file.incentive_file_name}

View File

@ -24,7 +24,7 @@ table.dataTable thead th {
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Advertisement Image List</h4>
<h4 style="position: relative;">Advertisement Images</h4>
</div>
<div class="col-6" style="text-align: right; position: relative;top: 5px;">
<a data-toggle="modal" data-target="#bike_make_login-modal" href="#" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
@ -75,18 +75,23 @@ table.dataTable thead th {
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="text-center mt-2 mb-4">
<div class="mt-2 mb-4">
<h4 id="advertise_add_edit">Add Advertise Image </h4>
</div>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<form id="model_form_data" class="px-4">
<input type="text" name="add_image_id" id="add_image_id" value="0" hidden>
<div class="row">
<div class="col-md-8">
<div class="col-md-12">
<div class="form-group">
<label for="branchname">Image</label>
<input class="form-control" name="advertise_image" id="advertise_image" type="file" accept="image/*" onchange="PreviewImage();" required="">
<label for="branchname">Upload Image</label>
<div class="input-icon">
<input type="file" class="form-control" name="advertise_image" id="advertise_image"
accept="image/*" onchange="PreviewImage();" required="">
<i class="mdi mdi-upload additional-icon"></i>
</div>
</div>
<div class="form-group col-md-6 float-left" style="position: relative;top: 0px;">
<img src=" " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/>

View File

@ -28,20 +28,20 @@
<table data-custom-table-css="table" id="datatable-buttons" class="table table-hover m-0 table-centered dt-responsive w-100">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">Batch Code</th>
<th class="font-weight-medium">File Name</th>
<th class="font-weight-medium">Client</th>
<th class="font-weight-medium">Client Branch</th>
<th class="font-weight-medium">Client Policy</th>
<th class="font-weight-medium">Event Type</th>
<th class="font-weight-medium">Insurer/ TPA</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">Count</th>
<th class="font-weight-medium">()Amount</th>
<th class="font-weight-medium">User/Time</th>
<th class="font-weight-medium">Status</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Batch Code&nbsp;</th>
<th class="font-weight-medium">File Name&nbsp;</th>
<th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Client Branch&nbsp;</th>
<th class="font-weight-medium">Client Policy&nbsp;</th>
<th class="font-weight-medium">Event Type&nbsp;</th>
<th class="font-weight-medium">Insurer/ TPA&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
<th class="font-weight-medium">Count&nbsp;</th>
<th class="font-weight-medium">()Amount&nbsp;</th>
<th class="font-weight-medium">User/Time&nbsp;</th>
<th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
</tr>
</thead>
@ -52,7 +52,7 @@
?>
<tr>
<td><b><?php echo ($key + 1) ?></b></td>
<td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td><?php echo $file['batch_code'] ?></td>
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name']?>
@ -215,24 +215,42 @@
$(document).ready(function() {
$('#datatable-buttons').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'Batch List',
// className: 'my_class',
// }],
// initComplete: function(settings, json) {
// $('.my_class').css({
// position: "relative",
// left: "50px"
// });
// },
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Batch List',
className: 'my_class',
}],
initComplete: function(settings, json) {
$('.my_class').css({
position: "relative",
left: "50px"
});
},
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true
});

View File

@ -162,7 +162,7 @@
<div class="row d-flex align-items-center">
<div class="StatusTileHide" style="padding-left: 25px;">
<a href="#" onclick="hide_status_show_pending_tile()" ><b><i class="mdi mdi-chevron-left mdi-36px"></i></b> </a>
<a href="#" onclick="hide_status_show_pending_tile()" ><b><i class="mdi mdi-chevron-left mdi-36px chevron-left-dash"></i></b> </a>
</div>
<div class="StatusTileHide" style="display: none;padding-left: 15px;">
<a href="#" id="mainMenuTiles">Current Tile : </a>

View File

@ -22,7 +22,6 @@
</style>
<div class="row">
<div class="col-12" id="second_page">
<div class="card">
<div class="card-body">
@ -82,7 +81,6 @@
</div> <!-- end card-body -->
</div> <!-- end card -->
</div> <!-- end col-12 -->
</div> <!-- end row -->
<script>
$(document).ready(function() {
@ -94,22 +92,32 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'BDS TAT BAND WISE DATA',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'BDS TAT BAND WISE DATA',
},
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,

View File

@ -9,8 +9,7 @@ table.dataTable tbody td {
}
</style>
<div class="row" id="inception_list">
<div class="col-12">
<div class="col-12" id="inception_list">
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
@ -24,7 +23,7 @@ table.dataTable tbody td {
<thead class="bg-light">
<tr>
<th>
<div class="column-header">S.No.</div>
<div class="column-header">S.No&nbsp;</div>
</th>
<th>
<div class="column-header">Renewal Month</div>
@ -100,7 +99,6 @@ table.dataTable tbody td {
</div>
</div>
</div>
</div><!-- end col -->
</div>
<script>
@ -115,24 +113,34 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Renewal-List',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Renewal-List',
exportOptions: {
orthogonal: 'sort'
},
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional)
@ -142,4 +150,39 @@ $(document).ready(function() {
console.error("Table atet found.");
}
});
// Global DataTables defaults
$.extend(true, $.fn.dataTable.defaults, {
language: {
search: "", // remove "Search:" label
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,
ordering: false
});
// Global init hook
$(document).on('init.dt', function (e, settings) {
let $filter = $(settings.nTableWrapper).find('.dataTables_filter');
let $input = $filter.find('input');
if (!$filter.hasClass('custom-search')) {
// Wrap in Bootstrap input-group
$input
.addClass('form-control')
.wrap('<div class="input-group"></div>');
// Append icon
$input.after(`
<span class="input-group-text bg-white border-0">
<i class="mdi mdi-magnify"></i>
</span>
`);
// Align to right
$filter.addClass('text-right custom-search');
}
});
</script>

View File

@ -73,24 +73,37 @@ table.dataTable tbody td {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Insurer-Wise-Report-List',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Insurer-Wise-Report-List',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -73,24 +73,37 @@ table.dataTable tbody td {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Bap-Wise-Report-List',
},
{
extend: 'excel',
text: 'Excel',
title: 'Bap-Wise-Report-List',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
title: 'Bap-Wise-Report-List',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -94,22 +94,54 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [
// {
// extend: 'csv',
// text: 'CSV',
// title: 'BDS TAT BAND WISE DATA',
// },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'BDS TAT BAND WISE DATA',
// },
// ],
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
openTicket();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'BDS TAT BAND WISE DATA',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'BDS TAT BAND WISE DATA',
},
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,

View File

@ -1,22 +1,23 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
}
.col-12 {
.col-12 {
max-width: 98% !important;
}
}
.dataTables_filter {
.dataTables_filter {
position: absolute;
}
.custom-dropdown-menu {
}
.custom-dropdown-menu {
display: none;
position: absolute;
background-color: #ffffff !important;
@ -26,34 +27,36 @@ table.dataTable tbody td {
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
color: #212529 !important;
text-decoration: none !important;
background-color: transparent !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
</style>
<div class="row">
<div class="col-12" style="margin-top: -12px;">
<div class="col-12">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
@ -80,7 +83,7 @@ table.dataTable tbody td {
<option value="0" selected>Select Insurer</option>
<?php if (isset($insurer) && count($insurer)) { ?>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
<?php } ?>
</select>
@ -135,16 +138,16 @@ table.dataTable tbody td {
<div class="form-group col-md-3" style="display: none;" id="date_div">
<label>Date<span class="text-danger"></span></label>
<div id="reportrange" class="form-control"
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp;
<span></span> <i class="mdi mdi-menu-down"></i>
<div class="input-icon">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<input type="hidden" id="startDate">
<input type="hidden" id="endDate">
</div>
</div>
<div class="form-group col-md-3 text-right m-b-0" style="margin-top: 29px;">
<div class="form-group text-right m-b-0">
<a href="<?= base_url("/policy_tranction/report/report-business-list"); ?>"
class="btn btn-secondary" id="clear-filters">Clear</a>
<a href="<?= base_url("/policy_tranction/report/report-business-list"); ?>"
@ -152,7 +155,7 @@ table.dataTable tbody td {
onclick="fetchEmpolyeeList(event);">Submit</a>
</div>
</div>
<!-- <div class="form-group text-right m-b-0">
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
@ -167,8 +170,10 @@ table.dataTable tbody td {
</div>
</div>
</div>
<div class="col-12" id="second_page">
<div class="card">
<div class="card-body">
@ -182,13 +187,13 @@ table.dataTable tbody td {
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S.No</th>
<th>Client Name</th>
<th>Insurer</th>
<th>Policy</th>
<th>Policy No</th>
<th>Endorsement No</th>
<th>Event Type</th>
<th>S.No&nbsp;</th>
<th>Client Name&nbsp;</th>
<th>Insurer&nbsp;</th>
<th>Policy&nbsp;</th>
<th>Policy No&nbsp;</th>
<th>Endorsement No&nbsp;</th>
<th>Event Type&nbsp;</th>
<th>Action</th>
</tr>
</thead>
@ -196,7 +201,7 @@ table.dataTable tbody td {
<?php if (isset($business_list)) { ?>
<?php foreach($business_list as $index => $row){ ?>
<tr>
<td><?= $index + 1 ?></td>
<td class="text-center"><?= $index + 1 ?></td>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['policy_type']; ?></td>
@ -236,7 +241,7 @@ table.dataTable tbody td {
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("scroll-horizontal-datatable");
// Create custom dropdown
@ -322,14 +327,13 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
// Datatable document ready
$(document).ready(function() {
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
@ -337,58 +341,67 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
buttons: [
{
extend: 'collection',
text: '<span class="btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary',
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'Policy-Tranction-BDS-List',
text: '<i class="mdi mdi-file-delimited"></i><span class="btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List'
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
title: 'Policy-Tranction-BDS-List',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
// Find cells in column AB (28th column in Excel)
// Sum values in column AB (28th column)
$('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this)
.text()); // Get the value inside the cell
var value = parseFloat($('v', this).text());
if (!isNaN(value)) {
total += value;
}
});
// Get the last row index and append the total row
// Get last row index and append total row
var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB
var rowIndex = parseInt(lastRow.attr('r')) + 2;
var totalRow =
'<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex + '"><is><t>Total</t></is></c>' +
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + '</v></c>' +
'</row>';
// Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow);
}
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
ordering: false,
paging: true,
pageLength: 10,
ordering: false
});
} else {
console.error("Table not found.");
}
});
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
@ -487,7 +500,7 @@ $(function() {
// var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
@ -495,6 +508,128 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
.endOf('month')
]
}
});
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
$('#insurer_id').select2();
$('#policy_type_id').select2();
})
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
var end_date = $('#endDate').val();
var client_id = $('#client_id').val();
var insurer_id = $('#insurer_id').val();
var policy_type_id = $('#policy_type_id').val();
var date_type = $('#date_type').val();
var issuer = $('#issuer').val();
console.log(start_date + '-' + end_date);
var queryParams = {
start_date: start_date,
end_date: end_date,
client_id: client_id,
insurer_id: insurer_id,
policy_type_id: policy_type_id,
date_type: date_type,
issuer: issuer,
};
const queryString = objectToQueryString(queryParams);
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const startDate = params.get('start_date') || 0; // Default to 0 if not found
const endDate = params.get('end_date') || 0; // Default to 0 if not found
const client_id = params.get('client_id') || 0; // Default to 0 if not found
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
const date_type = params.get('date_type') || 0; // Default to 0 if not found
const issuer = params.get('issuer') || 0; // Default to 0 if not found
hideDateField(date_type)
console.log('startDate', startDate)
console.log('endDate', endDate)
console.log('client_id', client_id)
console.log('insurer_id', insurer_id)
console.log('policy_type_id', policy_type_id)
console.log('date_type', date_type)
console.log('issuer', issuer)
// Log the values or use them as needed
console.log('Start Date:', startDate);
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).change()
$('#insurer_id').val(insurer_id).change()
$('#policy_type_id').val(policy_type_id).change()
$('#date_type').val(date_type)
$('#issuer').val(issuer)
}, 1000)
}
}
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
// Get start and end dates from URL parameters, or use default values
const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY');
const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY');
// Parse the dates to moment objects
var start = moment(startDateParam, 'DD-MM-YYYY');
var end = moment(endDateParam, 'DD-MM-YYYY');
// var start = moment().subtract(29, 'days');
// var end = moment();
function cb(start, end) {
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -524,9 +659,9 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null) {
function hideDateField(input = null) {
let val = $('#date_type').val();
if (input) {
@ -538,9 +673,9 @@ function hideDateField(input = null) {
} else {
$('#date_div').hide()
}
}
}
function sendPolicyTransactionID(event, pt_id) {
function sendPolicyTransactionID(event, pt_id) {
event.preventDefault(); // Prevent default action
console.log(pt_id);
@ -553,5 +688,5 @@ function sendPolicyTransactionID(event, pt_id) {
const apiURL = $('#get-policy-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
</script>

View File

@ -56,41 +56,42 @@ table.dataTable thead th {
<div class="col-12">
<div class="card">
<div class="card-body maincard">
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">CD Master</h4>
</div>
<div class="col-6" style="text-align: right; position: relative;top: 56px;">
<!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
<!- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
data-toggle="modal" data-target="#con-close-modal" data-placement="top" title="Add"
data-trigger="hover">ADD</button> -->
data-trigger="hover">ADD</button> ->
</div>
</div>
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap" >
</div> -->
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">S.No.</th>
<th class="font-weight-medium">Client Name</th>
<th class="font-weight-medium">Insurer Name</th>
<th class="font-weight-medium">Insurer Branch Name</th>
<th class="font-weight-medium">Opening Date</th>
<th class="font-weight-medium">CD Account No</th>
<th class="font-weight-medium">Opening Amount</th>
<th class="font-weight-medium">Date/User</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Client Name&nbsp;</th>
<th class="font-weight-medium">Insurer Name&nbsp;</th>
<th class="font-weight-medium">Insurer Branch Name&nbsp;</th>
<th class="font-weight-medium">Opening Date&nbsp;</th>
<th class="font-weight-medium">CD Account No&nbsp;</th>
<th class="font-weight-medium">Opening Amount&nbsp;</th>
<th class="font-weight-medium">Date/User&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
</tr>
</thead>
<tbody>
<tbody class="app-table-body">
<?php foreach($CD_Master_Data as $index => $row){ ?>
<tr>
<td><?= $index + 1; ?></td>
<td class="text-center"><?= $index + 1; ?></td>
<td><?php echo $row['client_name']; ?>( <?= $row['short_name'] ?> )</td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['insurer_branch_name']; ?></td>
<td><?php echo date('d-m-Y', strtotime($row['opening_date'])); ?></td>
<td><?php echo $row['cd_ac_no']; ?></td>
<td><?php echo $row['opening_bal']; ?></td>
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> by <?php echo $row['user_name']; ?></td>
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> <br>by <?php echo $row['user_name']; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);"class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
@ -214,34 +215,81 @@ table.dataTable thead th {
$('#scroll-horizontal-datatable').DataTable({
scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function (e, dt, node, config) {
showCdMasterAddModal();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'CD-Master-List',
className: 'my_class',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary my_class',
exportOptions: {
columns: ':not(:last-child)'
},
},
{
text: 'Add',
className: 'buttons-html5 ',
action: function (e, dt, node, config) {
showCdMasterAddModal();
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,
order: [[0, 'desc']]
// scrollX: true,
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
// "<'row'<'col-sm-12'tr>>" +
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [
// {
// extend: 'csv',
// text: 'CSV',
// title: 'CD-Master-List',
// className: 'my_class',
// exportOptions: {
// columns: ':not(:last-child)'
// },
// },
// {
// text: 'Add',
// className: 'buttons-html5 ',
// action: function (e, dt, node, config) {
// showCdMasterAddModal();
// }
// }
// ],
// language: {
// search: "_INPUT_",
// searchPlaceholder: "Search..."
// },
// paging: true,
});
})
$(document).ready(function(){

View File

@ -64,14 +64,14 @@
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Files</h4>
<h4 style="position: relative;">Claim Dump Upload</h4>
</div>
</div>
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">File name</th>
<th class="font-weight-medium">User/Time</th>
<th class="font-weight-medium">Status</th>
@ -86,21 +86,25 @@
?>
<tr>
<td><b><?php echo ($key + 1) ?></b></td>
<td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name'] ?>
</td>
<td><?php echo change_date_format($file['created_at'], 'Y-m-d H:i:s', 'd M Y h:i a') . ' by <strong>' . $file['user_name'] . '</strong>' ?> </td>
<td>
<?php if ($file['status'] == "failed") { ?>
<?= $file['status'] ?> <span class='col-xl-3 col-lg-4 col-sm-6'>
<span style="color : #BD0707 ;"> <?= $file['status'] ?> </span>
<span class='col-xl-3 col-lg-4 col-sm-6'>
<!-- <a href="<?= base_url('util/claim_dump_excel_error/') . $file['file_id'] ?>" target="_blank" class='fe-alert-circle' data-err="<?= $file['file_id'] ?>"></a> -->
<a href="#" class='fe-alert-circle' onclick="fetchFileError(<?= $file['file_id'] ?>)"></a>
</span>
<?php } else if ($file['status'] == "inprogress") { ?>
<a data-id="<?= $file['status'] ?>" class="reload" href="#"><?= $file['status'] ?></a>
<?php } else { ?>
<a data-id="<?= $file['status'] ?>" class="reload" href="#"
style="color : #938e04ff ;">
<?= $file['status'] ?>
</a>
<?php } else { ?>
<span style="color : #34A853 ;"> <?= $file['status'] ?> </span>
<?php } ?>
</td>
<td>
@ -156,7 +160,7 @@
<!-- &nbsp;[ <a href="#" id="excel_download" data-toggle="tooltip" data-placement="top" title="Download Sample Excel">Sample Excel</a> ] -->
<input type="file" name="claim_dump_list" id="claim_dump_list" accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet" required>
</div>
<div class="form-group col-md-3" style="margin-top: 18px;">
<div class="form-group col-md-3" style="margin-top: 40px;">
<button id="claim_form_submit_button" type="submit" class="btn btn-primary waves-effect waves-light justify-content-end">Upload</button>
</div>
</div>
@ -293,8 +297,12 @@
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 15, // Set default number of rows per page (optional)

View File

@ -19,7 +19,15 @@
<div class="form-group">
<div id="dynamic-form-container"></div>
<div id="dynamic-form-container">
<div align="right">
<a class="btn btn-primary waves-effect waves-light mr-1"
onclick="addHTMLInput(this)">
+ Add
</a>
</div>
</div>
<div class="form-group text-right m-b-0">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
@ -48,10 +56,10 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S.No</th>
<th>Docs Name</th>
<th>File Name</th>
<th>Action</th>
<th>S.No&nbsp;</th>
<th>Docs Name&nbsp;</th>
<th>File Name&nbsp;</th>
<th>Action&nbsp;</th>
</tr>
</thead>
<tbody id="table_bd">
@ -191,8 +199,9 @@ function addHTMLInput()
>
</div>
<div class="form-group col-md-2" style="position: relative;top: 28px;">
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this)">x</a>
<a class="btn btn-primary waves-effect waves-light mr-1" onclick="addHTMLInput(this)">+</a>
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this)" style="background-color: #BD0707;">
<i class="mdi mdi-delete" ></i>
</a>
</div>
`;
container.appendChild(newRow);
@ -265,7 +274,7 @@ function create_url_list(data) {
data.forEach((item, index) => {
html += `
<tr>
<td>${index + 1}</td>
<td class="text-center">${index + 1}</td>
<td>${item.doc_name}</td>
<td><a href="${item.url}" target="_blank">${item.url}</a></td>
<td>

View File

@ -202,7 +202,7 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(CLAIMS_TEAM_ID,user_team(
<div class="row d-flex align-items-center">
<div class="goBack" style="padding-left: 25px;">
<a href="#" onclick="hideAndShowTile('2')" ><b><i class="mdi mdi-chevron-left mdi-36px"></i></b> </a>
<a href="#" onclick="hideAndShowTile('2')" ><b><i class="mdi mdi-chevron-left mdi-36px chevron-left-dash"></i></b> </a>
</div>
<div class="goBack" style="display: none;padding-left: 15px;">
<a href="#" id="current_tile">Current Tile : </a>

View File

@ -7,10 +7,6 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
}
@ -92,10 +88,24 @@
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{ extend: 'csv', text: 'CSV', title: 'Insurer-Wise-Report-List' },
{ extend: 'excel', text: 'Excel', title: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } }
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ' },
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List', className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
],
language: { search: "_INPUT_", searchPlaceholder: "Search..." },
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,
ordering: false

View File

@ -7,9 +7,6 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
@ -33,7 +30,8 @@
<thead class="bg-light">
<tr>
<th style="text-align: center;" colspan="8">OPEN</th>
<th style="text-align: center;" colspan="5" >CLEARED</th>
&nbsp;
<th style="text-align: center;" colspan="7" >CLEARED</th>
</tr>
<tr>
<?php foreach ($column_order as $col_name): ?>
@ -88,10 +86,24 @@
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{ extend: 'csv', text: 'CSV', title: 'Insurer-Wise-Report-List' },
{ extend: 'excel', text: 'Excel', title: 'Insurer-Wise-Report-List', exportOptions: { orthogonal: 'sort' } }
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{ extend: 'csv', text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ' },
{ extend: 'excel', text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>', title: 'Insurer-Wise-Report-List',className: 'app-btn-primary ', exportOptions: { orthogonal: 'sort' } }
]
}
],
language: { search: "_INPUT_", searchPlaceholder: "Search..." },
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,
ordering: false

View File

@ -70,6 +70,13 @@
<div class="row" id="add_branch">
<div class="col-12">
<div class="card-body">
<div class="row float-left" style="position: relative; bottom: 20px; left: 13px;">
<button type="button" id="btnAutoBranchFetch"
class="btn btn-primary waves-effect waves-light btn-sm "> Auto Fetch branch Details</button>
</div>
<div class="row float-right" style="position: relative; bottom: 20px; right: 13px;">
<button type="button" id="btnBranchBack"
class="btn btn-primary waves-effect waves-light btn-sm btnBack"><span class="mdi mdi-format-list-bulleted"
@ -82,7 +89,12 @@
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
<input type="hidden" name="client_id" id="client_id_branch"
value="<?= isset($client['id']) ? $client['id'] : '' ?>" />
<input type="hidden" name="pre_branch_id" id="pre_branch_id"
value="<?= isset($pre_branch_id) ? $pre_branch_id : '' ?>" />
<input type="hidden" name="branch_id_primarykey" id="branch_id_primarykey" />
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-6">

View File

@ -16,14 +16,13 @@
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
</div> -->
</div>
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table">
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">Insurer Name</th>
<th class="font-weight-medium">Insurer Branch Name</th>
<th class="font-weight-medium">CD Account Number</th>
<th class="font-weight-medium">Current Balance</th>
<th class="font-weight-medium">Insurer Name&nbsp;</th>
<th class="font-weight-medium">Insurer Branch Name&nbsp;</th>
<th class="font-weight-medium">CD Account Number&nbsp;</th>
<th class="font-weight-medium">Current Balance&nbsp;</th>
<th class="font-weight-medium">Action</th>
</tr>
</thead>
@ -70,30 +69,42 @@
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
buttons: [{
// dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>",
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>',
className: 'my_class',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
},
{
extend: 'pdf',
text: 'PDF',
text: '<i class="mdi mdi-file-pdf " ></i><span class=" btn-custom"> PDF </span>',
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>',
exportOptions: {
columns: ':not(:last-child)'
},
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
});

View File

@ -21,8 +21,18 @@
<div class="row" style="padding-top: 20px;margin-bottom: 18px;">
<div class="col-6">
<h4 style="position: relative;left: 18px;top: 2px;">Client Basic Info - <strong> <?= $client['client_name'] ?> (
<?= $client['short_name'] ?> ) </strong></h4>
<h4 style="position: relative; left: 18px; top: 2px;">
<span class="client_info_close fs-6" id="close_btn">
<i class="mdi mdi-chevron-left" style="font-size: 28px;cursor:pointer;"></i>
</span>
<span>
Client Basic Info -
<strong> <?= $client['client_name'] ?> ( <?= $client['short_name'] ?> ) </strong>
</span>
</h4>
</div>
<div class="col-6">
@ -30,8 +40,6 @@
<div class="row">
<div class="col-6" style="position: relative;left: 455px;">
<button id="close_btn"
class="btn btn-primary waves-effect waves-light client_info_close">Close</button>
</div>
<div class="col-1 float-right" style="position: relative;left: 255px;">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse"
@ -125,28 +133,36 @@
<?php if($value['open_for_enrollment'] == 'Open' ) { ?>
<span
class="badge badge-success"><?= $value['open_for_enrollment'] ?></span>
class="px-2 py-1"
style="background-color: #F9F8CD; color: #000 !important; border-radius:10px !important; "
><?= $value['open_for_enrollment'] ?></span>
<?php } else if($value['open_for_enrollment'] == 'Closed') { ?>
<span
class="badge badge-warning"><?= $value['open_for_enrollment'] ?></span>
class="px-2 py-1"
style="background-color: #C2C2C2; color: #000 !important; border-radius:10px !important;"><?= $value['open_for_enrollment'] ?></span>
<?php } else { ?>
<span
class="badge badge-secondary"><?= $value['open_for_enrollment'] ?></span>
style="background-color: #E26728; color: #000 !important; border-radius:10px !important;"
class="px-2 py-1"><?= $value['open_for_enrollment'] ?></span>
<?php } ?>
</td>
<td>
<?php if($value['policy_status'] == 'Active' ) { ?>
<span class="badge badge-success"><?= $value['policy_status'] ?></span>
<span
style="background-color: #D1F8E7; color: #000 !important; border-radius:10px !important;"
class="px-2 py-1"><?= $value['policy_status'] ?></span>
<?php } else { ?>
<span class="badge badge-danger"><?= $value['policy_status'] ?></span>
<span
style="background-color: #BD0707; color: #000 !important; border-radius:10px !important;"
class="px-2 py-1 "><?= $value['policy_status'] ?></span>
<?php } ?>
</td>

View File

@ -1,49 +1,15 @@
<style>
#kyc_table #tbody td,
#other_docs_table tbody td
{
background-color: white !important;
}
#kyc_table #tbody tr ,
#other_docs_table tbody tr
{
box-shadow: 0px 2px 4px 0px #00000024;
background-color: white;
border-radius: 10px;
}
#kyc_table #tbody tr:hover td ,
#other_docs_table tr:hover td
{
background-color: #e0e0e0 !important;
}
#KYC-DOC-tab .card-body ,
#other_docs_table .card-body
{
background-color: #F5FFFF !important;
border-radius: 10px;
box-shadow: 0px 4px 4px 0px #00000040;
}
#KYC-DOC-tab thead{
padding: 15px !important;
}
</style>
<style> .card-body{ margin-top: 0px !important; } </style>
<div class="tab-pane fade" id="KYC-DOC-tab">
<div class="col-lg-12">
<div class="card">
<div class="card" id="collapseOne">
<div class="card-body">
<div class="table-responsive">
<table data-custom-table-css="table" id="kyc_table" class="table table-sm mb-0">
<table data-custom-table-css="second-table" id="kyc_table" class="table table-sm mb-0">
<thead>
<tr>
<th>S.no</th>
<th>S. No</th>
<th>Document Name</th>
<th>Status</th>
<th>Action</th>
@ -63,7 +29,7 @@
<div class="row" id="others">
<div class="col-12">
<div class="card" style="margin-left: 12px;margin-right: -12px;">
<div class="card" id="collapseOne" style="margin-left: 12px;margin-right: -12px;">
<div class="card-body">
<h3>Additional Documents</h3>
<form role="form" class="parsley-examples" method="post" id="kyc_form"
@ -101,10 +67,10 @@
</div> <!-- end row -->
<div class="col-lg-12" id="other_docs_table">
<div class="card">
<div class="card" id="collapseOne">
<div class="card-body">
<div class="table-responsive">
<table data-custom-table-css="table" id="kyc_table" class="table table-sm mb-0">
<table data-custom-table-css="second-table" id="kyc_table" class="table table-sm mb-0">
<thead>
<tr>
<th>Document Name</th>

View File

@ -1,6 +1,6 @@
<style>
.table th,
/* .table th,
.table td {
padding: 8px;
}
@ -11,7 +11,7 @@ table.dataTable tbody td {
table.dataTable thead th {
padding: 4px 4px !important;
}
} */
.col-12{
@ -74,32 +74,31 @@ table.dataTable thead th {
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Client List</h4>
</div>
<!-- <div class="row" style="margin-bottom:1rem;">-->
<!-- <div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Client</h4>
</div> -->
<!-- <div class="col-2" style="text-align: right; position: relative;top: 56px; left: 303px;">
<a class="btn btn-primary waves-effect waves-light" onclick="showModal()">Add From Lead</a>
</div>
<div class="col-1" style="text-align: right; position: relative;top: 56px; left: 294px;">
<a href="<?= base_url("client/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">Add</a>
</div> -->
</div>
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table">
<!-- </div>-->
<table data-custom-table-css="table" class="table mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">S.No</th>
<th class="font-weight-medium">Client Name</th>
<th class="font-weight-medium">Account Manager</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Client Name&nbsp;</th>
<th class="font-weight-medium">Account Manager&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
</tr>
</thead>
<tbody>
<?php foreach($clientList as $index => $row){ ?>
<tr >
<td><?=$index+1?></td>
<td class="text-center"><?=$index+1?></td>
<td class="client_info" data-id="<?php echo $row->id; ?>"><?php echo $row->client_name; ?> ( <?php echo $row->short_name; ?> ) </td>
<td>
<?php $account_managers = ''; ?>
@ -108,7 +107,9 @@ table.dataTable thead th {
<?php $account_managers .= $client->account_manager . ', '; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php echo rtrim($account_managers, ', '); ?>
<?php
$account_managers = rtrim($account_managers, ', ');
echo $account_managers !== '' ? $account_managers : 'N/A'; ?>
</td>
<td>
<div class="btn-group dropdown">
@ -166,7 +167,8 @@ table.dataTable thead th {
</div>
</div><!-- /.modal-content -->
</div>
</div><!-- /.modal -->
</div>
<!-- /.modal -->
<script>
document.addEventListener("DOMContentLoaded", function () {
@ -296,11 +298,11 @@ table.dataTable thead th {
$(document).ready(function()
{
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
buttons: [
{
text: 'Add From Lead',
className: 'btn-filter add-from-lead', // custom class
@ -309,31 +311,36 @@ $(document).ready(function()
}
},
{
text: '+ create New Client',
className: 'btn-filter buttons-html5', // custom class
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
addClient();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'ClientList',
className: 'my_class',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Client-List',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
}
]
}
],
initComplete: function() {
$('.btn-filter')
.removeClass('btn-secondary')
.addClass('btn btn-primary');
},
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true ,
// pagingType: 'full_numbers'

View File

@ -1,8 +1,8 @@
<style>
body {
.multiselect-native-select {
body {
.multiselect-native-select {
position: relative;
/* bottom: 32px; */
select {
border: 0 !important;
@ -16,29 +16,24 @@ body {
left: 50%;
top: 30px;
}
}
}
.multiselect-container{
.multiselect-container {
width: 100% !important;
}
}
.multiselect-selected-text{
.multiselect-selected-text {
float: left !important;
}
}
}
}
.navtab-bg .nav-link {
margin: 0 5px 10px!important;
}
.readonly-select {
.readonly-select {
pointer-events: none;
/* background-color: #f0f0f0; */
background-color: #e0e0e0;
color: #666;
}
}
</style>
<style>
@ -47,10 +42,6 @@ body {
font-size: 14px;
}
.container-fluid {
padding: 12px;
}
.user-card {
background: white;
border-radius: 8px;
@ -90,7 +81,7 @@ body {
font-size: 0.85em;
opacity: 0.9;
margin: 0;
color:rgb(56, 55, 55);
color: rgb(56, 55, 55);
}
.accordion-icon {
@ -259,48 +250,19 @@ body {
border: 1px solid #dee2e6;
}
#client_add .nav-pills ,
#client_add .nav-link
{
background-color: #F5FFFF !important;
color : #00999E !important;
border-radius:10px;
}
#client_add .nav-pills
{
background-color: #F5FFFF !important;
color : #00999E !important;
box-shadow: 0px 2px 4px 0px #00000040;
padding-top: 5px ;
}
#client_add .nav-link.active-tab {
color: white !important;
background-color: #00999E !important;
font-size: small !important;
padding:8px 16px;
border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000040;
}
#hr_activity_history_append_area{
padding-top:0;
margin-top:0;
#hr_activity_history_append_area {
padding-top: 0;
margin-top: 0;
background-color: #F5FFFF !important;
border: 2px solid #F5FFFF;
border-radius: 10px;
box-shadow: 0px 4px 4px 0px #00000040;
}
#hr_activity_history_append_area tbody tr{
#hr_activity_history_append_area tbody tr {
background-color: white !important;
}
</style>
@ -311,7 +273,9 @@ body {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Client Onboarding <?php if(isset($client)) {echo ' - ' . $client['client_name']; } ?></h4>
<h4 style="position: relative;">Client Onboarding <?php if (isset($client)) {
echo ' - ' . $client['client_name'];
} ?></h4>
</div>
<div class="col-6" style="text-align: right;">
<a href="<?= base_url("client/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>
@ -320,7 +284,14 @@ body {
<br>
<ul class="nav nav-pills navtab-bg" >
<div class="tab-wrapper position-relative">
<!-- Left Arrow -->
<ul class="nav nav-pills navtab-bg" id="myTab">
<li class="nav-item ">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false"
class="nav-link px-3 py-2 active" id="general_tab">
@ -382,7 +353,14 @@ body {
<span class="d-none d-sm-inline-block">Others</span>
</a>
</li> -->
<li class="nav-item">
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane fade" id="hr-access-tab">
@ -408,7 +386,8 @@ body {
</div>
<?php include("client_api.php"); ?>
<?php // include('client_others_tab.php'); ?>
<?php // include('client_others_tab.php');
?>
<?php include('notification.php'); ?>
<?php include('client_basic_info.php'); ?>
<?php include('client_kyc.php'); ?>
@ -422,8 +401,58 @@ body {
</div>
<script>
<div class="modal fade" id="autoFetchBranchModal" tabindex="-1" role="dialog" aria-labelledby="autoFetchBranchModalLabel" accesskey=""
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" style="margin-left: 400px !important;">
<div class="modal-content modal-lg">
<div class="modal-header">
<h5 class="modal-title" id="autoFetchBranchModalLabel">Auto Fetch Branch Details</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" style="min-height:auto !important;">
<div class="row">
<div class="col-md-6">
<div class="form-group col-md-12">
<label for="auto_fetch_client">Client List<span class="text-danger">*</span></label>
<select class="form-control" id="auto_fetch_client" name="auto_fetch_client" required>
<option value="">Select Client</option>
<?php if (!empty($auto_fetch_client_list)): ?>
<?php foreach ($auto_fetch_client_list as $client_list): ?>
<option value="<?= esc($client_list['id']) ?>">
<?= esc($client_list['client_name']) ?>
</option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group col-md-12">
<label for="auto_fetch_branch">Branch List<span class="text-danger">*</span></label>
<select class="form-control" id="auto_fetch_branch" name="auto_fetch_branch" required>
<option value="">Select Branch</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn cancel-btn" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary submit-btn" id="submitAutoFetch">Submit</button>
</div>
</div>
</div>
</div>
</div>
<script>
let hrAccessControlHtmlAppended = false;
let hrActivityHistoryHtmlAppended = false;
@ -431,10 +460,12 @@ body {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
if (check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0) {
$('#btnBranchAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
toastr.warning('Please Add the Client!', 'warning', {
timeOut: 2000
});
} else {
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
@ -446,10 +477,12 @@ body {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
if (check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0) {
$('#relation_form').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
toastr.warning('Please Add the Client!', 'warning', {
timeOut: 2000
});
} else {
$('#relation_form').show();
}
@ -458,10 +491,12 @@ body {
function client_policies() {
var check_client_id = $('#general_PrimaryKey').val();
if(check_client_id == '' || check_client_id == null || check_client_id == 0){
if (check_client_id == '' || check_client_id == null || check_client_id == 0) {
$('#BtnAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
toastr.warning('Please Add the Client!', 'warning', {
timeOut: 2000
});
} else {
if ($('#btnPolicyBack')[0].style.display == 'none') {
$('#BtnAdd').show();
}
@ -473,10 +508,12 @@ body {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
if (check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0) {
$('#btnBranchAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
toastr.warning('Please Add the Client!', 'warning', {
timeOut: 2000
});
} else {
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
@ -488,10 +525,12 @@ body {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
if (check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0) {
$('#notification-tab').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
toastr.warning('Please Add the Client!', 'warning', {
timeOut: 2000
});
} else {
if ($('#notification-tab')[0].style.display == 'none') {
$('#notification-tab').show();
}
@ -525,15 +564,17 @@ body {
});
//HR Access Controll
function appendHrAccessControllHtml(input){
function appendHrAccessControllHtml(input) {
console.log(input.id);
let client_id = $('#general_PrimaryKey').val();
console.log('client_id ', client_id);
let url = '<?= base_url('util/viewHrAccessData') ?>';
let requestData = {client_id : client_id};
let requestData = {
client_id: client_id
};
if(hrAccessControlHtmlAppended == false){
if (hrAccessControlHtmlAppended == false) {
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
console.log('Data fetched successfully:', response);
@ -550,13 +591,13 @@ body {
console.error(xhr.responseText);
hrAccessControlHtmlAppended = false;
});
}else{
} else {
console.log('Already HTML appended');
}
}
//HR Activity History
function appendHrActivityHistoryHtml(input, submit = false){
function appendHrActivityHistoryHtml(input, submit = false) {
console.log(input.id);
let client_id = $('#general_PrimaryKey').val();
let startDate = $('#startDate').val();
@ -565,14 +606,18 @@ body {
console.log('startDate ', startDate);
console.log('endDate ', endDate);
if(submit){
if (submit) {
hrActivityHistoryHtmlAppended = false;
}
let url = '<?= base_url('user/getUserActivityHistory') ?>';
let requestData = {client_id : client_id, startDate : startDate, endDate : endDate};
let requestData = {
client_id: client_id,
startDate: startDate,
endDate: endDate
};
if(hrActivityHistoryHtmlAppended == false){
if (hrActivityHistoryHtmlAppended == false) {
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
console.log('Data fetched successfully:', response);
@ -589,15 +634,13 @@ body {
console.error(xhr.responseText);
hrActivityHistoryHtmlAppended = false;
});
}else{
} else {
console.log('Already HTML appended');
}
}
</script>
<script>
function toggleAccordion(header) {
if (event.target.classList.contains('fa-info-circle') ||
event.target.parentElement.classList.contains('fa-info-circle')) {
@ -650,9 +693,8 @@ body {
return Array.from(checkboxes).map(cb => parseInt(cb.value));
}
function getHrActivityHistory()
{
console.log(event.target.dataset.id);//return;
function getHrActivityHistory() {
console.log(event.target.dataset.id); //return;
let ids = event.target.dataset.id.split('-');
console.log('ids', ids)
let client_id = $('#general_PrimaryKey').val();
@ -661,7 +703,12 @@ body {
console.log(url);
let user_type = "hr";
let requestData = {user_id : ids[1], pre_hr_id : ids[0], user_type : user_type, client_id : client_id};
let requestData = {
user_id: ids[1],
pre_hr_id: ids[0],
user_type: user_type,
client_id: client_id
};
console.log('requestData', requestData);
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
@ -703,7 +750,10 @@ body {
allowed_pre_policies: getCheckedValues(`${userId}_pre_policies`),
allowed_active_policies: getCheckedValues(`${userId}_active_policies`),
allowed_cd: getCheckedValues(`${userId}_cd`),
allowed_claims: getCheckedValues(`${userId}_claims`)
allowed_claims: getCheckedValues(`${userId}_claims`),
pre_branch_id: formData.get(`${userId}_pre_branch_id`),
post_branch_id: formData.get(`${userId}_post_branch_id`),
pre_client_id: formData.get(`${userId}_pre_client_id`)
};
users.push(user);
@ -721,7 +771,10 @@ body {
allowed_pre_policies: user.allowed_pre_policies.length ? `[${user.allowed_pre_policies.join(',')}]` : '[]',
allowed_active_policies: user.allowed_active_policies.length ? `[${user.allowed_active_policies.join(',')}]` : '[]',
allowed_cd: user.allowed_cd.length ? `[${user.allowed_cd.join(',')}]` : '[]',
allowed_claims: user.allowed_claims.length ? `[${user.allowed_claims.join(',')}]` : '[]'
allowed_claims: user.allowed_claims.length ? `[${user.allowed_claims.join(',')}]` : '[]',
pre_client_id: user.pre_client_id || "",
pre_branch_id: user.pre_branch_id || "",
post_branch_id: user.post_branch_id || ""
};
});
@ -745,7 +798,10 @@ body {
console.log(output);
let url = '<?= base_url('util/saveHrAccessData') ?>';
let requestData = {json : output, client_id : client_id};
let requestData = {
json: output,
client_id: client_id
};
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
console.log('Data fetched successfully:', response);
@ -771,7 +827,7 @@ body {
return Array.from(checkboxes).map(cb => cb.value);
}
$(document).on('change', '.select-all', function () {
$(document).on('change', '.select-all', function() {
let $this = $(this);
let type = $this.data('type');
let user = $this.data('user');
@ -972,19 +1028,131 @@ body {
// console.log('--- END ---');
// });
</script>
<script>
$('#btnAutoBranchFetch').click(function() {
var myModal = new bootstrap.Modal(document.getElementById('autoFetchBranchModal'));
myModal.show();
})
</script>
<script>
$(document).ready(function(){
$('#client_add .nav-link').click(function(){
// change bg color of tab
$('#client_add .nav-link').removeClass('active-tab');
$(this).addClass('active-tab');
$('#auto_fetch_client').change(function() {
$('#auto_fetch_branch').html(`<option value="">Select Branch</option>`);
$.ajax({
url: "<?php echo base_url('client/branch/auto_fetch_branch'); ?>",
type: "POST",
data: {
client_id: $('#auto_fetch_client').val()
},
dataType: "json",
success: function(response, textStatus, xhr) {
if (xhr.status === 200) {
let options = `<option value="">Select Branch</option>`;
response.data.forEach((data) => {
options += `<option value="${data.id}">${data.branch_name}</option>`;
});
$('#auto_fetch_branch').html(options);
} else {
$('#auto_fetch_branch').html('<option value="">No Branch Found</option>');
}
},
error: function(xhr, status, error) {
console.error("Error occurred:", status, error);
},
complete: function() {
console.log("auto_fetch_client call is completed..!!");
}
});
});
});
</script>
<script>
$('#submitAutoFetch').click(function() {
let client_id = $('#auto_fetch_client').val();
let branch_id = $('#auto_fetch_branch').val();
if (client_id == "" || branch_id == "") {
Swal.fire({
icon: 'warning',
title: 'Missing Data',
text: 'Please select both Client and its Branch!',
confirmButtonText: 'OK'
});
return;
}
$.ajax({
url: "<?php echo base_url('client/branch/auto_fetch_branch_details'); ?>",
type: "POST",
data: {
client_id,
branch_id
},
dataType: "json",
success: function(response, textStatus, xhr) {
if (xhr.status === 200) {
let result = response.data[0]??[];
if(response.data[0] == []){
console.log("Empty array ..!!!");
return;
}
let units = JSON.parse(result['units']);
let $select = $('#selected');
$select.empty();
units.forEach(unit => {
// If you want to mark them as selected, set 'selected' attribute
$select.append(`<option value="${unit}" selected>${unit}</option>`);
});
$('#pre_branch_id').val(branch_id);
$('#branch_name').val(result['branch_name']??'');
$('#branch_code').val(result['branch_code']??'');
$('#address1').val(result['address1']??'');
$('#address2').val(result['address2']??'');
$('#state').val(result['state']??'');
$('#district').val(result['district']??'');
$('#branch_city').val(result['city']??'');
$('#pincode').val(result['pincode']??'');
$('#gst').val(result['gst']??'');
$('#sez').val(result['sez']??'');
} else {
console.log("User Error thrown");
console.log("status" + xhr.status);
}
closeModalById('autoFetchBranchModal');
},
error: function(xhr, status, error) {
console.error("Error occurred:", status, error);
},
complete: function() {
console.log("auto_fetch_branch_details call is completed..!!");
}
})
})
</script>

View File

@ -1,10 +1,10 @@
<style>
.col-12 {
.col-12 {
max-width: 98% !important;
}
}
.autocomplete-suggestions {
.autocomplete-suggestions {
border: 1px solid #d4d4d4;
max-height: 150px;
overflow-y: auto;
@ -13,33 +13,36 @@
width: inherit;
z-index: 1;
}
.autocomplete-suggestion {
padding: 8px;
cursor: pointer;
}
.autocomplete-suggestion:hover {
background-color: #e9e9e9;
}
</style>
<div class="row">
<div class="col-12" style="margin-top: -12px;">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="card-body" style="margin-top: 0px;">
<div class="form-group">
<form method="post" action="<?= base_url("/dmsSearch");?>" id='dms_search_form'>
<form method="post" action="<?= base_url("/dmsSearch"); ?>" id='dms_search_form'>
<div class="form-row">
<div class="form-group col-md-2">
<div class="form-group col-md-4">
<label for="customer">Customer</label>
<!-- <div style="position:relative;"> -->
<input type="text" class="form-control" id="customer" placeholder="Enter customer name">
@ -48,16 +51,20 @@
<!-- </div> -->
</div>
<div class="form-group col-md-2">
<div class="form-group col-md-4">
<label for="customer">Customer document name</label>
<!-- <div style="position:relative;"> -->
<input type="text" name="cus_doc_name" class="form-control" id="cus_doc_name" placeholder="Enter customer doc name ">
<!-- </div> -->
</div>
<div class="form-group col-md-1" style="text-align: center;">
<div class="form-group col-md-4"></div>
<div class="form-group col-md-8" style="text-align: center; font-size: small;">
OR
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4"></div>
<div class="form-group col-md-4">
<label for="customer">Policy</label>
<!-- <div style="position:relative;"> -->
<input type="text" class="form-control" id="policy" placeholder="Enter policy no">
@ -66,17 +73,19 @@
<!-- </div> -->
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="customer">Policy document name</label>
<!-- <div style="position:relative;"> -->
<input type="text" name="policy_doc_name" class="form-control" id="policy_doc_name" placeholder="Enter policy doc name ">
<!-- </div> -->
</div>
<div class="form-group col-md-4 d-flex justify-content-end align-items-end">
<button type="button" class="btn app-btn-outline-secondary mr-2" id="clear-filters">Clear</button>
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="get-emp-list" onclick="fetchFileList(event);">Submit</button>
<!-- <input type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="get-emp-list" onclick="fetchFileList(event);" value="submit"> -->
</div>
<div class="form-group text-right m-b-0">
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
<input type="submit" class="btn btn-primary waves-effect waves-light" id="get-emp-list" onclick="fetchFileList(event);" value="submit">
</div>
</form>
</div>
@ -86,6 +95,8 @@
</div>
</div>
</div>
</div>
<!-- end page title -->
@ -94,7 +105,8 @@
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">File search result</h4>
<h4 style="position: relative;">Files</h4>
<!-- <h4 style="position: relative;">File search result</h4> -->
</div>
</div>
@ -102,17 +114,17 @@
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100">
<thead class="bg-light">
<tr>
<th>S.No</th>
<th>Doc name</th>
<th>File name</th>
<th>Action</th>
<th>S.No&nbsp;</th>
<th>Doc name&nbsp;</th>
<th>File name&nbsp;</th>
<th>Action&nbsp;</th>
</tr>
</thead>
<tbody>
<?php if (isset($files)) { ?>
<?php foreach($files as $index => $row){ ?>
<tr>
<td><?= $index + 1 ?></td>
<td class="text-center"><?= $index + 1 ?></td>
<td><?php echo $row['doc_name']; ?></td>
<td><?php echo $row['file_name']; ?></td>
<td>
@ -125,6 +137,8 @@
</a>
</td>
</tr>
<?php } ?>
<?php } ?>
@ -140,39 +154,59 @@
<script>
$(document).ready(function() {
$(document).ready(function() {
// $('#client_id').select2();
// $('#insurer_id').select2();
// $('#policy_type_id').select2();
const customer_suggestions = <?php echo json_encode($customers); ?>;
const policy_suggestions = <?php echo json_encode($policies); ?>;
showSuggestions('customer','customer_suggestions','customer_id',customer_suggestions);
showSuggestions('policy','policy_suggestions','policy_id',policy_suggestions);
showSuggestions('customer', 'customer_suggestions', 'customer_id', customer_suggestions);
showSuggestions('policy', 'policy_suggestions', 'policy_id', policy_suggestions);
})
})
// Datatable document ready
$(document).ready(function() {
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}],
paging: true,
pageLength: 10,
order: [
[0, 'desc']
]
});
} else {
} else {
console.error("Table not found.");
}
});
}
});
function showSuggestions(inputID, suggestionBoxID,hiddenInputID,suggestions) {
function showSuggestions(inputID, suggestionBoxID, hiddenInputID, suggestions) {
// console.log('showSuggestions');
// console.log(suggestions);return;
@ -206,11 +240,10 @@ function showSuggestions(inputID, suggestionBoxID,hiddenInputID,suggestions) {
});
}
});
}
}
function fetchFileList(event)
{
function fetchFileList(event) {
event.preventDefault();
var customer = document.getElementById('customer').value;
@ -220,26 +253,25 @@ function fetchFileList(event)
var cus_doc_name = document.getElementById('cus_doc_name').value;
var policy_doc_name = document.getElementById('policy_doc_name').value;
if(customer == '' && cus_doc_name != '')
{
alert('choose customer');return false;
if (policy == '' && customer == '') {
alert('choose customer or policy');
return false;
}
if(policy == '' && policy_doc_name != '')
{
alert('choose policy');return false;
if (customer == '' && cus_doc_name != '') {
alert('choose customer');
return false;
}
if(policy == '' && customer == '')
{
alert('choose customer or policy');return false;
if (policy == '' && policy_doc_name != '') {
alert('choose policy');
return false;
}
console.log('called');
let customEvent = new CustomEvent('fetchFileListCustomEvent');
$('#dms_search_form').submit();
}
}
</script>

View File

@ -36,6 +36,7 @@
</div>
</div>
<div id="collapseOne">
<div id="file_table" class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
@ -45,13 +46,13 @@
</div>
<div class="table-responsive" style="overflow-x: auto;">
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S.No</th>
<th>Docs Name</th>
<th>File Name</th>
<th>Action</th>
<th>S.No&nbsp;</th>
<th>Docs Name&nbsp;</th>
<th>File Name&nbsp;</th>
<th>Action&nbsp;</th>
</tr>
</thead>
<tbody id="table_bd">
@ -62,6 +63,7 @@
</div>
</div><!-- end col -->
</div>
</div>
</div>

View File

@ -92,33 +92,33 @@
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<?php if (isset($getData)) {
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th class="font-weight-medium">Client/Branch</th>
<th class="font-weight-medium">Client/Branch&nbsp;</th>
<?php }
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th class="font-weight-medium">Branch</th>
<th class="font-weight-medium">Branch&nbsp;</th>
<?php } } ?>
<th class="font-weight-medium">Name</th>
<th class="font-weight-medium">EMP Code</th>
<th class="font-weight-medium">Relationship</th>
<th class="font-weight-medium">Gender</th>
<th class="font-weight-medium">Email</th>
<th class="font-weight-medium">Mobile</th>
<th class="font-weight-medium">Date of Birth</th>
<th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Insurer name</th>
<th class="font-weight-medium">TPA ID</th>
<th class="font-weight-medium">Risk ID</th>
<th class="font-weight-medium">Policy status</th>
<th class="font-weight-medium">()Sum Insured</th>
<th class="font-weight-medium">()Premium</th>
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">()Pro Rata <br> Premium</th>
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">()GST</th>
<th class="font-weight-medium" > Action </th>
<th class="font-weight-medium">Name&nbsp;</th>
<th class="font-weight-medium">EMP Code&nbsp;</th>
<th class="font-weight-medium">Relationship&nbsp;</th>
<th class="font-weight-medium">Gender&nbsp;</th>
<th class="font-weight-medium">Email&nbsp;</th>
<th class="font-weight-medium">Mobile&nbsp;</th>
<th class="font-weight-medium">Date of Birth&nbsp;</th>
<th class="font-weight-medium">Policy name&nbsp;</th>
<th class="font-weight-medium">Insurer name&nbsp;</th>
<th class="font-weight-medium">TPA ID&nbsp;</th>
<th class="font-weight-medium">Risk ID&nbsp;</th>
<th class="font-weight-medium">Policy status&nbsp;</th>
<th class="font-weight-medium">()Sum Insured&nbsp;</th>
<th class="font-weight-medium">()Premium&nbsp;</th>
<th class="font-weight-medium" id="rata_premium" data-toggle="tooltip" data-placement="top">()Pro Rata <br> Premium&nbsp;</th>
<th class="font-weight-medium" id="gst" data-toggle="tooltip" data-placement="top">()GST&nbsp;</th>
<th class="font-weight-medium" > Action &nbsp;</th>
</tr>
</thead>
@ -129,7 +129,7 @@
$gst_total = 0;
foreach ($employees as $key => $employee) { ?>
<tr>
<td><b><?php echo ($key + 1); ?></b></td>
<td class="text-center"><b><?php echo ($key + 1); ?></b></td>
<?php if (isset($getData)) {
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
@ -343,18 +343,34 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Member-List',
},{
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'Member-List',
}],
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)

View File

@ -1,25 +1,25 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
}
.select2-selection__choice {
.select2-selection__choice {
background-color: #0a8794 !important;
color: white !important;
font-weight: bold;
}
}
.select2-selection__choice__remove {
.select2-selection__choice__remove {
color: white !important;
margin-right: 5px;
}
}
.custom-dropdown-menu {
.custom-dropdown-menu {
display: none;
position: absolute;
background-color: #ffffff !important;
@ -29,41 +29,36 @@ table.dataTable tbody td {
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
color: #212529 !important;
text-decoration: none !important;
background-color: transparent !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
.row{
margin-right:20px !important;
margin-left:30px !important;
}
</style>
<div class="row">
<div class="col-xl-12">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h3 class="m-1">
<span>Members</span>
<h4>
Filter
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h3>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -95,7 +90,7 @@ table.dataTable tbody td {
<label>Status</label> <br />
<select class="form-control" name="status2[]" id="status2" multiple>
<option value="0">Select</option>
<?php foreach($status as $key => $value) { ?>
<?php foreach ($status as $key => $value) { ?>
<option value="<?= $key ?>"
<?php
if ((!isset($getData) || in_array('active', $getData['status'])) && $key == 'active') {
@ -140,107 +135,110 @@ table.dataTable tbody td {
</div>
</div>
</div>
</div>
</div>
<?php // include('employee_data_list.php');?>
<?php // include('employee_data_list.php');
?>
<div id="employee_table_list"></div>
<!-- end row -->
<div id="loader" class="loader" style="display:none;">SPINNER</div>
<script>
// document.addEventListener("DOMContentLoaded", function () {
// const table = document.getElementById("tickets-table");
// document.addEventListener("DOMContentLoaded", function () {
// const table = document.getElementById("tickets-table");
// // Create custom dropdown
// function createCustomDropdown(row) {
// // Get the original dropdown items
// const originalDropdown = row.querySelector('.dropdown-menu');
// if (!originalDropdown) return null;
// // Create custom dropdown
// function createCustomDropdown(row) {
// // Get the original dropdown items
// const originalDropdown = row.querySelector('.dropdown-menu');
// if (!originalDropdown) return null;
// // Create new dropdown with proper background and spacing
// const customDropdown = document.createElement('div');
// customDropdown.className = 'custom-dropdown-menu';
// // Create new dropdown with proper background and spacing
// const customDropdown = document.createElement('div');
// customDropdown.className = 'custom-dropdown-menu';
// // Copy inner content while maintaining icon alignment
// customDropdown.innerHTML = originalDropdown.innerHTML;
// // Copy inner content while maintaining icon alignment
// customDropdown.innerHTML = originalDropdown.innerHTML;
// return customDropdown;
// }
// return customDropdown;
// }
// let activeDropdown = null;
// let activeDropdown = null;
// // Add click event listener to rows
// table.querySelectorAll("tbody tr").forEach(row => {
// const customDropdown = createCustomDropdown(row);
// if (!customDropdown) return;
// // Add click event listener to rows
// table.querySelectorAll("tbody tr").forEach(row => {
// const customDropdown = createCustomDropdown(row);
// if (!customDropdown) return;
// document.body.appendChild(customDropdown);
// document.body.appendChild(customDropdown);
// row.addEventListener("click", function(event) {
// // Ignore clicks on the action column
// if (event.target.closest('td:last-child')) {
// return;
// }
// row.addEventListener("click", function(event) {
// // Ignore clicks on the action column
// if (event.target.closest('td:last-child')) {
// return;
// }
// // Hide any active dropdown
// if (activeDropdown) {
// activeDropdown.style.display = 'none';
// }
// // Hide any active dropdown
// if (activeDropdown) {
// activeDropdown.style.display = 'none';
// }
// // Get click position
// const rect = event.target.getBoundingClientRect();
// // Get click position
// const rect = event.target.getBoundingClientRect();
// // Position the dropdown with some offset
// customDropdown.style.display = 'block';
// customDropdown.style.position = 'fixed';
// customDropdown.style.left = `${rect.left}px`;
// customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
// // Position the dropdown with some offset
// customDropdown.style.display = 'block';
// customDropdown.style.position = 'fixed';
// customDropdown.style.left = `${rect.left}px`;
// customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
// // Set as active dropdown
// activeDropdown = customDropdown;
// // Set as active dropdown
// activeDropdown = customDropdown;
// event.stopPropagation();
// });
// event.stopPropagation();
// });
// // Preserve click handlers and add auto-close
// customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
// item.addEventListener('click', function(e) {
// const onclickAttr = this.getAttribute('onclick');
// if (onclickAttr) {
// eval(onclickAttr);
// }
// // Preserve click handlers and add auto-close
// customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
// item.addEventListener('click', function(e) {
// const onclickAttr = this.getAttribute('onclick');
// if (onclickAttr) {
// eval(onclickAttr);
// }
// const href = this.getAttribute('href');
// if (href && href !== '#') {
// window.location.href = href;
// }
// const href = this.getAttribute('href');
// if (href && href !== '#') {
// window.location.href = href;
// }
// // Close the dropdown after handling the click
// if (activeDropdown) {
// activeDropdown.style.display = 'none';
// activeDropdown = null;
// }
// // Close the dropdown after handling the click
// if (activeDropdown) {
// activeDropdown.style.display = 'none';
// activeDropdown = null;
// }
// e.stopPropagation();
// });
// });
// });
// e.stopPropagation();
// });
// });
// });
// // Close dropdown when clicking outside
// document.addEventListener("click", function() {
// if (activeDropdown) {
// activeDropdown.style.display = 'none';
// activeDropdown = null;
// }
// });
// });
// // Close dropdown when clicking outside
// document.addEventListener("click", function() {
// if (activeDropdown) {
// activeDropdown.style.display = 'none';
// activeDropdown = null;
// }
// });
// });
// document.addEventListener("DOMContentLoaded", init);
// document.addEventListener("DOMContentLoaded", init);
function init() {
function init() {
const table = document.getElementById("tickets-table");
let activeDropdown = null;
@ -336,19 +334,17 @@ function init() {
activeDropdown = null;
}
}
}
}
</script>
<script>
$(document).ready(function() {
$(document).ready(function() {
// Initialize select2
$("#clients").select2();
$("#policies").select2();
$("#branch_id").select2();
$("#status2").select2({
placeholder : 'Select Status'
placeholder: 'Select Status'
});
$("textarea.select2-search__field").attr('rows', '1');
@ -357,19 +353,19 @@ $(document).ready(function() {
// if ($('.select2-selection__arrow').length > 0) {
// $('.select2-selection__arrow').removeClass('select2-selection__arrow').addClass('fa fa-chevron-down');
// }
});
});
// Declare a global variable to store API response data
var clientPolicies = [];
var clientPoliciesWithBranch = {
// Declare a global variable to store API response data
var clientPolicies = [];
var clientPoliciesWithBranch = {
policies: []
};
var client_id = '<?= isset($getData) ? $getData['client_id'] : '0' ?>';
var client_branch_id = '<?= isset($getData) ? $getData['branch_id'] : '0' ?>';
};
var client_id = '<?= isset($getData) ? $getData['client_id'] : '0' ?>';
var client_branch_id = '<?= isset($getData) ? $getData['branch_id'] : '0' ?>';
var statusData = <?= json_encode(isset($getData['status']) ? $getData['status'] : []) ?>;
var statusData = <?= json_encode(isset($getData['status']) ? $getData['status'] : []) ?>;
$(document).ready(function() {
$(document).ready(function() {
// Loop through each item in statusData and set the option as selected.
statusData.forEach(function(status) {
$('#status2 option[value="' + status + '"]').prop('selected', true);
@ -377,22 +373,22 @@ $(document).ready(function() {
// Refresh the select element (necessary if you are using a plugin like Select2).
$('#status2').trigger('change');
});
});
$(document).ready(function() {
$(document).ready(function() {
console.log("document loaded");
//fetchClientPolicies();
});
});
$(window).on("load", function() {
$(window).on("load", function() {
console.log("window loaded");
fetchClientPolicies();
});
});
function fetchClientPolicies() {
function fetchClientPolicies() {
$('#loader').show();
var apiURL = '<?php echo base_url();?>' + 'util/clients-with-policies';
var apiURL = '<?php echo base_url(); ?>' + 'util/clients-with-policies';
console.log('fetchClientPolicies');
// console.log(apiURL);
$.ajax({
@ -422,7 +418,7 @@ function fetchClientPolicies() {
//this function for reselect the policy
setTimeout(function() {
if (client_id != 0 ) {
if (client_id != 0) {
var foundPolicies = clientPolicies.find(function(item) {
// console.log(typeof item.id)
return item.id == client_id;
@ -432,7 +428,7 @@ function fetchClientPolicies() {
}, 500);
setTimeout(function() {
if (client_branch_id != 0 ) {
if (client_branch_id != 0) {
var foundPolicies = clientPoliciesWithBranch.policies.filter(function(item) {
// console.log('item', item);
@ -464,9 +460,9 @@ function fetchClientPolicies() {
});
$('#loader').hide();
}
}
function appendClients(data) {
function appendClients(data) {
var clientID = <?= isset($getData) ? $getData['client_id'] : '0' ?>;
$.each(data, function(index, item) {
var option = $('<option>', {
@ -478,9 +474,9 @@ function appendClients(data) {
}
$('#clients').append(option);
});
}
}
function appendBranch(data) {
function appendBranch(data) {
$('#branch_id').empty();
$('#branch_id').append($('<option>', {
@ -497,9 +493,9 @@ function appendBranch(data) {
}
$('#branch_id').append(option);
});
}
}
function appendPolicies(data) {
function appendPolicies(data) {
$('#policies').empty();
$('#policies').append($('<option>', {
@ -507,22 +503,22 @@ function appendPolicies(data) {
text: 'Select'
}));
var PolicyID = <?= isset($getData) ? $getData['policy_id'] : '0'?>;
var PolicyID = <?= isset($getData) ? $getData['policy_id'] : '0' ?>;
// console.log(PolicyID)
$.each(data, function(index, item) {
var option = $('<option>', {
value: item.client_policy_id,
// text: `${item.name ?? ''} - ${item.policy_no ?? ''} - ${item.policy_type ?? ''}`
text:`${item.policy_type ?? ''} - ${item.policy_no ?? ''}`
text: `${item.policy_type ?? ''} - ${item.policy_no ?? ''}`
});
if (PolicyID == item.client_policy_id) {
option.attr('selected', true);
}
$('#policies').append(option);
});
}
}
$(document).ready(function() {
$(document).ready(function() {
$('#clients').on('change', function() {
@ -543,9 +539,9 @@ $(document).ready(function() {
// console.log(foundPolicies.branchs);
appendBranch(foundPolicies.branchs);
});
});
});
$(document).ready(function() {
$(document).ready(function() {
$('#branch_id').on('change', function() {
@ -572,16 +568,16 @@ $(document).ready(function() {
}
});
});
});
// Function to convert object to query parameters
function objectToQueryString(obj) {
// Function to convert object to query parameters
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function fetchEmpolyeeList(event = null) {
function fetchEmpolyeeList(event = null) {
if(event){
if (event) {
event.preventDefault(); // Prevent default action
}
@ -608,9 +604,9 @@ function fetchEmpolyeeList(event = null) {
client_id: client_id,
policy_id: policy_id,
branch_id: branch_id,
emp_code : emp_code,
emp_name : emp_name,
status : statusArray,
emp_code: emp_code,
emp_name: emp_name,
status: statusArray,
};
const queryString = objectToQueryString(queryParams);
@ -629,34 +625,33 @@ function fetchEmpolyeeList(event = null) {
method: 'GET',
data: queryParams,
success: function(response) {
if(response.status == true){
if (response.status == true) {
$('#employee_table_list').html(response.html);
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
setTimeout(function(){
setTimeout(function() {
init()
}, 1000)
}
},
error: function(xhr, status, error) {
console.error('Error:', error);
toastr.error('Failed to fetch Data','Error');
toastr.error('Failed to fetch Data', 'Error');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
}
});
}
}
document.getElementById('toggleIcon').addEventListener('click', function() {
document.getElementById('toggleIcon').addEventListener('click', function() {
var icon = document.getElementById('icon');
icon.classList.toggle('mdi-chevron-down');
icon.classList.toggle('mdi-chevron-up');
});
});
function sendManualEcard(input)
{
function sendManualEcard(input) {
console.log('sendManualEcard function called');
var client_id = $('#clients').val()
@ -667,8 +662,7 @@ function sendManualEcard(input)
console.log('client_id', client_id);
console.log('client_branch_id', client_branch_id);
if(client_id == 0 || client_branch_id == 0 || policy_id == 0)
{
if (client_id == 0 || client_branch_id == 0 || policy_id == 0) {
Swal.fire({
title: "warning!",
text: 'Please select the Client, Client Branch and Policy.',
@ -689,7 +683,7 @@ function sendManualEcard(input)
if (result.isConfirmed) {
$.ajax({
url: '<?= base_url("util/send_manual_ecard/") ?>' + client_id + '/' + client_branch_id+'/'+policy_id,
url: '<?= base_url("util/send_manual_ecard/") ?>' + client_id + '/' + client_branch_id + '/' + policy_id,
type: "GET",
dataType: 'json',
success: function(res) {
@ -699,9 +693,9 @@ function sendManualEcard(input)
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
if(res.status == false){
if (res.status == false) {
toastr.info(res.message, 'INFO');
}else{
} else {
toastr.success(res.message, 'SUCCESS');
}
@ -717,6 +711,5 @@ function sendManualEcard(input)
}
});
}
}
</script>

View File

@ -11,12 +11,23 @@ option:disabled {
<div class="col-xl-12">
<div id="accordion1" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filters</span>
<a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<!-- <label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<a id="toggleIcon1" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon1" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label> -->
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion1">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -86,7 +97,7 @@ option:disabled {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button id="emp_form_submit_button" type="submit"
class=" nav-link-btn px-3 py-1 btn btn-primary waves-effect waves-light justify-content-end">Upload</button>
class=" nav-link-btn px-3 py-2 btn btn-primary waves-effect waves-light justify-content-end">Upload</button>
&nbsp;&nbsp;
@ -94,7 +105,7 @@ option:disabled {
&nbsp;&nbsp;
<a class=" nav-link-btn px-3 py-1 btn btn-primary waves-effect waves-light justify-content-end"
<a class=" nav-link-btn px-3 py-2 btn btn-primary waves-effect waves-light justify-content-end"
id="fetch_enrolled_data" data-toggle="modal"
data-target="#full-width-modal" title="Download Sample Excel">Fetch
Enrolled Data</a>

View File

@ -14,17 +14,19 @@
}
</style>
<div class="container-fluid">
<h2>Endorsement</h2>
<div class="container-fluid-min">
<div class="row">
<div class="col-xl-12">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<h4>
Filter
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -75,6 +77,8 @@
</div>
</div>
</div>
</div>
</div>
<div class="row" id="client_list">
@ -90,7 +94,7 @@
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Name/code</th>
<th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Endorsement ID</th>
@ -108,7 +112,7 @@
foreach ($employees as $key => $employee) { ?>
<tr>
<td><b><?php echo ($key + 1) ?></b></td>
<td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td><?php echo $employee['name'] ?>( <?php echo $employee['emp_code'] ?> )</td>
<!-- <td><?php echo isset($employee['policy_name']) ? $employee['policy_name'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?> - <?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?></td> -->
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : '' ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : '' ?></td>
@ -332,7 +336,7 @@
var option = $('<option>', {
value: item.client_policy_id,
// text: `${item.name ?? ''} - ${item.policy_no ?? ''} - ${item.policy_type ?? ''}`
text:`${item.policy_type ?? ''} - ${item.policy_no ?? ''}`
text: `${item.policy_type ?? ''} - ${item.policy_no ?? ''}`
});
if (PolicyID == item.client_policy_id) {
option.attr('selected', true);
@ -590,27 +594,54 @@
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
openTicket();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'Endorsement-List',
className: 'my_class',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
columns: ':not(:last-child)',
format: {
body: function (data, row, column, node) {
// Convert data to string to avoid scientific notation in CSV
if (!isNaN(data) && parseFloat(data) > 1e20) {
return `'${data}`;
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
return data.toString();// Ensures all data is treated as strings
]
}
}
}
}],
],
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'Endorsement-List',
// className: 'my_class',
// exportOptions: {
// columns: ':not(:last-child)',
// format: {
// body: function (data, row, column, node) {
// // Convert data to string to avoid scientific notation in CSV
// if (!isNaN(data) && parseFloat(data) > 1e20) {
// return `'${data}`;
// }
// return data.toString();// Ensures all data is treated as strings
// }
// }
// }
// }],
initComplete: function(settings, json) {
$('.my_class').css({
"position": "relative",
@ -618,13 +649,19 @@
});
},
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
// pagingType: 'full_numbers'
columnDefs: [
{ type: 'scientific', targets: 0 } // Apply custom sorting type to the first column
columnDefs: [{
type: 'scientific',
targets: 0
} // Apply custom sorting type to the first column
],
});

View File

@ -31,17 +31,20 @@
box-shadow: 6px 5px 8px 0 #00000036;
cursor: pointer;
}
.click_hover .text-muted{
.click_hover .text-muted {
color: #fff !important;
}
.click_hover span{
.click_hover span {
color: #fff !important;
}
.card {
border-radius: 10px;
}
.row.visa_status_count_view .card-header{
.row.visa_status_count_view .card-header {
background-color: #F5FFFF;
padding: 25px;
border: 2px solid #fff;
@ -50,63 +53,61 @@
box-shadow: 0px 1px 1px 0px #00000040;
}
.row.visa_status_count_view .card-header #categoryFilter_11 a{
.row.visa_status_count_view .card-header #categoryFilter_11 a {
background-color: #D4F5F6 !important;
font-weight:800;
color:#000 !important;
border : 1px solid #D4F5F6 !important;
font-weight: 800;
color: #000 !important;
border: 1px solid #D4F5F6 !important;
border-radius: 15px;
padding : 5px 10px;
padding: 5px 10px;
}
#categoryFilter_12 a ,
#categoryFilter_13 a ,
#categoryFilter_14 a
{
#categoryFilter_12 a,
#categoryFilter_13 a,
#categoryFilter_14 a {
background-color: #00999E;
box-shadow: 0px 2px 4px 0px #00000040;
}
#statusContent{
#statusContent {
background-color: #F5FFFF;
border-radius: 10px;
box-shadow: 0px 1px 1px 0px #00000040;
}
#statusContent .statusContent-flex{
display:flex;
#statusContent .statusContent-flex {
display: flex;
flex-flow: row wrap;
}
.statusContent-flex .my-2{
color:black !important;
.statusContent-flex .my-2 {
color: black !important;
}
#statusContent .custom-card{
min-width:300px;
#statusContent .custom-card {
min-width: 300px;
min-height: 50px;
padding:15px;
padding: 15px;
background-color: white;
color:black;
margin-right:15px;
margin-top :10px;
color: black;
margin-right: 15px;
margin-top: 10px;
border-radius: 10px;
box-shadow: 0px 2px 4px 0px #00000024 !important;
}
</style>
<div class="container-fluid">
<h2>Enrollment</h2>
<div class="row visa_status_count_view">
<div class="container-fluid-min">
<div class="row visa_status_count_view">
<div class="col-12">
<div class="card-body">
<div class="card">
<div class="card-header">
<div class="row" >
<div class="row">
<div class="col-3">
<div id="categoryFilter" >
<div id="categoryFilter">
<label for="">Client</label>
<select class="form-control" id="clients" onchange="populateBranches()">
<option value="0">Select Client</option>
@ -133,7 +134,7 @@
</div>
</div>
<div class="col-3">
<div id="categoryFilter_11" >
<div id="categoryFilter_11">
<a class="btn btn-primary waves-effect waves-light"
style="margin-top:30px !important"
onclick="fetchEmpolyeeList(event);"
@ -143,21 +144,21 @@
</div>
<div class="col-6" style="margin-right: 15px; margin-top:30px; ">
<span id="categoryFilter_12" style="margin-right: 15px;">
<a class="btn btn-primary waves-effect waves-light" onclick="sendManualReminder(this)" data-toggle="tooltip" data-placement="top" title="Send Reminder"><span >Send Remainder</span></a>
<a class="btn btn-primary waves-effect waves-light" onclick="sendManualReminder(this)" data-toggle="tooltip" data-placement="top" title="Send Reminder"><span>Send Remainder</span></a>
</span>
<span id="categoryFilter_13" style="margin-right: 15px;">
<a class="btn btn-primary waves-effect waves-light" onclick="uploadEnrollmentFile(this)" data-toggle="tooltip" data-placement="top" title="Enrollment File Upload"><span >File Upload</span></a>
<a class="btn btn-primary waves-effect waves-light" onclick="uploadEnrollmentFile(this)" data-toggle="tooltip" data-placement="top" title="Enrollment File Upload"><span>File Upload</span></a>
</span>
<button id="categoryFilter_14" type="button" class="btn btn-link visa_status_button" onclick="toggleContent()" data-toggle="tooltip" data-placement="top" >
<a class="btn btn-primary waves-effect waves-light" data-toggle="tooltip" data-placement="top" title="View Status"><span >View Status</span></a>
<button id="categoryFilter_14" type="button" class="btn btn-link visa_status_button" onclick="toggleContent()" data-toggle="tooltip" data-placement="top">
<a class="btn btn-primary waves-effect waves-light" data-toggle="tooltip" data-placement="top" title="View Status"><span>View Status</span></a>
</button>
</div>
</div>
</div>
<div class="card-body status-option" id="statusContent" >
<div class="card-body status-option" id="statusContent">
<h4>Status</h4>
<div class="text-center">
@ -168,7 +169,7 @@
<span class="text-muted font-weight-normal mt-0 text-truncate my-2" title="Emp Count">Emp Count</span>
</div>
<div>
<span class="my-2"><span data-plugin="counterup" id="emp_count_view" >0</span>
<span class="my-2"><span data-plugin="counterup" id="emp_count_view">0</span>
</div>
</div>
<div class="custom-card d-flex justify-content-between" id="emp_enrolled_view_click">
@ -176,7 +177,7 @@
<span class="text-muted font-weight-normal mt-0 text-truncate my-2" title="Enrolled">Enroled</span>
</div>
<div>
<span class="my-2"><span data-plugin="counterup" id="emp_enrolled_view" >0</span>
<span class="my-2"><span data-plugin="counterup" id="emp_enrolled_view">0</span>
</div>
</div>
<div class="custom-card d-flex justify-content-between" id="emp_not_enrolled_view_click">
@ -211,16 +212,18 @@
</div>
</div>
</div>
</div>
<div class="row" id="client_list">
</div>
</div>
<div class="row" id="client_list">
<div class="col-12">
<div class="card">
<div class="card-body">
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Name</th>
<th class="font-weight-medium">Emp Code</th>
<th class="font-weight-medium">Relationship</th>
@ -235,7 +238,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Center modal content -->
@ -247,7 +250,7 @@
<button type="button" id="close_btn" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<form class="parsley-examples" method="post" id="uploadForm" action="<?php echo base_url().'employee/upload'?>" enctype="multipart/form-data">
<form class="parsley-examples" method="post" id="uploadForm" action="<?php echo base_url() . 'employee/upload' ?>" enctype="multipart/form-data">
<input type="hidden" id="file_client_id" name="client_id">
<input type="hidden" id="file_branch_id" name="branch_id">
<input type="hidden" id="file_upload_actions" name="upload-action-type" value="enrollment">
@ -256,7 +259,7 @@
<div class="form-group col-md-12">
<label for="policy_id">Client Policy<span class="text-danger">*</span></label>
<select class="form-control" id="policy_id" name="policy_id" required>
<option selected >Select Client Policy</option>
<option selected>Select Client Policy</option>
</select>
</div>
</div>
@ -278,9 +281,7 @@
</div><!-- /.modal -->
<script>
function populateBranches()
{
function populateBranches() {
var clientId = document.getElementById('clients').value;
var branchDropdown = document.getElementById('branch_id');
@ -302,8 +303,7 @@
});
}
function populatePolicies()
{
function populatePolicies() {
console.log('populatePolicies function called');
var clientId = document.getElementById('clients').value;
@ -334,8 +334,7 @@
});
}
function filterTable(columnIndex, filterValue)
{
function filterTable(columnIndex, filterValue) {
var table = $('#tickets-table').DataTable();
// Reset the search filter for all columns
@ -345,8 +344,7 @@
table.column(columnIndex).search(filterValue).draw();
}
function fetchEmpolyeeList(event)
{
function fetchEmpolyeeList(event) {
event.preventDefault();
var client_id = $('#clients').val();
@ -396,17 +394,17 @@
var loggedIn_count = 0;
data.forEach(function(employee, index) {
if(employee.emp_status !== 'draft'){
if (employee.emp_status !== 'draft') {
var enrolled = 'Yes';
enrolled_count++;
}else{
} else {
var enrolled = 'No';
}
if(employee.user_type === 'employee'){
if (employee.user_type === 'employee') {
var loggedIn = 'Yes';
loggedIn_count++;
}else{
} else {
var loggedIn = 'No';
}
@ -444,8 +442,7 @@
});
}
$(document).ready(function()
{
$(document).ready(function() {
function getUrlParameter(name) {
var params = new URLSearchParams(window.location.search);
@ -464,7 +461,7 @@
if (branch_id) {
setTimeout(function() { // Ensure branches are populated before setting branch ID
$('#branch_id').val(branch_id).trigger('change');
if($('#branch_id').val() != 0){
if ($('#branch_id').val() != 0) {
$('#get-emp-list').click().trigger();
}
}, 500);
@ -472,7 +469,9 @@
}
if (history.pushState) {
var newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
window.history.pushState({path: newUrl}, '', newUrl);
window.history.pushState({
path: newUrl
}, '', newUrl);
}
setTimeout(() => {
@ -488,32 +487,66 @@
$('#client_policy_id').select2();
var table = $('#tickets-table').DataTable({
dom: 'fBrtip',
buttons: [
{
// buttons: [
// {
// extend: 'copy',
// text: '<i class="mdi mdi-content-copy"></i>',
// titleAttr: 'Copy',
// filename: 'Enrolment List'
// },
// {
// extend: 'print',
// text: '<i class="mdi mdi-printer"></i>',
// titleAttr: 'Print',
// filename: 'Enrolment List'
// },
// {
// extend: 'pdf',
// text: '<i class="mdi mdi-file-pdf"></i>',
// titleAttr: 'PDF',
// filename: 'Enrolment List'
// },
// {
// extend: 'csv',
// text: '<i class="mdi mdi-file-document"></i>',
// titleAttr: 'CSV',
// filename: 'Enrolment List'
// }
// ],
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'copy',
text: '<i class="mdi mdi-content-copy"></i>',
titleAttr: 'Copy',
filename: 'Enrolment List'
},
{
extend: 'print',
text: '<i class="mdi mdi-printer"></i>',
titleAttr: 'Print',
filename: 'Enrolment List'
},
{
extend: 'pdf',
text: '<i class="mdi mdi-file-pdf"></i>',
titleAttr: 'PDF',
filename: 'Enrolment List'
className: 'app-btn-primary ',
},
{
extend: 'csv',
text: '<i class="mdi mdi-file-document"></i>',
titleAttr: 'CSV',
filename: 'Enrolment List'
className: 'app-btn-primary ',
},
{
extend: 'print',
text: '<i class="mdi mdi-printer"></i>',
titleAttr: 'Print',
filename: 'Enrolment List'
className: 'app-btn-primary ',
},
{
extend: 'pdf',
text: '<i class="mdi mdi-file-pdf"></i>',
titleAttr: 'PDF',
filename: 'Enrolment List'
className: 'app-btn-primary ',
}
],
]
}],
initComplete: function() {
// Add custom class to the print button
$('.buttons-print').addClass('buttons-html5');
@ -528,7 +561,7 @@
$(this).removeClass('click_hover');
});
table.columns().search('').draw(); // Clear all filters and show all data
}else{
} else {
$('.click_hover').each(function() {
$(this).removeClass('click_hover');
});
@ -544,7 +577,7 @@
$(this).removeClass('click_hover');
});
table.columns().search('').draw(); // Clear all filters and show all data
}else{
} else {
$('.click_hover').each(function() {
$(this).removeClass('click_hover');
});
@ -560,7 +593,7 @@
$(this).removeClass('click_hover');
});
table.columns().search('').draw(); // Clear all filters and show all data
}else{
} else {
$('.click_hover').each(function() {
$(this).removeClass('click_hover');
});
@ -576,7 +609,7 @@
$(this).removeClass('click_hover');
});
table.columns().search('').draw(); // Clear all filters and show all data
}else{
} else {
$('.click_hover').each(function() {
$(this).removeClass('click_hover');
});
@ -592,7 +625,7 @@
$(this).removeClass('click_hover');
});
table.columns().search('').draw(); // Clear all filters and show all data
}else{
} else {
$('.click_hover').each(function() {
$(this).removeClass('click_hover');
});
@ -604,8 +637,7 @@
toggleContent();
});
function toggleContent()
{
function toggleContent() {
var content = document.getElementById("statusContent");
var toggleIcon = document.getElementById("toggleIcon");
if (content.style.display === "none") {
@ -622,8 +654,7 @@
//----------------------------------------------------------------------------------------------------
function uploadEnrollmentFile(input)
{
function uploadEnrollmentFile(input) {
console.log('uploadEnrollmentFile called');
var client_id = $('#clients').val()
@ -633,7 +664,7 @@
console.log('client_id', client_id);
console.log('client_branch_id', client_branch_id);
if(client_id == 0 && client_branch_id == 0){
if (client_id == 0 && client_branch_id == 0) {
Swal.fire({
title: "warning!",
@ -679,8 +710,7 @@
}
function appendpolicy(data)
{
function appendpolicy(data) {
$('#policy_id').empty();
$('#policy_id').append($('<option>', {
@ -692,7 +722,7 @@
$.each(data, function(index, item) {
var option = $('<option>', {
value: item.id,
text:`${item.policy_name ?? ''} - ${item.policy_no ?? ''}`
text: `${item.policy_name ?? ''} - ${item.policy_no ?? ''}`
});
$('#policy_id').append(option);
});
@ -712,7 +742,7 @@
return;
}
if(client_id == 0 && client_branch_id == 0){
if (client_id == 0 && client_branch_id == 0) {
toastr.warning('Select Client and Client Branch');
return false;
}
@ -776,8 +806,7 @@
});
function sendManualReminder(input)
{
function sendManualReminder(input) {
console.log('sendManualReminder function called');
var client_id = $('#clients').val()
@ -837,9 +866,9 @@
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
if(res.status == false){
if (res.status == false) {
toastr.info(res.message, 'INFO');
}else{
} else {
toastr.success(res.message, 'SUCCESS');
}

View File

@ -19,19 +19,18 @@
</div>
</div>
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0"
id="tickets-table">
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">File name</th>
<th class="font-weight-medium">Client</th>
<th class="font-weight-medium">Client Branch</th>
<th class="font-weight-medium">Policy</th>
<th class="font-weight-medium">Event</th>
<th class="font-weight-medium">User/Time</th>
<th class="font-weight-medium">Status</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">File name&nbsp;</th>
<th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Client Branch&nbsp;</th>
<th class="font-weight-medium">Policy&nbsp;</th>
<th class="font-weight-medium">Event&nbsp;</th>
<th class="font-weight-medium">User/Time&nbsp;</th>
<th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
</tr>
</thead>
@ -45,7 +44,7 @@
?>
<tr>
<td><b><?php echo ($key + 1) ?></b></td>
<td class="text-center"><b><?php echo ($key + 1) ?></b></td>
<td style="overflow: hidden;" class="reload truncate" data-toggle="tooltip" data-placement="top" title="<?php echo $file['file_name'] ?>">
<?php echo $file['file_name']?>
</td>
@ -461,28 +460,57 @@ $('body').on('click', '.reload', function() {
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
"buttons": [{
"extend": 'csv',
"text": 'CSV',
"title": 'Employee-Upload-List',
"className": 'my_class',
"exportOptions": {
"columns": ':not(:last-child)'
},
}],
"initComplete": function(settings, json) {
$('.my_class').css({
"position": "relative",
"left": "79px"
});
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Employee-Upload-List',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
// "buttons": [{
// "extend": 'csv',
// "text": 'CSV',
// "title": 'Employee-Upload-List',
// "className": 'my_class',
// "exportOptions": {
// "columns": ':not(:last-child)'
// },
// }],
// "initComplete": function(settings, json) {
// $('.my_class').css({
// "position": "relative",
// "left": "79px"
// });
// },
// language: {
// search: "_INPUT_",
// searchPlaceholder: "Search..."
// },
paging: true,
});

View File

@ -1,22 +1,23 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
}
.col-12 {
.col-12 {
max-width: 98% !important;
}
}
.dataTables_filter {
.dataTables_filter {
position: absolute;
}
.custom-dropdown-menu {
}
.custom-dropdown-menu {
display: none;
position: absolute;
background-color: #ffffff !important;
@ -26,34 +27,36 @@ table.dataTable tbody td {
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
color: #212529 !important;
text-decoration: none !important;
background-color: transparent !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
</style>
<div class="row" id="finance_filter">
<div class="col-12" style="margin-top: -12px;">
<div class="col-12" id="finance_filter">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
@ -80,7 +83,7 @@ table.dataTable tbody td {
<option value="0" selected>Select Insurer</option>
<?php if (isset($insurer) && count($insurer)) { ?>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
<?php } ?>
</select>
@ -135,16 +138,15 @@ table.dataTable tbody td {
<div class="form-group col-md-3" style="display: none;" id="date_div">
<label>Date<span class="text-danger"></span></label>
<div id="reportrange" class="form-control"
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp;
<span></span> <i class="mdi mdi-menu-down"></i>
<div class="input-icon">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<input type="hidden" id="startDate">
<input type="hidden" id="endDate">
</div>
<div class="form-group col-md-3 text-right m-b-0" style="margin-top: 29px;">
</div>
<div class="form-group text-right m-b-0">
<a href="<?= base_url("/policy_tranction/report/report-finance-list"); ?>"
class="btn btn-secondary" id="clear-filters">Clear</a>
<a href="<?= base_url("/policy_tranction/report/report-finance-list"); ?>"
@ -152,7 +154,7 @@ table.dataTable tbody td {
onclick="fetchEmpolyeeList(event);">Submit</a>
</div>
</div>
<!-- <div class="form-group text-right m-b-0">
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
@ -182,19 +184,19 @@ table.dataTable tbody td {
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S.No</th>
<th>Client Name</th>
<th>Insurer</th>
<th>Policy</th>
<th>Policy No</th>
<th>Endorsement No</th>
<th>Event Type</th>
<th>Action</th>
<th>S.No&nbsp;</th>
<th>Client Name&nbsp;</th>
<th>Insurer&nbsp;</th>
<th>Policy&nbsp;</th>
<th>Policy No&nbsp;</th>
<th>Endorsement No&nbsp;</th>
<th>Event Type&nbsp;</th>
<th>Action&nbsp;</th>
</tr>
</thead>
<tbody>
<?php if (isset($finance_list)) { ?>
<?php foreach($finance_list as $index => $row){ ?>
<?php foreach ($finance_list as $index => $row) { ?>
<tr>
<td><?= $index + 1 ?></td>
<td><?php echo $row['client_name']; ?></td>
@ -236,7 +238,7 @@ table.dataTable tbody td {
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("scroll-horizontal-datatable");
// Create custom dropdown
@ -322,39 +324,44 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
// Datatable document ready
$(document).ready(function() {
// Datatable document ready
$(document).ready(function () {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
dom:
"<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
buttons: [
{
extend: 'collection',
text: '<span class="btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary',
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'Policy-Tranction-BDS-List',
text: '<i class="mdi mdi-file-delimited"></i><span class="btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List'
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel"></i><span class="btn-custom"> EXCEL </span>',
title: 'Policy-Tranction-BDS-List',
customize: function(xlsx) {
customize: function (xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
// Find cells in column AB (28th column in Excel)
$('row c[r^="AB"]', sheet).each(function() {
var value = parseFloat($('v', this)
.text()); // Get the value inside the cell
$('row c[r^="AB"]', sheet).each(function () {
var value = parseFloat($('v', this).text());
if (!isNaN(value)) {
total += value;
}
@ -362,34 +369,39 @@ $(document).ready(function() {
// Get the last row index and append the total row
var lastRow = $('row:last', sheet);
var rowIndex = parseInt(lastRow.attr('r')) +
2; // Find the next row index
var totalRow = '<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex +
'"><is><t>Total</t></is></c>' + // Insert "Total" in AA
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
'</v></c>' + // Insert sum in AB
var rowIndex = parseInt(lastRow.attr('r')) + 2;
var totalRow =
'<row r="' + rowIndex + '">' +
'<c t="inlineStr" r="AA' + rowIndex + '"><is><t>Total</t></is></c>' +
'<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) + '</v></c>' +
'</row>';
// Append the new total row to the sheet
$(sheet).find('sheetData').append(totalRow);
}
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
ordering: false,
paging: true,
pageLength: 10,
ordering: false
});
} else {
console.error("Table not found.");
}
});
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
@ -488,7 +500,7 @@ $(function() {
// var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
@ -496,6 +508,128 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: { format: 'DD-MM-YYYY' },
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
.endOf('month')
]
}
});
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
$('#insurer_id').select2();
$('#policy_type_id').select2();
})
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
var end_date = $('#endDate').val();
var client_id = $('#client_id').val();
var insurer_id = $('#insurer_id').val();
var policy_type_id = $('#policy_type_id').val();
var date_type = $('#date_type').val();
var issuer = $('#issuer').val();
console.log(start_date + '-' + end_date);
var queryParams = {
start_date: start_date,
end_date: end_date,
client_id: client_id,
insurer_id: insurer_id,
policy_type_id: policy_type_id,
date_type: date_type,
issuer: issuer,
};
const queryString = objectToQueryString(queryParams);
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const startDate = params.get('start_date') || 0; // Default to 0 if not found
const endDate = params.get('end_date') || 0; // Default to 0 if not found
const client_id = params.get('client_id') || 0; // Default to 0 if not found
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
const date_type = params.get('date_type') || 0; // Default to 0 if not found
const issuer = params.get('issuer') || 0; // Default to 0 if not found
hideDateField(date_type)
console.log('startDate', startDate)
console.log('endDate', endDate)
console.log('client_id', client_id)
console.log('insurer_id', insurer_id)
console.log('policy_type_id', policy_type_id)
console.log('date_type', date_type)
console.log('issuer', issuer)
// Log the values or use them as needed
console.log('Start Date:', startDate);
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).change()
$('#insurer_id').val(insurer_id).change()
$('#policy_type_id').val(policy_type_id).change()
$('#date_type').val(date_type)
$('#issuer').val(issuer)
}, 1000)
}
}
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
// Get start and end dates from URL parameters, or use default values
const startDateParam = params.get('start_date') || moment().subtract(29, 'days').format('DD-MM-YYYY');
const endDateParam = params.get('end_date') || moment().format('DD-MM-YYYY');
// Parse the dates to moment objects
var start = moment(startDateParam, 'DD-MM-YYYY');
var end = moment(endDateParam, 'DD-MM-YYYY');
// var start = moment().subtract(29, 'days');
// var end = moment();
function cb(start, end) {
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -525,9 +659,9 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null) {
function hideDateField(input = null) {
let val = $('#date_type').val();
if (input) {
@ -539,9 +673,9 @@ function hideDateField(input = null) {
} else {
$('#date_div').hide()
}
}
}
function sendPolicyTransactionID(event, pt_id) {
function sendPolicyTransactionID(event, pt_id) {
event.preventDefault(); // Prevent default action
console.log(pt_id);
@ -554,5 +688,5 @@ function sendPolicyTransactionID(event, pt_id) {
const apiURL = $('#get-policy-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
</script>

View File

@ -61,11 +61,14 @@
</style>
<div class="container-fluid">
<div class="container-fluid-min">
<div class="row">
<div class="col-12">
<?php if (isset($hr_access_data) && !empty($hr_access_data)) { ?>
<?php if (isset($hr_access_data) && !empty($hr_access_data)) {
$listed_pre = [];
$listed_post = [];
?>
<form id="insuranceForm" onsubmit="submitForm(event)">
<?php foreach ($hr_access_data as $key => $value) {
@ -79,13 +82,17 @@
<input type="hidden" name="<?= 'user' . $key ?>_pre_hr_id" value="<?= $value['pre_hr_id'] ?>">
<input type="hidden" name="<?= 'user' . $key ?>_post_hr_id" value="<?= $value['post_hr_id'] ?>">
<input type="hidden" name="<?= 'user' . $key ?>_post_client_id" value="<?= $value['post_client_id'] ?>">
<input type="hidden" name="<?= 'user' . $key ?>_pre_branch_id" value="<?= $value['pre_branch_id'] ?>">
<input type="hidden" name="<?= 'user' . $key ?>_post_branch_id" value="<?= $value['post_branch_id'] ?>">
<input type="hidden" name="<?= 'user' . $key ?>_pre_client_id" value="<?= $value['pre_client_id'] ?>">
<div class="card-header" onclick="toggleAccordion(this)" style="background-color: #F5FFFF;">
<div class="user-info">
<h5 class="mb-0"><?= $value['hr_name'] ?>
<h5 class="mb-0"> Name -<?= $value['hr_name'] ?>
<!-- <i class="mdi mdi-information-outline" aria-hidden="true" data-id="<?= (!empty($value['pre_hr_id']) ? $value['pre_hr_id'] : 0) . '-' . (!empty($value['post_hr_id']) ? $value['post_hr_id'] : 0) ?>"></i> -->
</h5>
<p class="user-email"><?= $value['hr_mail'] ?></p>
<p style="color: black;"> <b>branch - <?= $value['post_branch_name']?></b></p>
<p class="user-email"> Mail - <?= $value['hr_mail'] ?></p>
</div>
<div class="accordion-icon">
<i class="mdi mdi-chevron-down"></i>
@ -128,6 +135,15 @@
<?php foreach ($pre_policy_data as $key1 => $policies) {
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
if (
in_array($policies['branch_id'].'-'.$policies['policy_no'], $listed_pre)
&&
$value['pre_branch_id'] != $policies['branch_id']
) {
continue;
} else {
$listed_pre[] = $policies['branch_id'].'-'.$policies['policy_no'];
}
?>
<div class="checkbox-item">
<input type="checkbox" class="policy-checkbox <?= $statusClass ?>" name="<?= 'user' . $key ?>_pre_policies" data-user="<?= $key ?>" data-group="pre" value="<?= $policies['client_policy_id'] ?>"
@ -180,12 +196,26 @@
<?php foreach ($post_policy_data as $key2 => $policies) {
$statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active';
$statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive';
if(
in_array($policies['branch_id'].'-'.$policies['policy_no'] , $listed_post)
&&
$value['post_branch_id'] != $policies['branch_id']
)
{
continue;
}
else
{
$listed_post[] = $policies['branch_id'].'-'.$policies['policy_no'];
}
?>
<div class="checkbox-item">
<input type="checkbox" class="policy-checkbox <?= $statusClass ?>" id="<?= 'user' . $key ?>-gmc2" name="<?= 'user' . $key ?>_active_policies" data-user="<?= $key ?>" data-group="post"
value="<?= $policies['client_policy_id'] ?>" <?php if (in_array($policies['client_policy_id'], $value['allowed_active_policies'])) {
echo 'checked';
} ?>>
&nbsp;&nbsp;
<label for="<?= 'user' . $key ?>-gmc2" style="<?php if ($policies['policy_status'] == 0) {
echo 'color:#ff5757';
} ?>">

View File

@ -44,6 +44,10 @@ table.dataTable tbody td {
box-shadow: 0px 2px 4px 0px #00000024 !important;
}
#hr_activity_history_append_area tbody tr {
background-color: transparent !important;
}
</style>
<!-- <div class="row" style="position: relative;left: 250px;top: 55px;">
@ -60,7 +64,7 @@ table.dataTable tbody td {
</div>
</div> -->
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap flex-grow">
<table data-custom-table-css="second-table" id="scroll-horizontal-datatable" class="table w-100 nowrap flex-grow">
<thead class="bg-light">
<tr>
<th>S. No</th>
@ -93,15 +97,16 @@ $(document).ready(function () {
if (ticketsTable.length) {
var table = ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // search left, buttons right
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-3'i><'col-sm-2'l><'col-sm-7'p>>",
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true,
pageLength: 25,
pageLength: 10,
ordering: false,
buttons: [
{
@ -120,6 +125,17 @@ $(document).ready(function () {
]
});
// run after DataTable is ready
$('.dataTables_filter input').css({
'background': '#F0F0F0',
'border': 'none',
'border-radius': '8px',
'padding-right': '35px'
}).wrap('<div style="position:relative; display:inline-block;"></div>')
.after('<i class="mdi mdi-magnify" ' +
'style="position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#666;"></i>');
// Attach submit handler separately so it works
$(document).on("click", "#submitBtn", function () {
appendHrActivityHistoryHtml(this, true);

View File

@ -10,11 +10,26 @@
<div class="col-xl-12">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
<!-- <h5 class="m-1">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label> -->
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -103,15 +118,15 @@
id="hr_tickets_table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">File name</th>
<th class="font-weight-medium">Client</th>
<th class="font-weight-medium">Client Branch</th>
<th class="font-weight-medium">Policy</th>
<th class="font-weight-medium">Event</th>
<th class="font-weight-medium">User/Time</th>
<th class="font-weight-medium">Status</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">File name&nbsp;</th>
<th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Client Branch&nbsp;</th>
<th class="font-weight-medium">Policy&nbsp;</th>
<th class="font-weight-medium">Event&nbsp;</th>
<th class="font-weight-medium">User/Time&nbsp;</th>
<th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
</tr>
</thead>
@ -341,27 +356,33 @@
// for datatable
$(document).ready(function() {
$('#hr_tickets_table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
"buttons": [{
"extend": 'csv',
"text": 'CSV',
"title": 'Employee-Upload-List',
"className": 'my_class',
"exportOptions": {
"columns": ':not(:last-child)'
},
}],
"initComplete": function(settings, json) {
$('.my_class').css({
"position": "relative",
"left": "79px"
});
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Employee-Upload-List',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
});

View File

@ -10,19 +10,17 @@
</style>
<script>
var client_list = ''; // local variable for storing the client branch list
var branch_list = ''; // local variable for storing the client branch list
var policy_list = ''; // local variable for storing the client policy list
var branch_policy = '';
$(document).ready(function(){
$(document).ready(function() {
getClientAndBranchAndPolicy();
})
//featch client and branch and policy
function getClientAndBranchAndPolicy()
{
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -30,7 +28,7 @@
success: function(res) {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
if (res.status == true) {
client_list = res.client_data;
branch_list = res.branch_data;
@ -40,7 +38,7 @@
appendClients2(res.client_data);
appendClients3(res.client_data);
}else{
} else {
console.log('No data found');
}
@ -51,35 +49,42 @@
}
});
}
</script>
<div class="row" id="client_add" style="position: relative; bottom: 25px;">
<div class="col-12">
<div class="card-body">
<h3>Inception</h3>
<br>
<ul class="nav nav-pills navtab-bg">
<div class="tab-wrapper position-relative">
<ul class="nav nav-pills navtab-bg " id="myTab">
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-1 active-tab" id="general_tab">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2 active-tab " id="general_tab">
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
<span class="d-none d-sm-inline-block dash-tab-font">Data From Client</span>
<span class="d-none d-sm-inline-block ">Data From Client</span>
</a>
</li>
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#KYC-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1" id="kyc_tab">
<a href="#KYC-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="kyc_tab">
<span class="mr-1"><i class="mdi mdi-file"></i></span>
<span class="d-none d-sm-inline-block dash-tab-font">Insurer or TPA Data</span>
<span class="d-none d-sm-inline-block ">Insurer or TPA Data</span>
</a>
</li>
<li class="nav-item d-flex justify-content-center align-items-center">
<a href="#HR-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-1" id="hr_tab">
<a href="#HR-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="hr_tab">
<span class="mr-1"><i class="mdi mdi-file"></i></span>
<span class="d-none d-sm-inline-block dash-tab-font">HR Uploaded Files</span>
<span class="d-none d-sm-inline-block ">HR Uploaded Files</span>
</a>
</li>
<li class="nav-item d-flex justify-content-center align-items-center">
<!-- Right Arrow -->
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<div class="tab-content">
<?php include('employee_upload.php'); ?>
<?php include('insurer_or_tpa_data.php'); ?>

View File

@ -80,19 +80,19 @@
<thead class="">
<tr>
<th>S.NO</th>
<th>Policy Type</th>
<th>Event Type</th>
<th>Upload/Download</th>
<th>Template</th>
<th>Action</th>
<th>S.NO&nbsp;</th>
<th>Policy Type&nbsp;</th>
<th>Event Type&nbsp;</th>
<th>Upload/Download&nbsp;</th>
<th>Template&nbsp;</th>
<th>Action&nbsp;</th>
</tr>
</thead>
<tbody>
<?php if(isset($insurer_templete_list)){ ?>
<?php foreach($insurer_templete_list as $key => $value ){ ?>
<tr>
<td><?= $key+1; ?></td>
<td class="text-center"><?= $key+1; ?></td>
<td><?= $value['policy_type']; ?></td>
<td><?= $events[$value['event_name']]; ?></td>
<td><?= $value['type_name'] == 'import' ? 'Upload' : 'Download'; ?></td>

View File

@ -1,6 +1,5 @@
<style>
.custom-dropdown-menu {
.custom-dropdown-menu {
display: none;
position: absolute;
background-color: #ffffff !important;
@ -10,45 +9,46 @@
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
color: #212529 !important;
text-decoration: none !important;
background-color: transparent !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.btn-color{
.btn-color {
background-color: rgba(52, 174, 178, 1);
color: white;
border:1px solid rgba(52, 174, 178, 1);
}
border: 1px solid rgba(52, 174, 178, 1);
}
.btn-color:hover{
.btn-color:hover {
background-color: rgba(41, 139, 142, 1);
color: white;
border:1px solid rgba(41, 139, 142, 1);
}
border: 1px solid rgba(41, 139, 142, 1);
}
</style>
<div class="row" id="insurer_list">
<div class="container-fluid-min">
<div class="row" id="insurer_list">
<div class="col-12">
<div class="card">
<div class="card-body maincard">
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Insurers</h4>
</div>
</div>
</div> -->
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table">
<thead class="bg-light">
@ -60,33 +60,36 @@
</thead>
<tbody>
<?php if(is_array($insurerList)) {foreach($insurerList as $row){ ?>
<?php if (is_array($insurerList)) {
foreach ($insurerList as $row) { ?>
<tr>
<td><?php echo $row['name']; ?> ( <?php echo $row['short_name']; ?> ) </td>
<td><?php echo $row['type']; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="<?= base_url("master/insurer/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeInsurer(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
<a class="dropdown-item" href="<?= base_url("master/insurer/list/"); ?><?= $row['id']; ?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" data-id="<?= $row['id']; ?>" onclick="removeInsurer(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
</div>
</div>
</td>
</tr>
<?php }}?>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<!-- end row -->
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -172,53 +175,63 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
$(document).ready(function(){
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function() {
window.location.href = "<?= base_url("master/insurer/create"); ?>";
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'InsurerList',
exportOptions: {
columns: ':not(:last-child)'
}
},
{
text: 'ADD',
className: 'btn btn-color',
action: function () {
window.location.href = "<?= base_url("master/insurer/create"); ?>";
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true ,
paging: true,
});
})
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
btnExport.addEventListener("click", () => {
btnExport.addEventListener("click", () => {
const obj = new csvExport(tableElement);
const csvData = obj.exportCsv();
const blob = new Blob([csvData], { type: "text/csv" });
const blob = new Blob([csvData], {
type: "text/csv"
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
@ -228,10 +241,10 @@ btnExport.addEventListener("click", () => {
setTimeout(() => {
URL.revokeObjectURL(url);
}, 500);
});
});
class csvExport {
class csvExport {
constructor(table, header = true) {
this.table = table;
this.rows = Array.from(table.querySelectorAll("tr"));
@ -268,7 +281,7 @@ class csvExport {
data = /[",\n"]/.test(data) ? `"${data}"` : data;
return data;
}
}
}
function removeInsurer(element) {
@ -293,7 +306,7 @@ class csvExport {
contentType: false,
success: function(res) {
// console.log(res.status == true);
if(res){
if (res) {
if (res.status == true) {
toastr.success('Insurer removed successfully', 'success');
location.reload();
@ -302,7 +315,7 @@ class csvExport {
}
}
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -315,6 +328,4 @@ class csvExport {
});
}
</script>

View File

@ -20,7 +20,12 @@
<span class="title-text ">Insurer</span>
</h4>
</div>
<ul class="nav nav-pills navtab-bg">
<div class="tab-wrapper position-relative">
<ul class="nav nav-pills navtab-bg" id="myTab">
<li class="nav-item d-flex justify-content-center align-items-center">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false"
class="nav-link px-3 py-2 active-tab active">
@ -35,7 +40,7 @@
</a>
</li>
<?php if(isset($insurer['id'])){ ?>
<?php if (isset($insurer['id'])) { ?>
<li class="nav-item">
<a href="#template-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="insurer_export_templete">
@ -46,8 +51,13 @@
<?php } ?>
<li class="nav-item d-flex justify-content-center align-items-center">
<!-- Right Arrow -->
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<div class="tab-content">
<?php include('insurer_basic_info.php'); ?>
<?php include('insurer_branch.php'); ?>
@ -60,14 +70,15 @@
<script>
function insurer_branch_contact() {
var check_insurer_id = $('#insurer_General_PrimaryKey');
if(check_insurer_id[0].value == '' || check_insurer_id[0].value == null || check_insurer_id[0].value == 0){
if (check_insurer_id[0].value == '' || check_insurer_id[0].value == null || check_insurer_id[0].value == 0) {
$('#btnBranchAdd').hide();
toastr.warning('First Add the Insurer!', 'warning',{timeOut: 2000});
}else{
toastr.warning('First Add the Insurer!', 'warning', {
timeOut: 2000
});
} else {
// if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
// }
@ -80,5 +91,3 @@
insurer_branch_contact();
});
</script>

View File

@ -10,11 +10,21 @@
<div class="col-xl-12">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<!-- <label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Filters</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label> -->
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -48,7 +58,7 @@
<div class="form-row">
<div class="form-group col-md-4">
<div class="form- group col-md-4">
<label>Insurer/TPA Data<span class="text-danger">*</span></label> <br />
<select name="insurer_or_tpa" class="form-control" id="insurer_or_tpa" required>
<option value="">Select</option>

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,26 @@
<div class="row">
<div class="col-xl-12">
<div class="container-fluid-min">
<div class="col-xl-12" id="outstanding_filter">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
<div class="form-row">
<div class="form-group col-md-4" id="date_div">
<label>Date<span class="text-danger"></span></label>
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp;
<span></span> <i class="mdi mdi-menu-down"></i>
<div class="input-icon">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<input type="hidden" id="startDate" value=<?= $default_start ?>>
<input type="hidden" id="endDate" value=<?= $default_end ?>>
@ -58,11 +62,13 @@
</div>
</div>
</div>
</div>
<div class="card mb-1">
</div>
<div id="report"></div>
</div>
<script>
$(function() {
@ -73,7 +79,7 @@
var end = moment(end, 'DD/MM/YYYY');
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
@ -81,6 +87,9 @@
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -96,11 +105,11 @@
});
</script>
<script>
$('#category').on('click', function(){
$('#category').on('click', function() {
var choosed_option = $('#category').val();
$("#report_type").val('0');
if (choosed_option == 'life' ){
if (choosed_option == 'life') {
$("#report_type option[value='insurer']").show();
$("#report_type option[value='bap']").hide();
$("#report_type option[value='bapClient']").hide();
@ -138,11 +147,11 @@
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
}else{
} else {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
let message = response.message;
toastr.error(message,'ERROR');
toastr.error(message, 'ERROR');
}

View File

@ -205,24 +205,37 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-CLIENT-List',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'IRDA-BAP-CLIENT-List',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional)

View File

@ -238,14 +238,75 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'IRDA-BAP-INSURER-List',
// },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'IRDA-BAP-INSURER-List',
// customize: function(xlsx) {
// var sheet = xlsx.xl.worksheets['sheet1.xml'];
// var total = 0;
// // Find cells in column AB (28th column in Excel)
// $('row c[r^="AB"]', sheet).each(function() {
// var value = parseFloat($('v', this)
// .text()); // Get the value inside the cell
// if (!isNaN(value)) {
// total += value;
// }
// });
// // Get the last row index and append the total row
// var lastRow = $('row:last', sheet);
// var rowIndex = parseInt(lastRow.attr('r')) +
// 2; // Find the next row index
// var totalRow = '<row r="' + rowIndex + '">' +
// '<c t="inlineStr" r="AA' + rowIndex +
// '"><is><t>Total</t></is></c>' + // Insert "Total" in AA
// '<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
// '</v></c>' + // Insert sum in AB
// '</row>';
// // Append the new total row to the sheet
// $(sheet).find('sheetData').append(totalRow);
// },
// exportOptions: {
// orthogonal: 'sort'
// },
// customizeData: function(data) {
// for (var i = 0; i < data.body.length; i++) {
// for (var j = 0; j < data.body[i].length; j++) {
// // Check if the column is the 9th index (10th column)
// if (j === 9) {
// data.body[i][j] = '\u200C' + data.body[i][j];
// }
// }
// }
// }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-INSURER-List',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-INSURER-List',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
@ -289,11 +350,16 @@ $(document).ready(function() {
}
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 20, // Set default number of rows per page (optional)

View File

@ -78,15 +78,76 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'IRDA-BAP-CLIENT-List',
// },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'IRDA-BAP-CLIENT-List',
// customize: function(xlsx) {
// var sheet = xlsx.xl.worksheets['sheet1.xml'];
// var total = 0;
// // Find cells in column AB (28th column in Excel)
// $('row c[r^="AB"]', sheet).each(function() {
// var value = parseFloat($('v', this)
// .text()); // Get the value inside the cell
// if (!isNaN(value)) {
// total += value;
// }
// });
// // Get the last row index and append the total row
// var lastRow = $('row:last', sheet);
// var rowIndex = parseInt(lastRow.attr('r')) +
// 2; // Find the next row index
// var totalRow = '<row r="' + rowIndex + '">' +
// '<c t="inlineStr" r="AA' + rowIndex +
// '"><is><t>Total</t></is></c>' + // Insert "Total" in AA
// '<c t="n" r="AB' + rowIndex + '"><v>' + total.toFixed(2) +
// '</v></c>' + // Insert sum in AB
// '</row>';
// // Append the new total row to the sheet
// $(sheet).find('sheetData').append(totalRow);
// },
// exportOptions: {
// orthogonal: 'sort'
// },
// customizeData: function(data) {
// for (var i = 0; i < data.body.length; i++) {
// for (var j = 0; j < data.body[i].length; j++) {
// // Check if the column is the 9th index (10th column)
// if (j === 9) {
// data.body[i][j] = '\u200C' + data.body[i][j];
// }
// }
// }
// }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'IRDA-BAP-CLIENT-List',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'IRDA-BAP-CLIENT-List',
className: 'app-btn-primary ',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
var total = 0;
@ -129,11 +190,16 @@ $(document).ready(function() {
}
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -44,11 +44,11 @@
<div class="col-12">
<div class="card">
<div class="card-body maincard">
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">KYC</h4>
</div>
</div>
</div> -->
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table">
<thead class="bg-light">
@ -175,31 +175,44 @@
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
window.location.href = "<?= base_url("master/kyc/create"); ?>";
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'KYCList',
exportOptions: {
columns: ':not(:last-child)'
}
},
{
text: 'ADD',
className: 'btn btn-color',
action: function () {
window.location.href = "<?= base_url("master/kyc/create"); ?>";
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true ,
});

View File

@ -1,8 +1,8 @@
<style>
body {
.multiselect-native-select {
body {
.multiselect-native-select {
position: relative;
/* bottom: 32px; */
select {
border: 0 !important;
@ -16,18 +16,17 @@ body {
left: 50%;
top: 30px;
}
}
}
.multiselect-container{
.multiselect-container {
width: 100% !important;
}
}
.multiselect-selected-text{
.multiselect-selected-text {
float: left !important;
}
}
}
}
</style>
<div class="row" id="insurer_add">
@ -50,7 +49,11 @@ body {
<a href="<?= base_url("master/kyc/list"); ?>" ><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i> </a>
</div>
</div> -->
<ul class="nav nav-pills navtab-bg">
<div class="tab-wrapper position-relative">
<ul class="nav nav-pills navtab-bg" id="myTab">
<li class="nav-item d-flex justify-content-center align-items-center">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false"
class="nav-link px-3 py-2 active-tab active">
@ -64,7 +67,13 @@ body {
<span class="d-none d-sm-inline-block">KYC Docs</span>
</a>
</li>
<li class="nav-item d-flex justify-content-center align-items-center">
<!-- Right Arrow -->
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<div class="tab-content">
<?php include('kyc_entity_type_basic_info.php'); ?>
<?php include('kyc_docs.php'); ?>
@ -81,10 +90,12 @@ body {
var check_policy_type_id = $('#kyc_General_PrimaryKey');
console.log(check_policy_type_id.val());
if(check_policy_type_id[0].value == '' || check_policy_type_id[0].value == null || check_policy_type_id[0].value == 0){
if (check_policy_type_id[0].value == '' || check_policy_type_id[0].value == null || check_policy_type_id[0].value == 0) {
$('#btnBranchAdd').hide();
toastr.warning('First Add the KYC Entity Type!', 'warning',{timeOut: 2000});
}else{
toastr.warning('First Add the KYC Entity Type!', 'warning', {
timeOut: 2000
});
} else {
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}

View File

@ -4,11 +4,16 @@
<?php include(__DIR__ . '/../ticket_type_modal.php'); ?>
</div>
<!-- Footer Start -->
<div style="display: block;">
<footer class="footer">
<div class="container-fluid">
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
<!-- Footer Start -->
<div style="background-color: white !important;">
<footer class="footer" style="background-color: white !important;">
<div class="">
<div class="row">
<div class="col-md-6">
<script>
@ -26,14 +31,7 @@
</div>
</footer>
</div>
<!-- end Footer -->
</div>
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
<!-- end Footer -->
</div>
@ -157,8 +155,43 @@
"closeButton": true,
};
</script>
<script>
$(document).ready(function() {
var pageName = "<?= esc($page_name ?? '') ?>";
var titleHtml = (pageName && pageName !== "Dashboard") ?
`<h3 style="margin-right:5px !important;">${pageName}</h3>` :
" ";
if (pageName && pageName == "Dashboard") {
titleHtml = `<h6 style="margin-right:5px !important;">Welcome <?= esc(get_session_userdata()->first_name ?? 'NOT SET') ?></h6>
<h3>Dashboard</h3>`;
}
$(".top-navbar-title").html(titleHtml);
$('#collapseOne').on('show.bs.collapse', function() {
// When open
$('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up');
// $('#filterAccordion').removeAttr("style"); // remove bg/border when open
});
$('#collapseOne').on('hide.bs.collapse', function() {
// When closed
$('#icon').removeClass('mdi-chevron-up').addClass('mdi-chevron-down');
// $('#filterAccordion').css({
// "background-color": "#F5FFFF",
// "border": "2px solid #F5FFFF",
// "border-radius": "10px",
// "box-shadow": "0px 4px 4px 0px #00000040"
// });
});
});
</script>
<script>
var pullNotificationCount = 0;
var pendingActionCount = 0;
@ -175,7 +208,7 @@
// console.log('responce', response)
if(response.status == false){
if (response.status == false) {
$('#notification_count').html('0')
console.log('The session is not set correctly. ')
return;
@ -332,8 +365,7 @@
// console.log(response[key].length)
// console.log('type', typeof response[key].length)
// console.log('key', response[key])
if(response[key].length != 'undefined' && response[key].length != undefined)
{
if (response[key].length != 'undefined' && response[key].length != undefined) {
pendingActionCount = pendingActionCount + response[key].length;
}
}
@ -476,7 +508,7 @@
}
});
}else{
} else {
console.log('response.correction is undefined or null');
}
@ -554,7 +586,7 @@
}
});
}else{
} else {
console.log('response.deletion is undefined or null');
}
@ -630,7 +662,7 @@
}
});
}else{
} else {
console.log('response.si_enhancement is undefined or null');
}
@ -704,7 +736,7 @@
}
});
}else{
} else {
console.log('response.tpa is undefined or null');
}
@ -778,7 +810,7 @@
}
});
}else{
} else {
console.log('response.uhid is undefined or null');
}
localStorage.setItem('pendingActionCount', pendingActionCount)
@ -826,9 +858,7 @@
<script>
function formatDate(dateString)
{
function formatDate(dateString) {
// Parse the input date string
let date = new Date(dateString);
@ -856,8 +886,7 @@
return formattedDate;
}
function printCurrentTime()
{
function printCurrentTime() {
var now = new Date();
var hours = now.getHours().toString().padStart(2, '0');
var minutes = now.getMinutes().toString().padStart(2, '0');
@ -867,12 +896,10 @@
return currentTime;
}
</script>
<script>
function checkDuplicateTableFieldValue(tableName, fieldName, value, callback) {
function checkDuplicateTableFieldValue(tableName, fieldName, value, callback) {
$.ajax({
url: '<?= base_url('util/checkDuplicateTableFieldValue') ?>', // Adjust this to your endpoint in CodeIgniter
type: 'POST',
@ -891,9 +918,9 @@ function checkDuplicateTableFieldValue(tableName, fieldName, value, callback) {
console.error('AJAX Error:', error);
}
});
}
}
function sendAjaxRequestForGlobal(url, method, data = {}, successCallback = null, errorCallback = null) {
function sendAjaxRequestForGlobal(url, method, data = {}, successCallback = null, errorCallback = null) {
$.ajax({
url: url,
method: method,
@ -914,9 +941,9 @@ function sendAjaxRequestForGlobal(url, method, data = {}, successCallback = null
}
}
});
}
}
function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes, Proceed!", cancelText = "Cancel", icon = "warning") {
function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes, Proceed!", cancelText = "Cancel", icon = "warning") {
return Swal.fire({
title: message,
icon: icon,
@ -928,9 +955,7 @@ function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes,
}).then((result) => {
return result.isConfirmed; // Returns true if confirmed, false otherwise
});
}
}
</script>
<script>
@ -958,9 +983,9 @@ function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes,
const params = dashboardHistory.tile_params;
if (functionName && typeof window[functionName] === 'function') {
if(params.majorType == 0 && params.minorType == 0){
if (params.majorType == 0 && params.minorType == 0) {
window[functionName]();
}else{
} else {
window[functionName](params.majorType, params.minorType);
}
@ -978,22 +1003,113 @@ function confirmActionSweertAlert(message = "Are you sure?", confirmText = "Yes,
// slight delay ensures DOM/tab loads completely
setTimeout(restoreDashboardHistoryIfNeeded, 100);
});
</script>
<script>
$(document).ready(function() {
$('.img-inactive').on('click', function() {
const activeItem = localStorage.getItem("activeLi");
if (activeItem) {
$('.li-seperate a').removeClass('img-active').addClass('img-inactive');
$('#' + activeItem).children('a').first().removeClass('img-inactive').addClass('img-active');
}
$('.img-c').addClass('img-inactive');
$(this).removeClass('.img-inactive');
$(this).addClass('.img-active');
$('.li-seperate').on('click', function() {
// reset all anchors
$('.li-seperate a').removeClass('img-active').addClass('img-inactive');
// only the immediate <a> inside this <li>
$(this).children('a').first().removeClass('img-inactive').addClass('img-active');
localStorage.setItem("activeLi", $(this).attr("id"));
});
});
</script>
<script>
$(document).ready(function(){
$(document).ready(function() {
$('.nav-link').click(function() {
// change bg color of tab
$('.nav-link').removeClass('active-tab');
$(this).addClass('active-tab');
});
});
$(document).ready(function() {
// find all nav anchors
let $nav = $("ul.nav.nav-pills.navtab-bg");
// check if no anchor has active classes
if ($nav.find("a.active.active-tab").length === 0) {
// add classes to the first anchor
$nav.find("li:first-child a").addClass("active active-tab");
// also need to find the tab name and show only active image
let tab_name = $nav.find("li:first-child a").attr('href').split('-')[0];
tab_name = tab_name.replace('#', '');
switch (tab_name) {
case "leads":
$('.active_leads').show();
$('.inactive_leads').hide();
break;
case "bds":
$('.active_bds').show();
$('.inactive_bds').hide();
break;
case "claims":
$('.active_claims').show();
$('.inactive_claims').hide();
break;
case "pending":
$('.active_pending').show();
$('.inactive_pending').hide();
break;
default:
break;
}
}
});
$(function(){
let $nav = $("#myTab");
$(".left-btn").on("click", function(){
$nav.stop().animate({ scrollLeft: $nav.scrollLeft() - 150 }, 200);
});
$(".right-btn").on("click", function(){
$nav.stop().animate({ scrollLeft: $nav.scrollLeft() + 150 }, 200);
});
});
// function openModal(modalId) {
// console.log('openModal called with ID:', modalId);
// var modalEl = document.getElementById(modalId);
// if (typeof bootstrap !== "undefined" && bootstrap.Modal && typeof bootstrap.Modal.getOrCreateInstance === "function") {
// // ✅ Bootstrap 5
// var modal = bootstrap.Modal.getOrCreateInstance(modalEl);
// modal.show();
// } else if (typeof $ !== "undefined" && typeof $.fn.modal === "function") {
// // ✅ Bootstrap 4
// $('#' + modalId).modal('show');
// } else {
// console.error("No compatible Bootstrap modal found.");
// }
// }
</script>
<script>
$(document).ready(function(){
$('.nav-link').click(function(){
// change bg color of tab
@ -1003,22 +1119,29 @@ $(document).ready(function(){
});
});
});
</script>
function openModal(modalId) {
var modalEl = document.getElementById(modalId);
<script>
function closeModalById(modalId) {
// Get the modal element
var modal = document.getElementById(modalId);
if (!modal) return; // Exit if no modal found
if (typeof bootstrap !== "undefined" && bootstrap.Modal) {
// Bootstrap 5
var modal = bootstrap.Modal.getOrCreateInstance(modalEl);
modal.show();
} else if (typeof $ !== "undefined" && typeof $.fn.modal === "function") {
// Bootstrap 4
$('#' + modalId).modal('show');
} else {
console.error("No compatible Bootstrap modal found.");
// Hide it by removing "show" or "in" classes and setting display:none
modal.style.display = 'none';
modal.classList.remove('in', 'show'); // 'in' for BS3, 'show' for BS4/5
modal.setAttribute('aria-hidden', 'true');
modal.removeAttribute('aria-modal'); // optional
modal.removeAttribute('role'); // optional
// Remove backdrop if present
var backdrop = document.querySelector('.modal-backdrop');
if (backdrop) backdrop.remove();
// Allow page scrolling again
document.body.classList.remove('modal-open');
}
}
</script>
@ -1026,4 +1149,3 @@ function openModal(modalId) {
</body>
</html>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<title><?= isset($page_name) ? $page_name : 'NHance'; ?></title>
<title><?= isset($tab_name) ? $tab_name : 'NHance'; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="" name="description" />
<meta content="NHANCE" name="NHANCE" />
@ -129,31 +129,51 @@
}
.container-fluid {
padding: 0px 20px 0px 20px !important;
}
.container-fluid-top {
padding: 0px 40px 0px 40px !important;
}
body[data-sidebar-size=condensed]:not([data-layout=compact]):not(.auth-fluid-pages)
{
body[data-sidebar-size=condensed]:not([data-layout=compact]):not(.auth-fluid-pages) {
min-height: 100vh !important;
}
body .content-page {
margin-top: 90px !important;
}
</style>
<!-- navbar -->
<style>
.nav-bar {
position: fixed !important;
z-index: 2;
width: 90%;
margin-left: 120px !important;
background: #fff;
}
.top-navbar-div {
display: flex;
flex-flow: row;
flex-shrink: 1 !important;
justify-content: space-between;
margin-top: 20px;
margin-left: 15px;
}
.ul-flex {
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-content: space-evenly;
flex-shrink: 1;
}
.top-navbar-div {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
margin-top: 20px;
}
.nav-flex {
display: flex;
@ -165,6 +185,60 @@
}
</style>
<!-- tab-switch -->
<style>
.nav-pills,
.nav-link {
background-color: #F5FFFF !important;
color: #00999E !important;
border-radius: 10px;
}
.nav-pills {
background-color: #F5FFFF !important;
color: #00999E !important;
box-shadow: 0px 2px 4px 0px #00000040;
padding-top: 5px;
}
.nav-pills.nav-dash {
background-color: white !important;
box-shadow: none !important;
}
.nav-pills .nav-dash {
background-color: #D4F5F6 !important;
border-radius: 10px;
color: black !important;
}
.nav-link.active-tab {
color: white !important;
background-color: #00999E !important;
font-size: small !important;
padding: 8px 16px;
border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000040;
}
.nav-link-btn {
color: white !important;
background-color: #00999E !important;
font-size: small !important;
padding: 8px 16px;
border-radius: 10px !important;
}
.navtab-bg .nav-link {
margin: 5px !important;
}
</style>
<!-- sidebar -->
<style>
#side-menu .menu-logo a:hover {
@ -187,8 +261,47 @@
border-radius: 25px;
background-color: #D4F5F6;
z-index: 700;
padding: 0px !important;
padding: 0 !important;
height: 90% !important;
display: flex;
flex-flow: column wrap;
}
/* every <li> inside should be allowed to shrink */
.left-side-menu li {
flex-shrink: 1 !important;
min-height: 0 !important;
/* prevents flex bugs */
}
.left-side-menu ul li:hover>ul {
position: relative;
z-index: 99999 !important;
}
.img-inactive {
background-color: white;
margin: 0px 12px;
border-radius: 5px;
border: 1px solid white;
padding: 8px !important;
min-height: 43px !important;
}
.li-seperate {
margin: 10px 0px;
}
.img-active {
background-color: #B7F0F2;
margin: 0px 12px;
border-radius: 5px;
border: 2px solid #00999E;
padding: 8px !important;
min-height: 43px !important;
}
</style>
@ -228,36 +341,6 @@
font-weight: 600 !important;
}
.nav-link {
color: black !important;
background-color: #D4F5F6 !important;
font-size: small !important;
padding: 8px;
border-radius: 10px !important;
padding: 8px 16px;
}
.nav-link-btn {
color: white !important;
background-color: #00999E !important;
font-size: small !important;
padding: 8px 16px;
border-radius: 10px !important;
}
.nav-link.active-tab {
color: white !important;
background-color: #00999E !important;
font-size: small !important;
padding: 8px 16px;
border-radius: 10px !important;
}
.navtab-bg .nav-link {
margin: 0 5px 10px !important;
}
.navbar-custom {
@ -336,18 +419,7 @@
/* end of loaders */
</style>
<!-- parsley-examples section starts -->
<style>
/* .parsley-examples
{
background-color: #F5FFFF;
padding: 25px;
border: 2px solid #F5FFFF;
border-radius: 10px;
box-shadow: 0px 1px 1px 0px #00000040;
}
*/
</style>
<!-- ticket list specific code -->
<style>
@ -386,49 +458,29 @@
font-size: 12px;
}
.title-text {
font-weight: 500;
font-style: normal;
font-size: 30px;
line-height: 1;
letter-spacing: 0;
color: black;
.secondary-title {
margin-left: 26px;
display: flex;
align-items: center;
}
.sub-title-text {
font-weight: 500;
font-style: normal;
font-size: 18px;
line-height: 1;
letter-spacing: 0;
color: black;
.secondary-title i {
font-size: 43px;
}
.secondary-title span {
position: relative;
}
.font-color-black {
color: black;
}
.app-text-left {
text-align: left !important;
}
.app-text-right {
text-align: right !important;
}
.app-text-center {
text-align: center !important;
}
.app-text-white {
color: #ffffff !important;
}
.app-text-black {
color: #000000 !important;
}
.app-text-grey {
color: #5D5D5D !important;
}
@ -672,30 +724,10 @@
}
</style>
<!-- img active inactive -->
<style>
.img-inactive {
background-color: white;
margin: 10px 12px;
border-radius: 5px;
border: 4px solid white;
padding: 8px !important;
min-height: 43px !important;
}
.img-active {
background-color: #B7F0F2;
margin: 10px 12px;
border-radius: 5px;
border: 4px solid #00999E;
padding: 8px !important;
min-height: 43px !important;
}
</style>
<!-- table section starts -->
<style>
table[data-custom-table-css="table"] thead th {
table[data-custom-table-css="table"] thead th,
table[data-custom-table-css="second-table"] thead th {
background-color: #00999E;
color: #fff !important;
border-top: 0px solid #fff !important;
@ -713,31 +745,37 @@
font-weight: 400 !important;
}
table[data-custom-table-css="table"] thead th:first-child {
table[data-custom-table-css="table"] thead th:first-child,
table[data-custom-table-css="second-table"] thead th:first-child {
border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important;
}
table[data-custom-table-css="table"] thead th:last-child {
table[data-custom-table-css="table"] thead th:last-child,
table[data-custom-table-css="second-table"] thead th:last-child {
border-top-right-radius: 15px !important;
border-bottom-right-radius: 15px !important;
}
table[data-custom-table-css="table"] tbody tr td:first-child {
table[data-custom-table-css="table"] tbody tr td:first-child,
table[data-custom-table-css="second-table"] tbody tr td:first-child {
border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important;
}
table[data-custom-table-css="table"] tbody tr td:last-child {
table[data-custom-table-css="table"] tbody tr td:last-child,
table[data-custom-table-css="second-table"] tbody tr td:last-child {
border-top-right-radius: 15px !important;
border-bottom-right-radius: 15px !important;
}
table[data-custom-table-css="table"] tbody tr:hover td {
table[data-custom-table-css="table"] tbody tr:hover td,
table[data-custom-table-css="second-table"] tbody tr:hover td {
background-color: #e0e0e0;
}
table[data-custom-table-css="table"] {
table[data-custom-table-css="table"],
table[data-custom-table-css="second-table"] {
border-collapse: separate !important;
border-spacing: 0 8px !important;
width: 100% !important;
@ -746,6 +784,20 @@
table[data-custom-table-css="table"].dataTable thead th {
padding: 15px !important;
}
table[data-custom-table-css="table"] thead.bg-light {
background-color: transparent !important;
}
/* ========== SECOND TABLE (white rows) ========== */
table[data-custom-table-css="second-table"] tbody td {
background: #FFFFFF !important;
padding: 12px;
border-top: 0px solid #fff !important;
border-bottom: 2px solid #F0F0F0 !important;
font-weight: 400 !important;
}
</style>
<!-- Datatable section starts -->
@ -824,6 +876,87 @@
.buttons-html5 {
margin-right: 10px !important;
}
.dataTables_scrollBody thead.bg-light tr,
.dataTables_scrollBody thead tr {
visibility: collapse !important;
/* hides + removes row space */
height: 0 !important;
}
.dataTables_scrollBody thead.bg-light th {
padding: 0 !important;
margin: 0 !important;
border: none !important;
height: 0 !important;
line-height: 0 !important;
overflow: hidden !important;
}
/* Wrapper around the search input */
.datatable-search-wrapper {
position: relative;
display: inline-block;
width: 100%;
}
/* The search input itself */
.dataTables_filter input {
background: #F0F0F0 !important;
color: #707070 !important;
font-weight: 400 !important;
box-shadow: 0px 2px 4px 0px #00000024 !important;
border-color: #F0F0F0 !important;
margin-left: 1px !important;
}
/* Placeholder styling */
.dataTables_filter input::placeholder {
color: #707070 !important;
font-weight: 400 !important;
}
/* The magnify icon */
.datatable-search-icon {
position: absolute !important;
right: 12px !important;
top: 50% !important;
transform: translateY(-50%) !important;
color: #707070 !important;
font-size: 18px !important;
pointer-events: none;
/* prevents blocking typing */
}
.datatable-search {
margin-right: auto;
}
.datatable-buttons {
margin-left: auto;
}
/* Fix DataTables buttons alignment inside card-body */
.card-body .card-body .dt-buttons,
.card-body .card-body .datatable-buttons {
margin-right: 0 !important;
padding-right: 2.25rem !important;
/* match card-body padding */
}
/* Applies only to tables with data-custom-table-css="table" */
table[data-custom-table-css="table"] tbody tr td {
padding: 8px 10px !important;
/* spacing */
line-height: 20px;
/* consistent spacing for text */
min-height: 40px;
/* makes sense here if you use display:block */
vertical-align: middle;
/* aligns text properly */
}
</style>
@ -981,10 +1114,84 @@
<!-- jodit section -->
<style>
/********************************************************************* jodit section starts ***********************************************************************************************************/
/* ✅ Whole editor box */
.jodit {
border-radius: 10px;
box-shadow: 0px 2px 2px 0px #00000040;
overflow: hidden;
background-color: #F5FFFF !important;
/* fallback */
}
.jodit-wysiwyg {
color: black;
/* ✅ Toolbar (header) */
.jodit .jodit-toolbar__box,
.jodit .jodit-toolbar-editor-collection {
background-color: #F5FFFF !important;
border: none !important;
}
/* ✅ Footer / status bar */
.jodit .jodit-status-bar {
background-color: #F5FFFF !important;
border-top: 1px solid #ddd;
/* optional: keep a light separator */
}
/* ✅ Editable content (div mode) */
.jodit .jodit-wysiwyg {
background-color: #F5FFFF !important;
color: black !important;
padding: 10px;
}
/* ✅ Editable content (iframe mode) */
.jodit iframe {
background-color: #F5FFFF !important;
border-radius: 0 0 10px 10px;
}
</style>
<!-- jodit section inside modal -->
<style>
/* ✅ Whole editor box */
.modal .jodit {
border-radius: 10px;
box-shadow: 0px 2px 2px 0px #00000040;
overflow: hidden;
background-color: #ECECEC !important;
/* fallback */
}
.modal .jodit p {
background-color: #ECECEC !important;
/* fallback */
}
/* ✅ Toolbar (header) */
.modal .jodit .jodit-toolbar__box,
.modal .jodit .jodit-toolbar-editor-collection {
background-color: #ECECEC !important;
border: none !important;
}
/* ✅ Footer / status bar */
.modal .jodit .jodit-status-bar {
background-color: #ECECEC !important;
border-top: 1px solid #ddd;
/* optional: keep a light separator */
}
/* ✅ Editable content (div mode) */
.modal .jodit .jodit-wysiwyg {
background-color: #ECECEC !important;
color: black !important;
padding: 10px;
}
/* ✅ Editable content (iframe mode) */
.modal .jodit iframe {
background-color: #ECECEC !important;
border-radius: 0 0 10px 10px;
}
</style>
@ -1023,6 +1230,10 @@
border-color: #F5FFFF !important;
}
.select2 textarea {
box-shadow: none !important;
}
/* Chrome, Edge, Safari */
@ -1044,10 +1255,14 @@
/* Cancel Bootstrap's .form-control for file inputs */
input[type="file"].form-control {
height: auto !important; /* remove forced height */
padding: initial !important; /* reset padding */
font-size: inherit !important; /* reset font size */
line-height: normal !important; /* reset line height */
height: auto !important;
/* remove forced height */
padding: initial !important;
/* reset padding */
font-size: inherit !important;
/* reset font size */
line-height: normal !important;
/* reset line height */
}
@ -1084,7 +1299,8 @@
button[type="submit"],
.buttons-collection,
input[type="submit"],
#get-emp-list {
#get-emp-list,
.submit-btn {
color: #fff !important;
background-color: #E26728 !important;
border-color: #E26728 !important;
@ -1098,13 +1314,22 @@
cursor: pointer;
/* optional */
}
.cancel-btn,
.modal-footer .cancel-btn {
color: #000000 !important;
background-color: #ffffff !important;
border-color: #E26728 !important;
}
</style>
<!-- accordian -->
<style>
.card #collapseOne .card-body,
#collapseOne .card-body,
.card #collapseTwo .card-body,
.card #collapseThree .card-body {
.card #collapseThree .card-body,
.card #collapseFour .card-body {
background-color: #F5FFFF !important;
border: 2px solid #F5FFFF;
border-radius: 10px;
@ -1122,7 +1347,11 @@
.card #collapseThree .card-body input,
.card #collapseThree .card-body select,
.card #collapseThree .card-body textarea {
.card #collapseThree .card-body textarea,
.card #collapseFour .card-body input,
.card #collapseFour .card-body select,
.card #collapseFour .card-body textarea {
background-color: #ffff !important;
border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important;
@ -1131,7 +1360,8 @@
.card #collapseOne .card-body input[type='file'],
.card #collapseTwo .card-body input[type='file'],
.card #collapseThree .card-body input[type='file'] {
.card #collapseThree .card-body input[type='file'],
.card #collapseFour .card-body input[type='file'] {
padding: 10px !important;
background-color: white !important;
color: black !important;
@ -1140,7 +1370,8 @@
/* Apply to Select2 (single select) */
.card #collapseOne .card-body .select2-container .select2-selection--single,
.card #collapseTwo .card-body .select2-container .select2-selection--single,
.card #collapseThree .card-body .select2-container .select2-selection--single {
.card #collapseThree .card-body .select2-container .select2-selection--single,
.card #collapseFour .card-body .select2-container .select2-selection--single {
background-color: #ffff !important;
border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important;
@ -1154,7 +1385,8 @@
/* Apply to Select2 (multiple select) */
.card #collapseOne .card-body .select2-container .select2-selection--multiple,
.card #collapseTwo .card-body .select2-container .select2-selection--multiple,
.card #collapseThree .card-body .select2-container .select2-selection--multiple {
.card #collapseThree .card-body .select2-container .select2-selection--multiple,
.card #collapseFour .card-body .select2-container .select2-selection--multiple {
background-color: #ffff !important;
border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important;
@ -1195,7 +1427,6 @@
.fixed-header {
position: relative;
top: 0;
z-index: 1000;
background-color: #f8f9fa !important;
}
@ -1267,7 +1498,6 @@
</style>
<style>
.custom-form .parsley-examples {
background-color: transparent !important;
@ -1327,6 +1557,7 @@
text-align: center;
}
</style>
<style>
/* Common wrapper (works for text/file inputs) */
.input-icon {
@ -1372,6 +1603,67 @@
}
</style>
<!-- tab swich scrollable -->
<style>
.tab-wrapper {
display: flex;
align-items: center;
position: relative;
}
/* Make the UL a scrollable flex row */
#myTab {
display: flex;
white-space: nowrap;
flex-wrap: nowrap;
/* prevent wrapping */
overflow-x: auto;
/* enable horizontal scroll */
overflow-y: hidden;
white-space: nowrap;
/* keep items on one line */
margin: 0;
padding: 0 40px;
/* leave space for arrows */
flex-grow: 1;
}
/* Hide scrollbars */
#myTab::-webkit-scrollbar {
display: none;
}
#myTab {
-ms-overflow-style: none;
scrollbar-width: none;
}
.scroll-btn {
background-color: #F4FFFF;
height: 55px;
border: none;
cursor: pointer;
font-size: 18px;
padding: 5px 10px;
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 1;
color: #00999E;
}
.left-btn {
left: 0;
}
.right-btn {
right: 0;
}
</style>
</head>
<body class="loading" data-layout-mode="" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "sidebar": { "color": "light", "size": "condensed", "showuser": false}, "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": false}'></body>
@ -1392,7 +1684,7 @@
<div class="left-side-menu">
<div class="h-100" data-simplebar>
<div data-simplebar>
<!--- Sidemenu -->
<div id="sidebar-menu">
@ -1400,23 +1692,23 @@
<li class="menu-logo">
<a href="<?= base_url('/dashboard/view') ?>">
<img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.png" alt="Logo" height="24">
<img src="<?= base_url() . "public"; ?>/assets/images/Nhance_Favi.png" alt="Logo">
</a>
</li>
<li>
<a href="<?= base_url('/dashboard/view') ?>" class="img-inactive-not-working">
<li class="li-seperate" id="dashboard-li">
<a href="<?= base_url('/dashboard/view') ?>" class="img-inactive">
<i class="ri-dashboard-line" style="color:black;"></i>
<span> Dashboard </span>
<span style="color: #02a8b5;"> Dashboard </span>
</a>
</li>
<!-- client -->
<?php if (in_array(get_role_id(), [1, 2, 3, 5])) { ?>
<li>
<a href="<?= base_url('/client/list') ?>" class="img-inactive-not-working">
<li class="li-seperate" id="clients-li">
<a href="<?= base_url('/client/list') ?>" class="img-inactive">
<img style="border-radius: 5px;"
src="<?= base_url() . "public"; ?>/assets/images/clients_sb.png" alt="Logo" height="24">
<span> Clients </span>
@ -1426,9 +1718,9 @@
<!-- Enrollment process -->
<?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(ENROLLMENT_TEAM_ID, user_team())) { ?>
<li>
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect img-inactive-not-working" >
<?php if (in_array(get_role_id(), [1, 2, 3, 5]) || in_array(ENROLLMENT_TEAM_ID, user_team())) { ?>
<li class="li-seperate" id="action-on-policies-li">
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect img-inactive">
<img style="border-radius: 5px;"
src="<?= base_url() . "public"; ?>/assets/images/action_on_policies_sb.png" alt="Logo" height="20">
<span> Action on Policies </span>
@ -1462,8 +1754,8 @@
<!-- Masters -->
<?php if (get_role_id() == 1 || get_role_id() == 5 || get_role_id() == 4) { ?>
<li>
<a href="#sidebarDashboards" data-toggle="collapse" class=" img-inactive-not-working">
<li class="li-seperate" id="masters-li">
<a href="#sidebarPolicies" data-toggle="collapse" class=" img-inactive">
<img
src="<?= base_url() . "public"; ?>/assets/images/masters_sb.png" alt="Logo" height="20">
<span> Masters </span>
@ -1526,8 +1818,8 @@
<!-- Claims -->
<?php if (in_array(get_role_id(), [1, 2, 3, 5]) || in_array(CLAIMS_TEAM_ID, user_team())) { ?>
<li>
<a href="#sidebarDashboardsTicket" data-toggle="collapse" class="waves-effect img-inactive-not-working">
<li class="li-seperate" id="claims-li">
<a href="#sidebarDashboardsTicket" data-toggle="collapse" class="waves-effect img-inactive">
<img
src="<?= base_url() . "public"; ?>/assets/images/claims_sb.png" alt="Logo" height="20">
<span> Claims </span>
@ -1562,8 +1854,8 @@
<!-- leads -->
<?php if (in_array(get_role_id(), [1, 2, 3, 5]) || in_array(BUSINESS_SUPPORT_TEAM_ID, user_team()) || in_array(SALES_TEAM_ID, user_team())) { ?>
<li>
<a href="<?= base_url('/leads/list') ?>" class="img-inactive-not-working">
<li class="li-seperate" id="leads-li">
<a href="<?= base_url('/leads/list') ?>" class="img-inactive">
<img
src="<?= base_url() . "public"; ?>/assets/images/leads_sb.png" alt="Logo" height="20">
<span> Leads </span>
@ -1572,8 +1864,8 @@
<?php } ?>
<!-- Tickets -->
<?php if (in_array(get_role_id(), [1, 2, 3, 4, 5]) || in_array(CLAIMS_TEAM_ID, user_team())) { ?>
<li>
<a id="tickets" href="<?= base_url('/ticketList?return_type=web') ?>" class="waves-effect img-inactive-not-working">
<li class="li-seperate" id="tickets-li">
<a id="tickets" href="<?= base_url('/ticketList?return_type=web') ?>" class="waves-effect img-inactive">
<img src="<?= base_url() . "public"; ?>/assets/images/ticket.png" alt="Logo" height="20">
<span>Tickets</span>
</a>
@ -1581,8 +1873,8 @@
<?php } ?>
<!-- BDS -->
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
<li>
<a href="#policyTransactions" data-toggle="collapse" class="waves-effect img-inactive-not-working">
<li class="li-seperate" id="policy-transactions-li">
<a href="#policyTransactions" data-toggle="collapse" class="waves-effect img-inactive">
<img
src="<?= base_url() . "public"; ?>/assets/images/policy_transactions_sb.png" alt="Logo" height="20">
<span> Policy Transactions </span>
@ -1730,11 +2022,11 @@
<!-- Ad -->
<?php if (in_array(get_role_id(), [1, 2, 3, 5])) { ?>
<li>
<a id="app_content_management" href="#sidebarDashboardsmenu" data-toggle="collapse" class="waves-effect img-inactive-not-working" style="color: grey;">
<li class="li-seperate" id="app-content-mng-li">
<a id="app_content_management" href="#sidebarDashboardsmenu" data-toggle="collapse" class="waves-effect img-inactive" style="color: grey;">
<img
src="<?= base_url() . "public"; ?>/assets/images/app_content_mng_sb.png" alt="Logo" height="20">
<span>App Content Mgmt</span>
<span style="color: #02a8b5;">App Content Mgmt</span>
</a>
<div class="collapse" id="sidebarDashboardsmenu">
<ul class="nav-second-level">
@ -1748,8 +2040,8 @@
</div>
</li>
<?php } ?>
<li>
<a id="user_manual" href="<?= base_url("autobookstackLogin") ?>" class="waves-effect img-inactive-not-working" target="_blank" rel="noopener noreferrer">
<li class="li-seperate" id="user-manual-li">
<a id="user_manual" href="<?= base_url("autobookstackLogin") ?>" class="waves-effect img-inactive" target="_blank" rel="noopener noreferrer">
<img
src="<?= base_url() . "public"; ?>/assets/images/user_manual_sb.png" alt="Logo" height="20">
<span>User Manual</span>
@ -1764,12 +2056,10 @@
</div>
<!-- Left Sidebar End -->
<!-- Top Bar -->
<div class="top-navbar-div" style="margin-left:130px;">
<div>
<!-- ========== Top Bar Start ========== -->
<div class="nav-bar">
<div class="top-navbar-div">
<div class="top-navbar-title">
<h5>Welcome <?= (isset(get_session_userdata()->first_name) ? get_session_userdata()->first_name : 'NOT SET') ?> </h5>
</div>
<div class="nav-flex">
@ -1813,9 +2103,13 @@
</div>
</div>
</div>
</div>
<!-- End of Top Bar -->
<br>
<!-- <br> -->
<!-- ============================================================== -->
@ -1826,4 +2120,4 @@
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<div class="container-fluid-top">

View File

@ -1,27 +1,23 @@
<style>
.col-12 {
.col-12 {
max-width: 98% !important;
}
}
</style>
<div class="row" id="lead_filter_div">
<div class="container-fluid-min">
<div class="row" id="lead_filter_div">
<div class="col-12" style="margin-top: -12px;">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<div class="row">
<div class="col-md-6" style="position: relative;left: 17px;">
<h4 style="text-align: left; margin-left:30px;">Lead Filter</h4>
</div>
<div class="col-md-6">
<a style="text-align: right;" id="toggleIcon" class="text-dark float-right"
data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary"
style="font-size: 28px;"></i>
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</div>
</div>
</h5>
</h4>
<div id="collapseOne" class="collapse hide" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
@ -131,27 +127,31 @@
</div>
</div>
</div>
</div>
<!-- end page title -->
<div id="lead_list_div">
<?php include('leads_list.php'); ?>
</div>
</div>
<!-- end page title -->
<div id="lead_list_div">
<?php include('leads_list.php'); ?>
</div>
<script>
var filter_client_list = [];
var filter_branch_list = [];
var filter_client_list = [];
var filter_branch_list = [];
$(document).ready(function() {
$(document).ready(function() {
$('#filter_client_id').select2();
$('#filter_client_branch_id').select2();
$('#filter_policy_type').select2();
getfilterClientAndBranch()
});
});
$(document).ready(function() {
$(document).ready(function() {
$('#filter_client_id').change(function() {
let client_id = $(this).val();
@ -162,11 +162,11 @@ $(document).ready(function() {
}
})
});
});
//----- AJAX FUNCTIONS --------------------------------------------------------------------------------
//----- AJAX FUNCTIONS --------------------------------------------------------------------------------
function fetchTicketListData() {
function fetchTicketListData() {
var issuer_type = $('#filter_issuer_type').val();
var lead_type = $('#filter_lead_type').val();
@ -204,7 +204,7 @@ function fetchTicketListData() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
setTimeout(function(){
setTimeout(function() {
additionalDropdown();
}, 1000);
@ -224,10 +224,10 @@ function fetchTicketListData() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
}
}
//function for fetch client, branch
function getfilterClientAndBranch() {
//function for fetch client, branch
function getfilterClientAndBranch() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -249,12 +249,12 @@ function getfilterClientAndBranch() {
console.error(status, error);
}
});
}
}
//----- END AJAX FUNCTIONS --------------------------------------------------------------------------------
//----- END AJAX FUNCTIONS --------------------------------------------------------------------------------
function appendfilterClients(data) {
function appendfilterClients(data) {
$('#filter_client_id').empty();
@ -272,9 +272,9 @@ function appendfilterClients(data) {
$('#filter_client_id').append(option);
});
}
}
function appendfilterBranch(data) {
function appendfilterBranch(data) {
$('#filter_client_branch_id').empty();
@ -291,11 +291,11 @@ function appendfilterBranch(data) {
});
$('#filter_client_branch_id').append(option);
});
}
}
// -----------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------
function additionalDropdown() {
function additionalDropdown() {
const table = document.getElementById("tickets-table");
if (!table) return; // Prevent errors if the table is not found
let activeDropdown = null;
@ -320,7 +320,7 @@ function additionalDropdown() {
// Preserve click handlers and add auto-close
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
item.addEventListener('click', function (e) {
item.addEventListener('click', function(e) {
const onclickAttr = this.getAttribute('onclick');
if (onclickAttr) eval(onclickAttr);
@ -350,7 +350,7 @@ function additionalDropdown() {
// Add click event listener to rows
table.querySelectorAll("tbody tr").forEach(row => {
row.addEventListener("click", function (event) {
row.addEventListener("click", function(event) {
if (!event.target.closest('td:last-child')) {
handleDropdownClick(row, event);
}
@ -358,12 +358,11 @@ function additionalDropdown() {
});
// Close dropdown when clicking outside
document.addEventListener("click", function () {
document.addEventListener("click", function() {
if (activeDropdown) {
activeDropdown.style.display = 'none';
activeDropdown = null;
}
});
}
}
</script>

View File

@ -193,7 +193,7 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
<div class="row d-flex align-items-center">
<div class="status_tile" style="padding-left: 25px;">
<a href="#" onclick="hide_and_show_tile('2')" ><b><i class="mdi mdi-chevron-left mdi-36px"></i></b> </a>
<a href="#" onclick="hide_and_show_tile('2')" ><b><i class="mdi mdi-chevron-left mdi-36px chevron-left-dash"></i></b> </a>
</div>
<div class="status_tile" style="padding-left: 15px;">
<a href="#" id="main_tile">Current Tile : </a>

View File

@ -34,6 +34,10 @@
color: white !important;
margin-right: 5px;
}
hr {
display: none !important;
}
</style>
<style>
@ -58,7 +62,8 @@
border-radius: 6px;
position: absolute;
z-index: 999;
bottom: 125%; /* Show above icon */
bottom: 125%;
/* Show above icon */
left: 50%;
transform: translateX(-50%);
font-size: 12px;
@ -69,7 +74,8 @@
.info-tooltip::after {
content: "";
position: absolute;
top: 100%; /* Arrow below tooltip */
top: 100%;
/* Arrow below tooltip */
left: 50%;
margin-left: -5px;
border-width: 5px;
@ -81,33 +87,56 @@
visibility: visible;
opacity: 1;
}
/* dont forgot it keep it safe card and card body space remover */
/* bcoz in design */
.card-body {
margin-top: 0px !important;
}
/* this css as per design so not declare in golbal */
/* bcoz in design */
#collapseOne {
border: 1px solid #BFF3F5 !important;
border-radius: 10px !important;
border-width: 1px !important;
}
</style>
<div class="row" id="leads_form">
<div class="container-fluid-min">
<div class="row" id="leads_form">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<!-- <div class="col-6" style="align-self: center;">
<h4 id="page_title" style="position: relative;">Add Lead</h4>
</div>
<div class="col-3" style="text-align: right; position: relative; left: 211px;">
<!-- <button class="btn btn-primary waves-effect waves-light" onclick="fileupload(this)">file upload</button> -->
<!-- <button class="btn btn-primary waves-effect waves-light" onclick="fileupload(this)">file upload</button> ->
</div>
<div class="col-1" style="text-align: right; position: relative; left: 193px;">
<a href="<?= base_url('leads/list') ?>" type="button" id="btnAdd"
class="btn btn-primary waves-effect waves-light">Back</a>
</div>
</div> -->
<h4 class="d-flex align-items-center" style="gap: 8px;">
<a href="<?= base_url('leads/list') ?>" style="cursor: pointer;">
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
</a>
<span class="title-text" id="page_title" style="position: relative;">Add Lead</span>
</h4>
</div>
<form role="form" class="parsley-examples" method="post" id="leads_form_id"
enctype="multipart/form-data">
<input type="hidden" name="id" id="leads_primarykey">
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="lead_type">Lead Type<span class="text-danger">*</span></label>
<select class="form-control" id="lead_type" name="lead_type" required>
<option value="">Select Lead Type</option>
@ -125,7 +154,7 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="issuer">Issuer<span class="text-danger">*</span></label>
<select class="form-control" id="issuer" name="issuer" required>
<option value="">Select Issuer</option>
@ -140,29 +169,36 @@
</div>
</div>
</div>
</div>
<hr>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- client row -->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3 freshFields">
<label class="switch" style="position: relative;top: 33px;left: 0px;">
<div class="form-group offset-md-10 col-md-2 freshFields" style="float:right;">
<label class="switch">
<input id="exixting_client" type="checkbox" name="exixting_client">
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="exixting_client" style="position: relative;top: 39px;left: 20px;">Existing Client</label>
<label for="exixting_client" style="position: relative;top: 2px;">Existing Client</label>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
</div>
<div class="form-row">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="client_id">Client<span class="text-danger">*</span></label>
<select class="form-control" id="client_id" name="client_id">
<option value="">Select Client</option>
</select>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="client_branch_id">Branch<span class="text-danger">*</span></label>
<select class="form-control" id="client_branch_id" name="client_branch_id"
onchange="getBranchData(this,1)">
@ -184,7 +220,7 @@
</select>
</div> -->
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="entity_type_id">Entity Type<span class="text-danger">*</span></label>
<select class="form-control" id="entity_type_id" name="entity_type_id" required>
<option value="" selected>Select Entity</option>
@ -198,13 +234,13 @@
</select>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="client_name">Client Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="client_name" name="client_name"
placeholder="Enter Client Name" required>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="client_short_name">Client Short Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="client_short_name" name="client_short_name"
placeholder="Enter Client Short Name" onkeyup="validateInput(this, 'clients', 'short_name')" required>
@ -236,14 +272,18 @@
</div> -->
</div>
</div>
</div>
<!-- end client row -->
<hr>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- branch row-->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="gst">GST<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="gst" placeholder="Enter GST Number"
data-parsley-error-message="Invalid GST Number. Example: 12ABCDE1234F5Z6" name="gst"
@ -251,39 +291,39 @@
data-parsley-pattern="^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="client_branch">Branch Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="branch_name" name="branch_name"
placeholder="Enter Branch Name" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="client_branch">Branch Code<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="branch_code" name="branch_code"
placeholder="Enter Branch Code" required>
</div>
<div class="form-group col-md-3 renewalFields">
<div class="form-group col-md-4 renewalFields">
<label for="contact_person_summary">Contact Person</label>
<select class="form-control" name="contact_person_summary" id="contact_person_summary">
<option value="">Select a Contact</option>
</select>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="client_branch">Contact Person Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="contact_person_name" name="contact_person_name"
placeholder="Enter Contact Name" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="contact_person_mobile">Contact Person Mobile<span
class="text-danger">*</span></label>
<input type="text" class="form-control" id="contact_person_mobile"
name="contact_person_mobile" placeholder="Enter Contact Mobile" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="contact_person_email">Contact Person Email<span
class="text-danger">*</span></label>
<input type="text" class="form-control" id="contact_person_email"
@ -291,16 +331,34 @@
</div>
</div>
</div>
</div>
<!-- policy row -->
<div class="card" id="collapseOne">
<div class="card-body">
<div id="dynamic-form-container"></div>
<hr>
</div>
</div>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- other row -->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group offset-md-9 col-md-3" style="float:right;">
<label class="switch">
<input id="is_insurer_auto_mail" type="checkbox" name="is_insurer_auto_mail">
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="is_insurer_auto_mail" style="position: relative;top: 2px;">Insurer Auto Mail</label>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="salse_person_id">Sales Person<span class="text-danger">*</span></label>
<select class="form-control" id="salse_person_id" name="salse_person_id" multiple required>
<option value="">Select Sales Person</option>
@ -314,7 +372,7 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="status"> Status <span id="base_danger" class="text-danger">*</span></label>
<select class="form-control" id="lead_status" name="status" required>
<option value="" selected>Select Status</option>
@ -332,41 +390,39 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="">Next Reminder Date<span class="text-danger"></span></label>
<div class="input-icon">
<input type="text" class="form-control" id="next_reminder_date" name="next_reminder_date" placeholder="DD/MM/YYYY">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<div class="form-group col-md-3">
<label class="switch" style="position: relative;top: 33px;left: 0px;">
<input id="is_insurer_auto_mail" type="checkbox" name="is_insurer_auto_mail">
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="is_insurer_auto_mail" style="position: relative;top: 35px;left: 20px;">Insurer Auto Mail</label>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label for="notes">Remarks</label>
<textarea class="form-control" id="notes" name="notes" rows="4"></textarea>
</div>
</div>
</div>
</div>
<div class="form-group text-right m-b-0" id="submitButton">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="lead_form_submit_btn" >Submit</button>
id="lead_form_submit_btn">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div><!-- end form row -->
</div><!-- end form row -->
<?php include("newClientModal.php") ?>
</div>
<?php include("newClientModal.php") ?>
<script>
@ -452,7 +508,7 @@
// }
}
});
}else if (lead_type == 3) {
} else if (lead_type == 3) {
if ($('#client_id option[value="add_client"]').length === 0) {
$('#client_id').prepend($('<option>', {
@ -461,24 +517,24 @@
}));
}
$("#source_policy_id").removeAttr("required");
$("#source_policy_id").closest("div") .find("label .text-danger").remove();
$("#source_policy_id").closest("div").find("label .text-danger").remove();
$("#source_policy_id").hide();
$('#source_policy_id').closest('.form-group').hide();
$("#source_policy_start_date").removeAttr("required");
$("#source_policy_start_date").closest("div") .find("label .text-danger").remove();
$("#source_policy_start_date").closest("div").find("label .text-danger").remove();
$("#source_policy_start_date").hide();
$('#source_policy_start_date').closest('.form-group').hide();
$("#source_policy_end_date").removeAttr("required");
$("#source_policy_end_date").closest("div") .find("label .text-danger").remove();
$("#source_policy_end_date").closest("div").find("label .text-danger").remove();
$("#source_policy_end_date").hide();
$('#source_policy_end_date').closest('.form-group').hide();
} else if (lead_type != 3) {
$("#source_policy_id").prop("required",true);
$("#source_policy_id").prop("required", true);
$("#source_policy_start_date").prop("required", true);
$("#source_policy_end_date").prop("required", true);
@ -491,13 +547,13 @@
$('#source_policy_end_date').closest('.form-group').find('label').show();
// Check if the asterisk doesn't already exist, then add it
let $label = $("#source_policy_id").closest("div") .find("label");
let $label = $("#source_policy_id").closest("div").find("label");
if ($label.find(".text-danger").length === 0) {
$label.append(' <span class="text-danger">*</span>');
}
let $label2 = $("#source_policy_start_date").closest("div") .find("label");
let $label2 = $("#source_policy_start_date").closest("div").find("label");
if ($label2.find(".text-danger").length === 0) {
$label2.append(' <span class="text-danger">*</span>');
@ -516,7 +572,7 @@
}
if(lead_type != 1){
if (lead_type != 1) {
dataIncrement = 1;
// updateRenewalFields(dataIncrement);
@ -653,7 +709,7 @@
let lead_type = $('#lead_type').val();
var policyStartDate = $("#source_policy_start_date");
if(lead_type == 3){
if (lead_type == 3) {
policyStartDate = $("#policy_start_date");
}
console.log('Selected Dates:', selectedDates);
@ -754,7 +810,7 @@
//client branch data
function getBranchData(input, inputType) {
if (inputType == 1 ) {
if (inputType == 1) {
var client_branch_id = $(input).val();
} else {
client_branch_id = input;
@ -977,7 +1033,7 @@
console.log(response.message, 'SUCCESS');
$('#appendArea_' + dataIncrement).append(response.data);
console.log("Policy Type ID : ",policy_type_id);
console.log("Policy Type ID : ", policy_type_id);
if (policy_type_id == 1 || policy_type_id == 6 || policy_type_id == 7) {
let newId = 'appendAreaForClaim_' + dataIncrement;
@ -1005,7 +1061,7 @@
$('.lifeClaimFields').show();
} else {
if(lead_type == 1){
if (lead_type == 1) {
updateRenewalFields(dataIncrement);
}
@ -1023,7 +1079,7 @@
console.log('Extracted increment:', increment);
var policyStartDate = $("#source_policy_start_date");
if(lead_type == 3){
if (lead_type == 3) {
policyStartDate = $("#policy_start_date");
}
@ -1073,31 +1129,32 @@
const newRow = document.createElement('div');
newRow.className = 'form-row dynamic-form-row';
if (increment > 1) {
const hrElement = document.createElement('hr');
container.appendChild(hrElement);
}
// Main div
newRow.innerHTML += `
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="source_policy_id"> Source Policy <span id="base_danger"
class="text-danger">*</span></label>
class="text-danger">* </span></label>
<select class="form-control" id="source_policy_id" name="source_policy_id">
<option value="" selected>Select Source Policy</option>
</select>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="source_policy_start_date">Source Policy Start Date<span class="text-danger"></span></label>
<input type="text" class="form-control readonly-select" id="source_policy_start_date" name="source_policy_start_date" readonly>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="source_policy_end_date">Source Policy End Date<span class="text-danger"></span></label>
<input type="text" class="form-control" id="source_policy_end_date" name="source_policy_end_date" readonly>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="policy_type_id">Policy Type <span class="text-danger">*</span></label>
<select class="form-control" id="policy_type_id_${increment}" name="policy_type_id[]" onchange="getCustomFields(this, ${increment})" required>
<option value="">Select Policy Type</option>
@ -1113,7 +1170,7 @@
</select>
</div>
<div class="form-group col-md-3 proposed_div">
<div class="form-group col-md-4 proposed_div">
<label for="insurer">Insurer <span class="text-danger"></span></label>
<select class="form-control" id="insurer_${increment}" name="insurer[]" onchange="insurerChange(this, ${increment})">
<option value="">Select Insurer</option>
@ -1127,7 +1184,7 @@
</select>
</div>
<div class="form-group col-md-3 proposed_div">
<div class="form-group col-md-4 proposed_div">
<label for="tpa">TPA <span class="text-danger"></span></label>
<select class="form-control" id="tpa_${increment}" name="tpa[]" onchange="tpaChange(this, ${increment})">
<option value="">Select TPA</option>
@ -1141,19 +1198,31 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="">Date of Commencement <span class="text-danger"></span></label>
<div class="input-icon">
<input type="text" class="form-control policy_start_date" id="policy_start_date_${increment}" name="policy_start_date[]" placeholder="Enter DOC" onchange="calculatePolicyMetrics(this)">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<div class="form-group col-md-3">
<label for="">Date of Expiry <span class="text-danger"></span></label>
<input type="text" class="form-control policy_end_date" id="policy_end_date_${increment}" name="policy_end_date[]" placeholder="Enter DOE">
</div>
<div class="form-group col-md-4">
<label for="">Date of Expiry <span class="text-danger"></span></label>
<div class="input-icon">
<input type="text" class="form-control policy_end_date" id="policy_end_date_${increment}" name="policy_end_date[]" placeholder="Enter DOE">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
</div>
<div id="appendArea_${increment}" class = "form-group col-md-12 appendArea"></div>
<div class="card" style="width:100%; background-color: transparent;">
<div class="card-body" style="background-color: #fff !important; border: 0px !important;">
<div id="multiFileAppendArea_${increment}"></div>
</div>
</div>
<div class="form-group col-md-12 btnDiv" style="position: relative;top: 28px;float: right;text-align: end;">
<a class="btn btn-danger waves-effect waves-light" onclick="removeHTMLInput(this)">x</a>
@ -1398,7 +1467,7 @@
console.log('Lead Type:', lead_type);
let increment = input.id.split('_').pop(); // Extract increment
if(lead_type == 1){
if (lead_type == 1) {
return;
}
@ -1416,9 +1485,9 @@
policyStartDateInput = $('#source_policy_start_date');
console.log('Using Source Policy Start Date:', sourcePolicyDateVal);
} else if (policyStartDateVal) {
if(input_id == "policy_start_date_1"){
if (input_id == "policy_start_date_1") {
policyStartDateInput = $('#policy_start_date_1');
}else{
} else {
policyStartDateInput = $('#policy_start_date');
}
console.log('Using Policy Start Date:', policyStartDateVal);
@ -1471,9 +1540,9 @@
let premium_as_on_date = Number($('#premium_date').val()) || 0;
console.log('Premium as on Date:', premium_as_on_date);
let incurred_claim_ratio = (incurred_claims > 0 && premium_as_on_date > 0)
? (incurred_claims / premium_as_on_date) * 100
: 0;
let incurred_claim_ratio = (incurred_claims > 0 && premium_as_on_date > 0) ?
(incurred_claims / premium_as_on_date) * 100 :
0;
let incurred_claim_ratio_roundoff = isFinite(incurred_claim_ratio) ? incurred_claim_ratio.toFixed(2) : 0;
console.log('Incurred Claim Ratio:', incurred_claim_ratio);
console.log('Incurred Claim Ratio (Rounded):', incurred_claim_ratio_roundoff);
@ -1708,7 +1777,7 @@
flatpickr("#" + incurred_claim_date_id, {
dateFormat: "d/m/Y",
allowInput: false,
onChange: function (selectedDates) {
onChange: function(selectedDates) {
try {
let increment = this.input.id.split('_').pop();
let policyStartDate = $("#source_policy_start_date");
@ -1993,7 +2062,7 @@
$('#source_policy_start_date').closest('.form-group').show();
$('#source_policy_end_date').closest('.form-group').show();
}else{
} else {
$('#source_policy_id').hide();
$('#source_policy_start_date').hide();
@ -2064,7 +2133,7 @@
});
}
$('#exixting_client').change(function () {
$('#exixting_client').change(function() {
$('#contact_person_summary').empty();
$('#contact_person_summary').append($('<option>', {
@ -2142,6 +2211,4 @@
//-----------------------------------------------------------------------------------------------------------
</script>

View File

@ -476,7 +476,7 @@ if (isset($selected_lead_type)) {
// --------------------------------------------------------------------------------------------------------
function addFileField(increment) {
function addFileFieldold(increment) {
console.log('addFileField function called');
@ -521,6 +521,80 @@ if (isset($selected_lead_type)) {
fileIndex++;
}
function addFileField(increment) {
console.log('addFileField function called');
const container = document.getElementById(`multiFileAppendArea_${increment}`);
if (!container) return;
// Remove previous "+" buttons if any
// const prevAddBtns = container.querySelectorAll('.add-file-btn');
// prevAddBtns.forEach(btn => btn.remove());
const div = document.createElement("div");
div.className = "form-row d-flex align-items-end";
div.setAttribute("id", `fileField_${fileIndex}`);
let isFirstField = container.childElementCount === 0; // Check if it's the first field
let placeholder = isFirstField ? 'First file must be Demography.' : '';
let accept = isFirstField ? '.xls,.xlsx' : '';
if(selected_lead_form_type != 1){
placeholder = '';
accept = '';
}
let sample_dwn_btn = "";
if(selected_lead_form_type == 1 && isFirstField == 1){
sample_dwn_btn = `<button type="button"
class="btn app-btn-secondary float-end"
id="excel_download"
data-toggle="tooltip"
data-placement="top"
title="Download Sample Excel"
onclick="window.location.href='<?= base_url("util/download-excel/member_data"); ?>'">
Sample Excel
</button>`;
}
let add_btn = `<button type="button" class="btn app-btn-secondary mr-1 add-file-btn" onclick="addFileField(${increment})">+</button>`;
div.innerHTML = `
<div class="form-group row" id="fileField_${fileIndex}" style="width: 100%;">
<div class="col-auto" style="align-content: center;">
<label class="col-form-label">Document Name</label>
</div>
<div class="col-md-3">
<input type="text" class="form-control" name="docs_name_${increment}[]" placeholder="${placeholder}" style="background: #F5FFFF !important;">
</div>
<div class="col-auto" style="align-content: center;">
<label>File Upload </label>
</div>
<div class="col-md-3">
<div class="input-icon">
<input type="file" class="form-control" id="file_name_${fileIndex}" name="file_name_${increment}[]" accept="${accept}" style="background: #F5FFFF !important;">
<i class="mdi mdi-upload additional-icon"></i>
</div>
</div>
<div class="col-auto">
<button type="button" class="btn btn-danger mr-1" onclick="removeFileField(${fileIndex})"><span class="mdi mdi-trash-can"></span></button>
${add_btn}
${sample_dwn_btn}
</div>
</div>`;
container.appendChild(div);
fileIndex++;
}
function removeFileField(index, lead_file_id = null) {
if(index == 1){

View File

@ -160,23 +160,23 @@ table.dataTable tbody td {
</div>
<div>
<div class="table-responsive">
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th><div class="column-header">S.No.</div></th>
<th><div class="column-header">Lead Type</div></th>
<th><div class="column-header">Issuer</div></th>
<th><div class="column-header">Client Type</div></th>
<th><div class="column-header">Client / Branch</div></th>
<th><div class="column-header">Entity Type</div></th>
<th><div class="column-header">Branch Name</div></th>
<th><div class="column-header">Branch Code</div></th>
<th><div class="column-header">Contact Person Name</div></th>
<th><div class="column-header">Contact Person Mobile</div></th>
<th><div class="column-header">Policy Type</div></th>
<th><div class="column-header">Status</div></th>
<th><div class="column-header">Action</div></th>
<th><div class="column-header">S.No&nbsp;</div></th>
<th><div class="column-header">Lead Type &nbsp;</div></th>
<th><div class="column-header">Issuer &nbsp;</div></th>
<th><div class="column-header">Client Type &nbsp;</div></th>
<th><div class="column-header">Client / Branch &nbsp;</div></th>
<th><div class="column-header">Entity Type &nbsp;</div></th>
<th><div class="column-header">Branch Name &nbsp;</div></th>
<th><div class="column-header">Branch Code &nbsp;</div></th>
<th><div class="column-header">Contact Person Name &nbsp;</div></th>
<th><div class="column-header">Contact Person Mobile &nbsp;</div></th>
<th><div class="column-header">Policy Type &nbsp;</div></th>
<th><div class="column-header">Status &nbsp;</div></th>
<th><div class="column-header">Action &nbsp;</div></th>
</tr>
</thead>
@ -184,7 +184,7 @@ table.dataTable tbody td {
<?php if(isset($lead_data_list)) { ?>
<?php foreach($lead_data_list as $index => $row){ ?>
<tr>
<td><?php echo $index + 1; ?></td>
<td class="text-center"><?php echo $index + 1; ?></td>
<td><?php echo $lead_type[$row['lead_type']] ?? '-'; ?></td>
<td><?php echo $issuer[$row['issuer']] ?? '-'; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td>
@ -215,7 +215,7 @@ table.dataTable tbody td {
</a>
<?php } ?>
<?php } ?>
<a class="dropdown-item btnHistory app-text-black"
<a class="dropdown-item btnHistory font-color-black"
data-id="<?= $row['id']; ?>"
title="Click to view Mail History">
<i class="mdi mdi-history mr-2 text-muted font-18 vertical-middle"></i>Email History
@ -244,7 +244,7 @@ table.dataTable tbody td {
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myCenterModalLabel">Select Leaad Type</h4>
<h4 class="modal-title" id="myCenterModalLabel">Select Lead Type</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
@ -420,29 +420,41 @@ document.addEventListener("DOMContentLoaded", function () {
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
text: 'Add',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
openLeadTypeAskModal();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Policy-Tranction-Inception-List',
className: 'app-btn-primary ',
exportOptions: {
columns: ':not(:last-child)'
},
},
{
text: 'Add',
className: 'buttons-html5 addbtnStyle',
action: function (e, dt, node, config) {
openLeadTypeAskModal();
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
pageLength: 10, // Set default number of rows per page (optional)
// ordering: false,
});
} else {
@ -501,14 +513,14 @@ document.addEventListener("DOMContentLoaded", function () {
<thead class="bg-light">
<tr>
<th><div class="column-header">S.No.</div></th>
<th><div class="column-header">From Mail</div></th>
<th><div class="column-header">To Mail</div></th>
<th><div class="column-header">BCC</div></th>
<th><div class="column-header">CC</div></th>
<th><div class="column-header">Type</div></th>
<th><div class="column-header">Status</div></th>
<th><div class="column-header">Date/Time</div></th>
<th><div class="column-header">S.No&nbsp;</div></th>
<th><div class="column-header">From Mail&nbsp;</div></th>
<th><div class="column-header">To Mail&nbsp;</div></th>
<th><div class="column-header">BCC&nbsp;</div></th>
<th><div class="column-header">CC&nbsp;</div></th>
<th><div class="column-header">Type&nbsp;</div></th>
<th><div class="column-header">Status&nbsp;</div></th>
<th><div class="column-header">Date/Time&nbsp;</div></th>
</tr>
</thead>
<tbody>

View File

@ -36,6 +36,16 @@
color: white !important;
margin-right: 5px;
}
/* dont forgot it keep it safe card and card body space remover */ /* bcoz in design */
.card-body{ margin-top: 0px !important; }
/* this css as per design so not declare in golbal */ /* bcoz in design */
#collapseOne{
border: 1px solid #BFF3F5 !important;
border-radius: 10px !important;
border-width: 1px !important;
}
</style>
@ -45,13 +55,19 @@
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<!-- <div class="col-6" style="align-self: center;">
<h4 id="page_title" style="position: relative;">Add Lead</h4>
</div>
<div class="col-6" style="text-align: right; position: relative;">
<a href="<?= base_url('leads/list') ?>" type="button" id="btnAdd"
class="btn btn-primary waves-effect waves-light">Back</a>
</div>
</div> -->
<h4 class="d-flex align-items-center" style="gap: 8px;">
<a href="<?= base_url('leads/list') ?>" style="cursor: pointer;" type="button" id="btnAdd">
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
</a>
<span class="title-text" id="page_title" style="position: relative;">Add Lead</span>
</h4>
</div>
<form role="form" class="parsley-examples" method="post" id="leads_non_eb_form_id"
enctype="multipart/form-data">
@ -59,9 +75,11 @@
<input type="hidden" name="id" id="leads_primarykey">
<input type="hidden" name="lead_form_type" id="lead_form_type_id" value="2">
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="lead_type">Lead Type<span class="text-danger">*</span></label>
<select class="form-control" id="lead_type" name="lead_type" required>
<option value="">Select Lead Type</option>
@ -79,7 +97,7 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="issuer">Issuer<span class="text-danger">*</span></label>
<select class="form-control" id="issuer" name="issuer" required>
<option value="">Select Issuer</option>
@ -94,29 +112,36 @@
</div>
</div>
</div>
</div>
<hr>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- client row -->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3 freshFields">
<label class="switch" style="position: relative;top: 33px;left: 0px;">
<div class="form-group offset-md-10 col-md-2 freshFields" style="float:right;">
<label class="switch">
<input id="exixting_client" type="checkbox" name="exixting_client">
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="exixting_client" style="position: relative;top: 39px;left: 20px;">Existing Client</label>
<label for="exixting_client" style="position: relative;top: 2px;">Existing Client</label>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
</div>
<div class="form-row">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="client_id">Client<span class="text-danger">*</span></label>
<select class="form-control" id="client_id" name="client_id">
<option value="">Select Client</option>
</select>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="client_branch_id">Branch<span class="text-danger">*</span></label>
<select class="form-control" id="client_branch_id" name="client_branch_id"
onchange="getBranchData(this,1)">
@ -124,7 +149,7 @@
</select>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="client_type">Client Type<span class="text-danger">*</span></label>
<select class="form-control" id="client_type" name="client_type" required>
<option value="">Select Client type</option>
@ -138,7 +163,7 @@
</select>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="entity_type_id">Entity Type<span class="text-danger">*</span></label>
<select class="form-control" id="entity_type_id" name="entity_type_id" required>
<option value="" selected>Select Entity</option>
@ -152,19 +177,19 @@
</select>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="client_name">Client Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="client_name" name="client_name"
placeholder="Enter Client Name" required>
</div>
<div class="form-group col-md-3 freshFields">
<div class="form-group col-md-4 freshFields">
<label for="client_short_name">Client Short Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="client_short_name" name="client_short_name"
placeholder="Enter Client Short Name" onkeyup="validateInput(this, 'clients', 'short_name')" required>
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="source_policy_id"> Source Policy <span id="base_danger"
class="text-danger">*</span></label>
<select class="form-control" id="source_policy_id" name="source_policy_id" onchange="getPolicyData(this)">
@ -172,7 +197,7 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="pan">PAN<span class="text-danger"></span></label>
<input type="text" class="form-control" id="pan" placeholder="Enter PAN Number"
data-parsley-error-message="Invalid PAN Number. Example: ABCDE1234F" name="pan"
@ -180,14 +205,17 @@
</div>
</div>
</div>
</div>
<!-- end client row -->
<hr>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- branch row-->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="gst">GST<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="gst" placeholder="Enter GST Number"
data-parsley-error-message="Invalid GST Number. Example: 12ABCDE1234F5Z6" name="gst"
@ -195,19 +223,19 @@
data-parsley-pattern="^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="client_branch">Branch Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="branch_name" name="branch_name"
placeholder="Enter Branch Name" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="client_branch">Branch Code<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="branch_code" name="branch_code"
placeholder="Enter Branch Code" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="contact_person_summary">Contact Person's</label>
<select class="form-control" name="contact_person_summary" id="contact_person_summary">
<option value="">Select a Person</option>
@ -215,20 +243,20 @@
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="client_branch">Contact Person Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="contact_person_name" name="contact_person_name"
placeholder="Enter Contact Name" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="contact_person_mobile">Contact Person Mobile<span
class="text-danger">*</span></label>
<input type="text" class="form-control" id="contact_person_mobile"
name="contact_person_mobile" placeholder="Enter Contact Mobile" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="contact_person_email">Contact Person Email<span
class="text-danger">*</span></label>
<input type="text" class="form-control" id="contact_person_email"
@ -236,13 +264,17 @@
</div>
</div>
</div>
</div>
<hr>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- policy row -->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row" id="dynamic-form-container">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="policy_type_id">Policy Type <span class="text-danger">*</span></label>
<select class="form-control" id="policy_type_id" name="policy_type_id"
onchange="getPolicyTypeFields(this)" required>
@ -259,7 +291,7 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="insurer">Insurer <span class="text-danger"></span></label>
<select class="form-control" id="insurer" name="insurer">
<option value="">Select Insurer</option>
@ -293,32 +325,48 @@
</select>
</div> -->
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="">Date of Commencement <span class="text-danger">*</span></label>
<div class="input-icon">
<input type="text" class="form-control policy_start_date" id="policy_start_date" name="policy_start_date"
placeholder="Enter DOC" required>
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<div class="form-group col-md-3">
</div>
<div class="form-group col-md-4">
<label for="">Date of Expiry <span class="text-danger">*</span></label>
<div class="input-icon">
<input type="text" class="form-control policy_end_date" id="policy_end_date" name="policy_end_date"
placeholder="Enter DOE" required>
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
</div>
</div>
<div id="appendArea"></div>
<div id="appendAreaForClaim">
</div>
<hr>
<!-- <hr> --> <!-- bcoz removed in design -->
<div class="card" style="width:100%; background-color: transparent;">
<div class="card-body" style="background-color: #fff !important; border: 0px !important;">
<div id="multiFileAppendArea_1"></div>
</div>
</div>
<hr>
</div>
</div>
<!-- <hr> --> <!-- bcoz removed in design -->
<!-- other row -->
<div class="card" id="collapseOne">
<div class="card-body">
<div class="form-row">
<!-- <div class="form-group col-md-3">
@ -327,7 +375,7 @@
<span class="text-danger" id="file_name_display"></span>
</div> -->
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="salse_person_id">Sales Person<span class="text-danger">*</span></label>
<select class="form-control" id="salse_person_id" name="salse_person_id" multiple required>
<option value="">Select Sales Person</option>
@ -341,7 +389,7 @@
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="status"> Status <span id="base_danger" class="text-danger">*</span></label>
<select class="form-control" id="lead_status" name="status" required>
<option value="" selected>Select Status</option>
@ -367,6 +415,8 @@
<textarea class="form-control" id="notes" name="notes" rows="4"></textarea>
</div>
</div>
</div>
</div>
<div class="form-group text-right m-b-0">
<button type="submit" id="lead_form_submit_btn" class="btn btn-primary waves-effect waves-light mr-1">Submit</button>

View File

@ -23,16 +23,16 @@ table.dataTable tbody td {
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th>S.No.</th>
<th>Log File</th>
<th>Actions</th>
<th>S.No&nbsp;</th>
<th>Log File&nbsp;</th>
<th>Actions&nbsp;</th>
</tr>
</thead>
<tbody>
<?php if (!empty($logs)): ?>
<?php foreach ($logs as $index => $log): ?>
<tr>
<td><?= $index + 1 . '.' ?></td>
<td class="text-center"><?= $index + 1 . '.' ?></td>
<td><?= esc($log) ?></td>
<td>
<a href="<?= base_url('util/view_log/' . urlencode($log)) ?>">View</a> |

View File

@ -162,3 +162,27 @@
</body>
</html>
<script>
document.addEventListener("DOMContentLoaded", function() {
<?php
$isLoggedIn = check_session();
$hasCookie = check_cookie();
?>
// Safely inject PHP boolean into JavaScript
let alreadyLogin = <?= ($isLoggedIn && $hasCookie) ? 'true' : 'false' ?>;
console.log(typeof alreadyLogin);
console.log(alreadyLogin);
if (!alreadyLogin) {
localStorage.clear();
console.log("Local storage cleared (no session/cookie).");
} else {
console.log("Session & cookie found, local storage kept.");
}
});
</script>

View File

@ -1,41 +1,40 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
.dataTables_filter {
position: absolute;
}
}
.right-align-input {
.right-align-input {
text-align: right;
}
}
.center-align-input {
.center-align-input {
text-align: center;
}
}
</style>
<div class="row" id="outstanding_filter">
<div class="col-12" style="margin-top: -12px;">
<div class="container-fluid-min">
<div class="col-12" id="outstanding_filter">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
@ -55,27 +54,27 @@ table.dataTable tbody td {
</select>
</div> -->
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="addon_policy"> Insurer <span id="base_danger"
class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id">
<option value="0" selected>Select Insurer</option>
<?php if(isset($insurer) && count($insurer)){ ?>
<?php if (isset($insurer) && count($insurer)) { ?>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="addon_policy"> Insurer Branch<span id="base_danger"
class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id">
<option value="0" selected>Select Insurer</option>
<?php if(isset($insurer) && count($insurer)){ ?>
<option value="0" selected>Select Insurer Branch</option>
<?php if (isset($insurer) && count($insurer)) { ?>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
<?php } ?>
</select>
@ -128,13 +127,20 @@ table.dataTable tbody td {
</select>
</div> -->
<div class="form-group col-md-3" style="display: true;" id="date_div">
<div class="form-group col-md-4" style="display: true;" id="date_div">
<label>Statement Month<span class="text-danger"></span></label>
<div class="input-icon">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<!--
codeword : ***1***
if you cross check means also uncomment "star2star" (***2***)
<div id="reportrange" class="form-control"
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp;
<span></span> <i class="mdi mdi-menu-down"></i>
</div>
</div> -->
<input type="hidden" id="startDate">
<input type="hidden" id="endDate">
</div>
@ -152,12 +158,11 @@ table.dataTable tbody td {
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12" id="outstanding_list">
<div class="col-12" id="outstanding_list">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
@ -166,22 +171,24 @@ table.dataTable tbody td {
</div>
</div>
<div class="table-responsive">
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S.No</th>
<th>S.No&nbsp;</th>
<!-- <th>Client Name</th> -->
<th>Insurer</th>
<th>Insurer<br> Branch</th>
<th>Statement<br> Month</th>
<th>Statement<br> No</th>
<th>Invoice No</th>
<th>Invoice Status</th>
<th>Invoice Date</th>
<th>Invoice Amount</th>
<th>Realization <br>Amount</th>
<th>Outstanding <br>Amount</th>
<th>Insurer&nbsp;</th>
<th>Insurer<br> Branch&nbsp;</th>
<th>Statement<br> Month&nbsp;</th>
<th>Statement<br> No&nbsp;</th>
<th>Invoice No&nbsp;</th>
<th>Invoice Status&nbsp;</th>
<th>Invoice Date&nbsp;</th>
<th>Invoice Amount&nbsp;</th>
<th>Realization <br>Amount&nbsp;</th>
<th>Outstanding <br>Amount&nbsp;</th>
</tr>
</thead>
<tbody>
@ -189,9 +196,9 @@ table.dataTable tbody td {
// dd($outstanting_list);
if (isset($outstanting_list)) { ?>
<?php foreach($outstanting_list as $index => $row){ ?>
<?php foreach ($outstanting_list as $index => $row) { ?>
<tr>
<td><?= $index + 1 ?></td>
<td class="text-center"><?= $index + 1 ?></td>
<td><?php echo $row['short_name']; ?></td>
<td><?php echo $row['branch_name']; ?></td>
<td><?php echo change_date_format($row['month'],'Y-m-d','Y-m') ?></td>
@ -213,11 +220,12 @@ table.dataTable tbody td {
</div>
</div><!-- end col -->
</div>
</div>
</div>
<script>
// Datatable document ready
$(document).ready(function() {
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
@ -227,14 +235,18 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
title: 'Policy-Tranction-BDS-List',
customize: function(xlsx) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
@ -264,8 +276,8 @@ $(document).ready(function() {
$(sheet).find('sheetData').append(totalRow);
}
}
],
]
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
@ -276,16 +288,16 @@ $(document).ready(function() {
} else {
console.error("Table not found.");
}
});
});
$(document).ready(function() {
$(document).ready(function() {
getURLParams()
$('#client_id').select2();
$('#insurer_id').select2();
$('#policy_type_id').select2();
})
})
function fetchEmpolyeeList(event) {
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -312,13 +324,13 @@ function fetchEmpolyeeList(event) {
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj) {
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams() {
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -357,9 +369,9 @@ function getURLParams() {
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -376,7 +388,10 @@ $(function() {
// var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
// codeword : ***2***
// if you cross check means also uncomment "star1star" (***1***)
// $('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
@ -384,11 +399,13 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
// autoUpdateInput: false,
locale: {
format: 'DD-MM-YYYY' // 👈 force input format
},
ranges: {
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
.endOf('month')
]
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
}
}, cb);
@ -409,9 +426,9 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null) {
function hideDateField(input = null) {
let val = $('#date_type').val();
if (input) {
@ -423,10 +440,10 @@ function hideDateField(input = null) {
} else {
$('#date_div').hide()
}
}
}
function sendPolicyTransactionID(event, pt_id) {
function sendPolicyTransactionID(event, pt_id) {
event.preventDefault(); // Prevent default action
console.log(pt_id);
@ -439,5 +456,5 @@ function sendPolicyTransactionID(event, pt_id) {
const apiURL = $('#get-policy-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
</script>

View File

@ -98,6 +98,22 @@
color: #000;
}
/** newly implemented */
#insurerTable thead th:first-child {
border-top: 0px solid #fff !important;
border-bottom: 0px solid #fff !important;
background-color: transparent !important;
}
#insurerTable tbody td {
border-top: 0px solid #fff !important;
border-bottom: 0px solid #fff !important;
background-color: transparent !important;
}
#insurerTable th{
color: black !important;
background-color: transparent !important;
}
</style>
<div class="row" id="endorsement_form" style="display: none;">
@ -129,15 +145,18 @@
<div class="row">
<!-- Section 1 -->
<div class="col-md-12">
<div class="form-section">
<!-- <div class="form-section"> -->
<div id="accordion_0" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Client Details
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Client Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
</label>
<div class="card mb-1">
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_0">
<div class="card-body">
<div class="row">
<div class="form-group col-md-3">
@ -176,6 +195,7 @@
</div>
</div>
</div>
<!-- </div> -->
</div>
</div>
@ -327,15 +347,167 @@
<!-- Premium Details -->
<div class="row">
<div class="col-md-12">
<div class="form-section">
<div id="accordion_3" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Premium Details
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseFour" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
<div id="accordion_2" class="mb-0">
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Endorsement</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseThree"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
<div id="collapseFour" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3">
</label>
<div class="card mb-1">
<div id="collapseThree" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_2">
<div class="card-body">
<div class="row">
<div class="form-group col-md-3" id="tpa_endorse_div">
<label for="tpa"> TPA <span id="tpa_danger"class="text-danger"></span></label>
<select class="form-control readonly-select" id="tpa" name="tpa" >
<option value="" selected>Select TPA</option>
<?php foreach ($tpa as $value) { ?>
<option value="<?= $value['id'] . '-' . $value['tpa_id'] ?>">
<?= $value['tpa_short_name'] . '-' . $value['branch_code'] ?>
</option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3">
<label for="addon_policy">Policy No<span id="base_danger"class="text-danger"></span></label>
<input type="text" class="form-control" id="policy_no" name="policy_no"placeholder="Enter Policy No" readonly>
</div>
<div class="form-group col-md-3">
<label for="bp_cgst">D.O.C <span id="base_danger" class="text-danger"></span></label>
<input id="policy_start_date" type="text" class="form-control" placeholder="DD/MM/YYYY" readonly>
</div>
<div class="form-group col-md-3">
<label for="bp_igst">D.O.E <span id="base_danger" class="text-danger"></span></label>
<input id="policy_end_date" type="text" class="form-control" placeholder="DD/MM/YYYY" readonly>
</div>
<div class="form-group col-md-3">
<label for="addon_policy">Policy Issue Month<span id="base_danger" class="text-danger">*</span></label>
<input type="text" class="form-control" id="month" name="month" placeholder="MM/YYYY" >
</div>
<div class="form-group col-md-3">
<label for="addon_policy"> Endorsement Type <span id="base_danger" class="text-danger">*</span></label>
<select class="form-control" id="action_type" name="action_type" required>
<option value="" selected>Select Endorsement Type</option>
<?php
if (isset($action_type) && count($action_type)) {
foreach ($action_type as $key => $value) {
echo "<option value=" . $key . ">" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="addon_policy">Endorsement No<span id="base_danger" class="text-danger"></span></label>
<input type="text" class="form-control" id="endorsement_no" name="endorsement_no" placeholder="Enter Endorsement No" onchange="validateInput(this, 'policy_transaction', 'endorsement_no')">
</div>
<div class="form-group col-md-3">
<label for="addon_policy">Data Received Date<span id="base_danger" class="text-danger">*</span></label>
<input type="text" class="form-control" id="data_received_date" name="data_received_date" placeholder="DD/MM/YYYY" required>
</div>
<div class="form-group col-md-3">
<label for="policy_issue_date">Date of Issue<span id="base_danger" class="text-danger">*</span></label>
<input type="text" class="form-control" id="policy_issue_date" name="policy_issue_date" placeholder="DD/MM/YYYY" required>
</div>
<div class="form-group col-md-3">
<label for="endorse_eff_date">Endorsement Effective Date<span id="base_danger" class="text-danger"></span></label>
<input type="text" class="form-control" id="endorse_eff_date" name="endorse_eff_date" placeholder="DD/MM/YYYY" >
</div>
<div class="form-group col-md-3" id="no_of_insured_endorse_div">
<label for="addon_policy">No of Insured<span id="base_danger"class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_count" name="emp_count" placeholder="Enter Employeee" onkeypress="return onlyNumbers(event)">
</div>
<div class="form-group col-md-3" id="no_of_dependents_endorse_div">
<label for="addon_policy">No of Dependents<span id="base_danger" class="text-danger"></span></label>
<input type="text" class="form-control" id="dependent_count" name="dependent_count" placeholder="Enter Dependent" onkeypress="return onlyNumbers(event)">
</div>
</div>
<hr>
<div class="row">
<div class="form-group col-md-3">
<label for="addon_policy"> Status <span id="base_danger"class="text-danger">*</span></label>
<select class="form-control" id="policy_status" name="status" required>
<option value="" selected>Select Status</option>
<?php
if (isset($policy_status) && count($policy_status)) {
foreach ($policy_status as $key => $value) {
if($key == 'pending'){
echo "<option value=" . $key . " selected>" . $value . "</option>";
}else{
echo "<option value=" . $key . ">" . $value . "</option>";
}
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="last_action_date">Latest Action Date</label>
<input id="last_action_date" type="text" class="form-control" name="last_action_date" placeholder="DD/MM/YYYY">
</div>
<div class="form-group col-md-3 install_due_date_div" style="display: none;">
<label for="install_due_date">Installment due Date</label>
<input id="install_due_date" type="text" class="form-control" name="install_due_date" placeholder="DD/MM/YYYY">
</div>
<!-- <div class="form-group col-md-3">
<label class="switch" style="position: relative;top: 32px;left: 20px;">
<input id="policy_with_corr" type="checkbox" name="policy_with_corr">
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="policy_with_corr" style="position: relative;top: 33px;left: 25px;"> Policy with Correction</label>
</div> -->
<!-- <div class="form-group col-md-3">
<label class="switch" style="position: relative;top: 32px;left: 20px;">
<input id="is_cd_reduce_from_bds" type="checkbox" name="is_cd_reduce_from_bds">
<span class="slider round" style="height: 27px;"></span>
</label>
<label for="is_cd_reduce_from_bds" style="position: relative;top: 33px;left: 25px;">Make Entry in CD &nbsp;&nbsp; <i class="mdi mdi-information-outline" data-toggle="tooltip" title="Enabling this will affect ( Credit/Debit ) the CD transaction. ( GMC, GPA, EDLI and GTLI, CD transaction from CRM )"></i></label>
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Premium Details -->
<div class="col-md-12">
<!-- <div class="form-section"> -->
<div id="accordion_3" class="mb-0">
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Premium Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label>
<div class="card mb-0">
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3">
<div class="card-body">
<div class="row d-none" id="add_more_row">
<div class="col-md-2">
<input type="number" id="setInsurerCount" class="form-control" placeholder="Enter count">
@ -349,10 +521,10 @@
</div>
<div id="insurerTableContainer" style="overflow: auto;">
<table data-custom-table-css="table" class="table table-bordered co_share_table" id="insurerTable">
<table data-custom-table-css="table" class="table co_share_table" id="insurerTable">
<thead>
<tr>
<th>Premium Details</th>
<th><span class="font-color-black">Premium Details</span></th>
</tr>
</thead>
<tbody>
@ -497,16 +669,13 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- </div> -->
</div>
<div class="form-group text-right m-b-0" id="submitButton">
</div>
<div class="form-group text-right mt-3 m-b-0" id="submitButton">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
</div>
@ -1713,8 +1882,10 @@ function addInsurerColumn() {
// Update header
$('#insurerTable thead tr').append(`
<th>
<span style="display:flex; justify-content:space-between; align-items:center;">
Insurer ${insurerCount}
${insurerCount > 1 ? `<a class="text-danger mdi mdi-delete delete-insurer" data-count="${insurerCount}" style="margin-left: 135px;"></a>` : ''}
</span>
</th>
`);

View File

@ -1,54 +1,54 @@
<style>
.table th,
.table td {
.table th,
.table td {
padding: 8px;
}
}
table.dataTable tbody td {
table.dataTable tbody td {
padding: 4px 4px !important;
}
/*
}
/*
table.dataTable thead th {
padding: 4px 4px !important;
} */
.col-12 {
max-width: 98% !important;
}
.dataTables_filter{
.dataTables_filter {
position: absolute;
}
}
.column-header {
margin-right: 10px; /* Adjust this value as needed */
}
.column-header {
margin-right: 10px;
/* Adjust this value as needed */
}
.form-section {
.form-section {
border: 1px solid #ccc;
padding: 15px;
margin-bottom: 20px;
}
}
.row-box {
.row-box {
border: 1px solid #ccc;
padding: 10px;
margin-bottom: 10px;
}
custom-dropdown-menu {
}
.custom-dropdown-menu {
display: none;
position: fixed;
background-color: #ffffff !important;
border: 1px solid rgba(0,0,0,.15);
border: 1px solid rgba(0, 0, 0, .15);
border-radius: 0.25rem;
padding: 0.5rem 0;
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
@ -61,25 +61,25 @@ custom-dropdown-menu {
border: 0 !important;
text-decoration: none !important;
position: relative !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.custom-dropdown-menu .dropdown-item i {
.custom-dropdown-menu .dropdown-item i {
margin-right: 8px !important;
vertical-align: middle !important;
}
}
.table tbody tr {
.table tbody tr {
cursor: pointer;
}
}
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
content: '';
position: absolute;
top: 0;
@ -88,21 +88,20 @@ custom-dropdown-menu {
bottom: 0;
background: #ffffff;
z-index: -1;
}
}
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.05);
background: rgba(0, 0, 0, 0.05);
z-index: -2;
pointer-events: none;
}
}
</style>
<style>
@ -143,15 +142,15 @@ custom-dropdown-menu {
transition: .4s;
}
input:checked + .slider {
input:checked+.slider {
background-color: #2196F3;
}
input:focus + .slider {
input:focus+.slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
input:checked+.slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
@ -167,16 +166,18 @@ custom-dropdown-menu {
}
</style>
<div class="row" id="endorsement_filter">
<div class="col-12" style="margin-top: -12px;">
<div class="container-fluid-min">
<div class="col-12" id="endorsement_filter">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
@ -184,7 +185,7 @@ custom-dropdown-menu {
<div class="form-group col-md-3">
<label for="client_branch">Client<span class="text-danger"></span></label>
<select class="form-control" id="client_id_for_search" name="client_id" >
<select class="form-control" id="client_id_for_search" name="client_id">
<option value="0">Select Client</option>
<?php
if (isset($client) && count($client)) {
@ -198,17 +199,17 @@ custom-dropdown-menu {
<div class="form-group col-md-3">
<label for="addon_policy"> Insurer <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="insurer_id_for_search" name="insurer_id" >
<select class="form-control" id="insurer_id_for_search" name="insurer_id">
<option value="0" selected>Select Insurer</option>
<?php foreach ($insurer as $value) { ?>
<option value="<?= $value['id']?>"><?= $value['name']?></option>
<option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
<?php } ?>
</select>
</div>
<div class="form-group col-md-3">
<label for="email"> Policy Type <span class="text-danger"></span></label>
<select class="form-control" id="policy_type_for_search" name="policy_type_id" >
<select class="form-control" id="policy_type_for_search" name="policy_type_id">
<option value="0">Select Policy Type</option>
<?php
if (isset($policy_types) && count($policy_types)) {
@ -239,7 +240,7 @@ custom-dropdown-menu {
<div class="form-group col-md-3">
<label for="email"> Status <span class="text-danger"></span></label>
<select class="form-control" id="policy_status_for_search" name="policy_type_id" >
<select class="form-control" id="policy_status_for_search" name="policy_type_id">
<option value="0">Select Status</option>
<?php
if (isset($policy_status) && count($policy_status)) {
@ -275,36 +276,34 @@ custom-dropdown-menu {
<input type="hidden" id="endDate">
</div>
</div>
<div class="form-group col-md-3 text-right m-b-0" style="margin-top: 29px;">
<div class="form-group text-right m-b-0">
<a href="<?= base_url("/policy_tranction/endorsement/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
<a href="<?= base_url("/policy_tranction/endorsement/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" id="endorsement_list">
<div class="col-12">
</div>
<div class="col-12" id="endorsement_list">
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Endorsement List</h4>
</div>
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">
<div class="col-3">
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="hide_list_show_add()">Add</button>
</div>
</div>
<div>
</div> -->
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
@ -325,44 +324,46 @@ custom-dropdown-menu {
</tr>
</thead>
<tbody>
<?php foreach($endorsement_data_list as $index => $row){ ?>
<?php foreach ($endorsement_data_list as $index => $row) { ?>
<tr>
<td><?php echo $index+1; ?></td>
<td><?php echo $issuer[$row['issuer']] ?? ''; ?></td>
<td><?php echo $row['client_short_name']; ?></td>
<td><?php echo $row['client_branch_name']; ?></td>
<td><?php echo $row['insurer_short_name']; ?></td>
<td><?php echo $row['policy_type']; ?></td>
<td><?php echo $action_type[$row['action_type']]; ?></td>
<td><?php echo $row['endorsement_no']; ?></td>
<td><?php echo empty($row['data_received_date']) ? '' : date('d/m/Y', strtotime($row['data_received_date'])); ?></td>
<td class="right-align-input"><?php echo $row['emp_count']; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count']; ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td>
<td><?php echo $policy_status[$row['status']]; ?></td>
<td class="text-center"><?php echo $index + 1; ?></td>
<td><?php echo $issuer[$row['issuer']] ?: 'N/A'; ?></td><!-- Issuer -->
<td><?php echo $row['client_short_name'] ?: 'N/A'; ?></td><!-- Client -->
<td><?php echo $row['client_branch_name'] ?: 'N/A'; ?></td><!-- Branch -->
<td><?php echo $row['insurer_short_name'] ?: 'N/A'; ?></td><!-- Insurer -->
<td><?php echo $row['policy_type'] ?: 'N/A'; ?></td><!-- Policy -->
<td><?php echo $action_type[$row['action_type']] ?: 'N/A';?></td>
<td><?php echo $row['endorsement_no'] ?: 'N/A'; ?></td>
<td><?php echo empty($row['data_received_date']) ? 'N/A' : date('d/m/Y', strtotime($row['data_received_date'])); ?></td>
<td class="right-align-input"><?php echo $row['emp_count'] ?: '0'; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count'] ?: '0'; ?></td>
<td><?php echo empty($row['policy_issue_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td>
<td><?php echo $policy_status[$row['status']] ?: 'N/A'; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);"class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" onclick="getPolicyTransactionDataForEndorsementEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')"> <i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>" onclick="getPolicyTransactionDataForEndorsementEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
</a>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</table><!-- table -->
</div><!-- card-body -->
</div><!-- card -->
</div><!-- end col -->
</div>
<!-- end table row -->
<?php include('policy_transaction_endorsement_form.php'); ?>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -440,11 +441,9 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
var client_list = '';
var branch_list = '';
var policy_list = <?= json_encode($endorsementPolicies) ?>;
@ -454,7 +453,7 @@ document.addEventListener("DOMContentLoaded", function () {
var unit_list = '';
// select2 document ready
$(document).ready(function(){
$(document).ready(function() {
getClientAndBranchAndPolicy()
@ -488,32 +487,54 @@ document.addEventListener("DOMContentLoaded", function () {
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function (e, dt, node, config) {
hide_list_show_add();
},
attr: { id: 'btnAdd' }
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Policy-Tranction-Endorsement-List',
exportOptions: {
columns: ':not(:last-child)'
},
}],
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
pageLength: 10, // Set default number of rows per page (optional)
ordering: false,
});
} else {
console.error("Table not found.");
}
$('#btnAdd').wrap('<div id="status_change"></div>');
});
// Date document ready
$(document).ready(function(){
$(document).ready(function() {
var today = new Date();
@ -573,8 +594,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
function hide_list_show_add()
{
function hide_list_show_add() {
removeAllColumnsExceptFirst('insurerTable');
$('.hideter').hide()
$('.hidetp').hide()
@ -588,16 +608,14 @@ document.addEventListener("DOMContentLoaded", function () {
$('#invoice_no').attr('required', false)
}
function show_list_hide_add()
{
function show_list_hide_add() {
$('#endorsement_form').hide()
$('#endorsement_list').show()
$('#endorsement_filter').show()
}
function getClientAndBranchAndPolicy()
{
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -606,14 +624,14 @@ document.addEventListener("DOMContentLoaded", function () {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
if (res.status == true) {
branch_list = res.branch_data;
// policy_list = res.policy_data;
// policyListByClient = res.policyListByClient;
client_list = res.client_data;
unit_list = res.unit_data;
appendClients(res.client_data);
}else{
} else {
console.log('No data found');
}
@ -625,8 +643,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
function appendClients(data)
{
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -641,7 +658,7 @@ document.addEventListener("DOMContentLoaded", function () {
$.each(data, function(index, item) {
if(item.client_policy_count > 0){
if (item.client_policy_count > 0) {
var option = $('<option>', {
value: item.id,
@ -653,8 +670,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
function appendBranch(data)
{
function appendBranch(data) {
$('#client_branch_id').empty();
@ -673,8 +689,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
}
function appendPolicies(data)
{
function appendPolicies(data) {
if (!data) {
toastr.warning("There are no policies in Inception for the selected client and branch.");
@ -692,25 +707,24 @@ document.addEventListener("DOMContentLoaded", function () {
var option = $('<option>', {
value: item.id,
text: item.policy_type + '-' + item.policy_no,
'data-sd' : item.policy_start_date,
'data-ed' : item.policy_end_date,
'data-insurer' : item.insurer_branch_id + '-' + item.insurer_id,
'data-policy' : item.policy_no,
'data-cd' : item.cd_ac_no,
'data-ebp' : item.ebp,
'data-etp' : item.etp,
'data-iep' : item.iep,
'data-itp' : item.itp,
'data-bap' : item.bap,
'data-tpa' : item.tpa_branch_id + '-' + item.tpa_id,
'data-ptid' : item.policy_type_id,
'data-sd': item.policy_start_date,
'data-ed': item.policy_end_date,
'data-insurer': item.insurer_branch_id + '-' + item.insurer_id,
'data-policy': item.policy_no,
'data-cd': item.cd_ac_no,
'data-ebp': item.ebp,
'data-etp': item.etp,
'data-iep': item.iep,
'data-itp': item.itp,
'data-bap': item.bap,
'data-tpa': item.tpa_branch_id + '-' + item.tpa_id,
'data-ptid': item.policy_type_id,
});
$('#client_policy_id').append(option);
});
}
function logSelectedIds()
{
function logSelectedIds() {
var selectedIds = [];
$('.row-select:checked').each(function() {
selectedIds.push($(this).data('id'));
@ -731,7 +745,7 @@ document.addEventListener("DOMContentLoaded", function () {
var isValid = $('#invoiceForm').parsley().validate();
if (!isValid) {
console.log('Form is Empty', 'Warning');
return ;
return;
}
form_action = '<?= base_url("util/updateInvoiceStatus"); ?>';
@ -746,7 +760,7 @@ document.addEventListener("DOMContentLoaded", function () {
formData.append('ids', JSON.stringify(ids));
$.ajax({
data:formData,
data: formData,
url: form_action,
type: "POST",
dataType: 'json',
@ -757,16 +771,16 @@ document.addEventListener("DOMContentLoaded", function () {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
if(res.status == true){
if (res.status == true) {
toastr.success(res.message, 'Success');
}else{
} else {
toastr.error(res.message, 'Error');
}
window.location.reload();
$('.close').click();
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -775,47 +789,44 @@ document.addEventListener("DOMContentLoaded", function () {
});
});
$('#invoice_status').change(function(){
$('#invoice_status').change(function() {
let value = $(this).val()
if(value == 'generated'){
if (value == 'generated') {
$('#invoice_no_div').show()
$('#invoice_no').attr('required', true)
}else{
} else {
$('#invoice_no_div').hide()
$('#invoice_no').attr('required', false)
}
})
$('#invoice_status_modal').change(function(){
$('#invoice_status_modal').change(function() {
let value = $(this).val()
if(value == 'generated'){
if (value == 'generated') {
$('#invoice_no_div_modal').show()
$('#invoice_no_modal').attr('required', true)
}else{
} else {
$('#invoice_no_div_modal').hide()
$('#invoice_no_modal').attr('required', false)
}
})
</script>
<script>
$(document).ready(function() {
$(document).ready(function() {
getURLParams()
$('#client_id_for_search').select2();
$('#insurer_id_for_search').select2();
$('#policy_type_for_search').select2();
})
})
function fetchEmpolyeeList(event)
{
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -846,15 +857,13 @@ function fetchEmpolyeeList(event)
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj)
{
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams()
{
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -883,7 +892,7 @@ function getURLParams()
// console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function(){
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id_for_search').val(client_id).change()
@ -892,13 +901,13 @@ function getURLParams()
$('#date_type').val(date_type)
$('#issuer_for_search').val(issuer)
$('#policy_status_for_search').val(status)
},1000)
}, 1000)
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -923,6 +932,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -951,21 +963,19 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null)
{
function hideDateField(input = null) {
let val = $('#date_type').val();
if(input){
if (input) {
val = input;
}
if(val != 0){
if (val != 0) {
$('#date_div').show()
}else{
} else {
$('#date_div').hide()
}
}
}
</script>

View File

@ -141,6 +141,22 @@
font-size: 24px;
}
/** newly implemented */
#insurerTable thead th:first-child {
border-top: 0px solid #fff !important;
border-bottom: 0px solid #fff !important;
background-color: transparent !important;
}
#insurerTable tbody td {
border-top: 0px solid #fff !important;
border-bottom: 0px solid #fff !important;
background-color: transparent !important;
}
#insurerTable th{
color: black !important;
background-color: transparent !important;
}
</style>
<div class="tab-pane fade active show" id="form">
@ -184,15 +200,18 @@
<div class="row">
<!-- Section 1 -->
<div class="col-md-12">
<div class="form-section">
<div id="accordion_0" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Client Details
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Client Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
</label>
<div class="card mb-1">
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_0">
<div class="card-body">
<div class="row">
<div class="form-group col-md-3">
<label for="email"> Policy Type <span class="text-danger">*</span></label>
@ -284,12 +303,12 @@
</div>
</div>
</div>
</div>
</div>
<div class="row" id="vehicle_row_div">
</div>
<!-- Client Section -->
<div class="row" id="client_row_div">
</div>
@ -297,16 +316,18 @@
<!-- Pre sales Row -->
<div class="row" id="pre_sales_row">
<div class="col-md-12">
<div class="form-section">
<div id="accordion_1" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Pre Sales
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_1">
<div id="accordion_1" class="mb-0">
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Pre Sales</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseTwo"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</label>
<div class="card mb-1">
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_1">
<div class="card-body">
<div class="row" id="policyholdernamediv" style="display: none;">
<div class="form-group col-md-3">
<label for="bp_igst">Policyholder Name</label>
@ -498,21 +519,25 @@
</div>
</div>
</div>
</div>
</div>
<!-- sales Row -->
<div class="row" id="sales_row" style="display: none;">
<div class="col-md-12">
<div class="form-section">
<div id="accordion_2" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Sales
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseThree" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Sales</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseThree"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
</label>
<div class="card mb-1">
<div id="collapseThree" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_2">
<div class="card-body">
<div class="row">
<div class="form-group col-md-3" id="base_policy_id" style="display: none;">
@ -652,20 +677,27 @@
</div>
</div>
<hr>
</div>
</div>
</div>
</div> <!-- accordion_2 div closed here -->
</div><!-- 1st col-md-12 div closed here -->
<!-- Premium Details -->
<div class="row">
<div class="col-md-12">
<div class="form-section">
<div id="accordion_3" class="mb-0">
<div class="card mb-0">
<h4 class="m-1">Premium Details
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseFour" aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
<label id="policyAccordion" class="m-1 d-flex justify-content-between align-items-center">
<span class="font-color-black">Premium Details</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseFour"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h4>
</label>
<div class="card mb-0">
<div id="collapseFour" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion_3">
<div class="card-body">
<div class="row d-none" id="add_more_row">
<div class="col-md-2">
<!-- <label for="setInsurerCount">Insurer Count : </label> -->
@ -681,7 +713,7 @@
</div>
<div id="insurerTableContainer" style="overflow: auto;">
<table data-custom-table-css="table" class="table table-bordered co_share_table" id="insurerTable">
<table data-custom-table-css="table" class="table co_share_table" id="insurerTable">
<thead>
<tr>
<th>Premium Details</th>
@ -821,22 +853,18 @@
</tr>
</tbody>
</table>
</div>
</div> <!-- insurerTableContainer div closed here-->
</div>
</div> <!-- collapseFour div closed here -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- accordion_3 div closed here -->
</div> <!-- 2nd col-md-12 closed here -->
<div class="form-group text-right m-b-0" id="submitButton">
</div> <!-- sales_row div closed here -->
<div class="form-group text-right mt-1 m-b-0" id="submitButton">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="btnSubmit">Submit</button>
</div>
@ -4089,8 +4117,10 @@
// Update header
$('#insurerTable thead tr').append(`
<th>
<span style="display:flex; justify-content:space-between; align-items:center;">
Insurer ${insurerCount}
${insurerCount > 1 ? `<a data-count="${insurerCount}" class="text-danger mdi mdi-delete delete-insurer" style="margin-left: 135px;"></a>` : ''}
</span>
</th>
`);

View File

@ -146,10 +146,11 @@ table.dataTable tbody td {
</style>
<div class="row" id="inception_filter">
<div class="col-12" style="margin-top: -12px;">
<div class="col-12">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
@ -256,7 +257,11 @@ table.dataTable tbody td {
<input type="hidden" id="endDate">
</div>
<div class="form-group col-md-3 text-right m-b-0" style="margin-top: 29px;">
</div>
<div class="form-row">
<div class="form-group col-md-12 text-right m-b-0">
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-secondary" id="clear-filters">Clear</a>
<a href="<?= base_url("/policy_tranction/inception/list"); ?>" class="btn btn-primary" id="get-emp-list" onclick="fetchEmpolyeeList(event);">Submit</a>
</div>
@ -309,21 +314,21 @@ table.dataTable tbody td {
<tbody>
<?php foreach($inception_data_list as $index => $row){ ?>
<tr>
<td><?php echo $index+1; ?></td>
<td class="text-center"><?php echo $index+1; ?></td>
<td><?php echo $issuer[$row['issuer']]; ?></td>
<td><?php echo $issuing_type[$row['issue_type']]; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? '-'; ?></td>
<td><?php echo $issuing_type[$row['issue_type']] ?: 'N/A'; ?></td>
<td><?php echo $client_type[$row['client_type']] ?? 'N/A'; ?></td>
<td><?php echo $row['client_type'] == 2 ? $row['client_name'] . " - " . (!empty($row['pan']) ? $row['pan'] : 'N/A') : $row['client_short_name'] . ' - ' . $row['client_branch_name']; ?></td>
<td><?php echo $row['insurer_short_name']; ?></td>
<td><?php echo $row['policy_type']; ?></td>
<td><?php echo $row['policy_no']; ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo empty($row['policy_issue_date']) ? '' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<td class="right-align-input"><?php echo $row['emp_count']; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count']; ?></td>
<td><?php echo $policy_status[$row['status']]; ?></td>
<td><?php echo $row['user_name']; ?></td>
<td><?php echo $row['insurer_short_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_no'] ?: 'N/A'; ?></td>
<td><?php echo empty($row['policy_issue_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_issue_date'])); ?></td>
<td><?php echo empty($row['policy_issue_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo empty($row['policy_issue_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<td class="right-align-input"><?php echo $row['emp_count'] ?: '0'; ?></td>
<td class="right-align-input"><?php echo $row['dependent_count'] ?: '0'; ?></td>
<td><?php echo $policy_status[$row['status']] ?: 'N/A'; ?></td>
<td><?php echo $row['user_name'] ?: 'N/A'; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
@ -556,33 +561,44 @@ $(document).ready(function() {
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
dom: "<'row'<'col-sm-1'f><'col-sm-11 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function (e, dt, node, config) {
hide_list_show_add();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Policy-Tranction-Inception-List',
exportOptions: {
columns: ':not(:last-child)'
},
},
{
text: 'Add',
className: 'buttons-html5 addbtnStyle',
action: function (e, dt, node, config) {
hide_list_show_add();
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
pageLength: 10, // Set default number of rows per page (optional)
// ordering: false,
});
} else {

View File

@ -1,17 +1,17 @@
<style>
.custom-dropdown-menu {
.custom-dropdown-menu {
display: none;
position: fixed;
background-color: #ffffff !important;
border: 1px solid rgba(0,0,0,.15);
border: 1px solid rgba(0, 0, 0, .15);
border-radius: 0.25rem;
padding: 0.5rem 0;
min-width: 10rem;
z-index: 9999;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.custom-dropdown-menu .dropdown-item {
.custom-dropdown-menu .dropdown-item {
display: block !important;
width: 100% !important;
padding: 0.5rem 1rem !important;
@ -24,25 +24,25 @@
border: 0 !important;
text-decoration: none !important;
position: relative !important;
}
}
.custom-dropdown-menu .dropdown-item:hover {
.custom-dropdown-menu .dropdown-item:hover {
background-color: #f8f9fa !important;
color: #16181b !important;
cursor: pointer !important;
}
}
.custom-dropdown-menu .dropdown-item i {
.custom-dropdown-menu .dropdown-item i {
margin-right: 8px !important;
vertical-align: middle !important;
}
}
.table tbody tr {
.table tbody tr {
cursor: pointer;
}
}
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
/* Ensure the dropdown menu has a solid background */
.custom-dropdown-menu::before {
content: '';
position: absolute;
top: 0;
@ -51,22 +51,24 @@
bottom: 0;
background: #ffffff;
z-index: -1;
}
}
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
/* Add a subtle backdrop effect */
.custom-dropdown-menu::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.05);
background: rgba(0, 0, 0, 0.05);
z-index: -2;
pointer-events: none;
}
}
</style>
<div class="row" id="policy_list">
<div class="container-fluid-min">
<div class="row" id="policy_list">
<div class="col-12">
<div class="card">
<div class="card-body maincard">
@ -78,11 +80,11 @@
<a href="<?= base_url("master/policy/create"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
</div>
</div> -->
<div class="row" style="margin-bottom:1rem;">
<!-- <div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Policy</h4>
</div>
</div>
</div> -->
<table data-custom-table-css="table" class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
id="tickets-table">
<thead class="bg-light">
@ -99,11 +101,11 @@
<tbody>
<?php if(is_array($policyList)) {foreach($policyList as $row){ ?>
<tr>
<td><?php echo $row['policy_type']; ?> </td>
<td><?php echo $row['long_name']; ?> </td>
<td><?php echo $row['bap']; ?></td>
<td><?php echo $row['allocg']; ?></td>
<td><?php echo $row['alloci']; ?></td>
<td><?php echo $row['policy_type'] ?: 'N/A'; ?> </td>
<td><?php echo $row['long_name'] ?: 'N/A'; ?> </td>
<td><?php echo $row['bap'] ?: 'N/A'; ?></td>
<td><?php echo $row['allocg'] ?: 'N/A'; ?></td>
<td><?php echo $row['alloci'] ?: 'N/A'; ?></td>
<td>
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
@ -121,11 +123,13 @@
</div>
</div>
</div><!-- end col -->
</div>
</div>
<!-- end row -->
<script>
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", function() {
const table = document.getElementById("tickets-table");
// Create custom dropdown
@ -205,46 +209,69 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown = null;
}
});
});
});
</script>
<script>
$(document).ready(function(){
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" ,
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [
// {
// extend: 'csv',
// text: 'CSV',
// title: 'PolicyTypeList',
// exportOptions: {
// columns: ':not(:last-child)'
// }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'PolicyTypeList',
exportOptions: {
columns: ':not(:last-child)'
}
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true ,
});
})
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
const btnExport = document.querySelector("#btnExport");
const tableElement = document.querySelector("#tickets-table");
btnExport.addEventListener("click", () => {
btnExport.addEventListener("click", () => {
const obj = new csvExport(tableElement);
const csvData = obj.exportCsv();
const blob = new Blob([csvData], { type: "text/csv" });
const blob = new Blob([csvData], {
type: "text/csv"
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
@ -254,10 +281,10 @@ btnExport.addEventListener("click", () => {
setTimeout(() => {
URL.revokeObjectURL(url);
}, 500);
});
});
class csvExport {
class csvExport {
constructor(table, header = true) {
this.table = table;
this.rows = Array.from(table.querySelectorAll("tr"));
@ -294,10 +321,10 @@ class csvExport {
data = /[",\n"]/.test(data) ? `"${data}"` : data;
return data;
}
}
}
function removePolciyType(element) {
function removePolciyType(element) {
Swal.fire({
title: "Are you sure?",
@ -319,7 +346,7 @@ function removePolciyType(element) {
contentType: false,
success: function(res) {
// console.log(res.status == true);
if(res){
if (res) {
if (res.status == true) {
toastr.success('Policy type removed successfully', 'success');
location.reload();
@ -328,7 +355,7 @@ function removePolciyType(element) {
}
}
},
error: function (xhr, status, error) {
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
$('.loader').fadeOut();
@ -340,8 +367,5 @@ function removePolciyType(element) {
});
}
}
</script>

View File

@ -1,8 +1,8 @@
<style>
body {
.multiselect-native-select {
body {
.multiselect-native-select {
position: relative;
/* bottom: 32px; */
select {
border: 0 !important;
@ -16,18 +16,17 @@ body {
left: 50%;
top: 30px;
}
}
}
.multiselect-container{
.multiselect-container {
width: 100% !important;
}
}
.multiselect-selected-text{
.multiselect-selected-text {
float: left !important;
}
}
}
}
</style>
<div id="policy_add">
@ -50,7 +49,11 @@ body {
<span class="title-text ">Policy Type</span>
</h4>
</div>
<ul class="nav nav-pills navtab-bg">
<div class="tab-wrapper position-relative">
<ul class="nav nav-pills navtab-bg" id="myTab">
<li class="nav-item d-flex justify-content-center align-items-center">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false"
class="nav-link px-3 py-2 active-tab active">
@ -65,7 +68,13 @@ body {
<span class="d-none d-sm-inline-block">Policies</span>
</a>
</li> -->
<li class="nav-item d-flex justify-content-center align-items-center">
<!-- Right Arrow -->
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<div class="tab-content">
<?php include('policy_type_basic_info.php'); ?>
<?php include('policies.php'); ?>
@ -81,10 +90,12 @@ body {
var check_policy_type_id = $('#policytype_General_PrimaryKey');
if(check_policy_type_id[0].value == '' || check_policy_type_id[0].value == null || check_policy_type_id[0].value == 0){
if (check_policy_type_id[0].value == '' || check_policy_type_id[0].value == null || check_policy_type_id[0].value == 0) {
$('#btnBranchAdd').hide();
toastr.warning('First Add the Policy Type!', 'warning',{timeOut: 2000});
}else{
toastr.warning('First Add the Policy Type!', 'warning', {
timeOut: 2000
});
} else {
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
@ -97,4 +108,3 @@ body {
policy_type_branch_contact();
});
</script>

View File

@ -1,7 +1,11 @@
<div class="row" id="pt_onboarding" style="position: relative; bottom: 25px; display:none;">
<div class="col-xl-12">
<div class="card-body">
<ul class="nav nav-pills navtab-bg">
<div class="tab-wrapper position-relative">
<ul class="nav nav-pills navtab-bg" id="myTab">
<li class="nav-item d-flex justify-content-center align-items-center">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item">
<a href="#form" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2 active" id="general_tab">
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
@ -26,7 +30,13 @@
<span class="d-none d-sm-inline-block">Vehicle Docs</span>
</a>
</li>
<li class="nav-item d-flex justify-content-center align-items-center">
<!-- Right Arrow -->
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<div class="tab-content">
<?php include('policy_transaction_inception_form.php'); ?>
<?php include('drive_file_upload.php'); ?>
@ -39,8 +49,7 @@
<script>
$(document).ready(function() {
$(document).ready(function() {
$('#kyc_tab').on('click', function(e) {
var ptId = $('#policy_tranction_primarykey').val();
@ -49,7 +58,7 @@ $(document).ready(function() {
e.preventDefault(); // Prevent the tab from opening
$('#g_drive_file_upload_sbt_btn').hide()
toastr.warning('Please create Policy before proceeding to File Upload.');
}else{
} else {
$('#g_drive_file_upload_sbt_btn').show()
}
});
@ -61,7 +70,7 @@ $(document).ready(function() {
e.preventDefault(); // Prevent the tab from opening
$('#btn_other_docs').hide()
toastr.warning('Please create Policy before proceeding to File Upload.');
}else{
} else {
$('#btn_other_docs').show()
}
});
@ -73,11 +82,9 @@ $(document).ready(function() {
e.preventDefault(); // Prevent the tab from opening
$('#vehicle_file_upload_sbt_btn').hide()
toastr.warning('Please create Policy before proceeding to File Upload.');
}else{
} else {
$('#vehicle_file_upload_sbt_btn').show()
}
});
});
});
</script>

View File

@ -1,23 +1,29 @@
<div class="row">
<div class="container-fluid-min">
<div class="col-xl-12">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
<div class="form-row">
<div class="form-group col-md-3" id="date_div">
<label>Date<span class="text-danger"></span></label>
<div id="reportrange" class="form-control"
<!-- <div id="reportrange" class="form-control"
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp;
<span></span> <i class="mdi mdi-menu-down"></i>
</div> -->
<div class="input-icon">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<input type="hidden" id="startDate" value=<?= $default_start ?>>
<input type="hidden" id="endDate" value=<?= $default_end ?>>
@ -68,19 +74,22 @@
</div>
</div>
</div>
</div>
<div id="report"></div>
</div>
<div id="report"></div>
<script>
let client_list = [];
let client_list = [];
$(document).ready(function() {
$(document).ready(function() {
getClientAndBranchAndPolicy();
$('#client_id').select2();
})
})
$(function() {
$(function() {
var start = $('#startDate').val();
var end = $('#endDate').val();
@ -89,7 +98,7 @@ $(function() {
var end = moment(end, 'DD/MM/YYYY');
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
@ -97,6 +106,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Next 7 Days': [moment(), moment().add(6, 'days')], // Next 7 Days
@ -111,11 +123,11 @@ $(function() {
}, cb);
cb(start, end);
});
});
// ----------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
function fetchReportPage() {
function fetchReportPage() {
var fromDate = $('#startDate').val();
var toDate = $('#endDate').val();
@ -155,12 +167,12 @@ function fetchReportPage() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
}
}
// ----------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------
//get client , branch, policy data
function getClientAndBranchAndPolicy() {
//get client , branch, policy data
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -180,10 +192,10 @@ function getClientAndBranchAndPolicy() {
console.error(status, error);
}
});
}
}
//append the clients data
function appendClients(data) {
//append the clients data
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -201,9 +213,9 @@ function appendClients(data) {
$('#client_id').append(option).select2();
});
}
}
$('#client_type').on('change', function() {
$('#client_type').on('change', function() {
var selectedClientType = $(this).val();
@ -232,5 +244,5 @@ $('#client_type').on('change', function() {
// Initialize or refresh Select2 for both dropdowns
$('#client_id').select2();
});
});
</script>

View File

@ -20,6 +20,21 @@ table.dataTable tbody td {
.right-align-input {
text-align: right;
}
.badge-container {
background: #F0F0F0;
padding: 6px 12px;
border-radius: 6px;
font-size: 14px;
display: inline-block;
}
#totals {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
</style>
<div class="col-12" id="second_page">
@ -32,14 +47,34 @@ table.dataTable tbody td {
</div>
<div class="table-responsive">
<div id="totals" style="margin-bottom: 10px;">
<strong>Total Premium:</strong> <span id="total_premium">0.00</span> |
<strong>Total Rewards:</strong> <span id="total_rewards">0.00</span> |
<strong>Total IRDA Revenue INR:</strong> <span id="total_irda">0.00</span> |
<strong>Total Billed Amount:</strong> <span id="total_billed">0.00</span> |
<strong>Total Unbilled Amount:</strong> <span id="total_unbilled">0.00</span> |
<strong>Total Policy Count:</strong> <span id="total_policy_count"><?= $policy_count ?></span>
</div>
<div id="totals" class="d-flex flex-wrap gap-2 mb-2">
<div class="badge-container">
Total Premium: <span class="text-primary" id="total_premium">0.00</span>
</div>
<div class="badge-container">
Total Rewards: <span class="text-primary" id="total_rewards">0.00</span>
</div>
<div class="badge-container">
Total IRDA Revenue INR: <span class="text-primary" id="total_irda">0.00</span>
</div>
<div class="badge-container">
Total Billed Amount: <span class="text-primary" id="total_billed">0.00</span>
</div>
<div class="badge-container">
Total Unbilled Amount: <span class="text-primary" id="total_unbilled">0.00</span>
</div>
<div class="badge-container">
Total Policy Count: <span class="text-primary"><?= $policy_count ?></span>
</div>
</div>
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
@ -82,25 +117,25 @@ table.dataTable tbody td {
<?php foreach($report_list as $index => $row){ ?>
<tr>
<td><?= $index + 1 ?></td>
<td><?php echo $row['user_name']; ?></td>
<td><?php echo $row['policy_issue_month']; ?></td>
<td><?php echo $row['revenue_type']; ?></td>
<td><?php echo $row['client_type']; ?></td>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['action_type']; ?></td>
<td><?php echo $row['policy_type']; ?></td>
<td><?php echo $row['bap']; ?></td>
<td><?php echo $row['vehicle_no'] ?? 'N.A'; ?></td>
<td><?php echo $row['policy_no']; ?></td>
<td><?php echo $row['endorsement_no']; ?></td>
<td><?php echo $row['insurer_name']; ?> </td>
<td><?php echo $row['insurer_branch_name']; ?></td>
<td><?php echo $row['user_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_issue_month'] ?: 'N/A'; ?></td>
<td><?php echo $row['revenue_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['client_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['client_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['action_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_type'] ?: 'N/A'; ?></td>
<td><?php echo $row['bap'] ?: 'N/A'; ?></td>
<td><?php echo $row['vehicle_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['policy_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['endorsement_no'] ?: 'N/A'; ?></td>
<td><?php echo $row['insurer_name'] ?: 'N/A'; ?> </td>
<td><?php echo $row['insurer_branch_name'] ?: 'N/A'; ?></td>
<td><?php echo $row['tpa_name']; ?></td>
<td><?php echo empty($row['endorse_eff_date']) ? '' : date('d/m/Y', strtotime($row['endorse_eff_date'])) ?></td>
<td><?php echo empty($row['policy_start_date']) ? '' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo empty($row['policy_end_date']) ? '' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<td><?php echo $row['ref']; ?></td>
<td><?php echo $row['remarks']; ?></td>
<td><?php echo empty($row['endorse_eff_date']) ? 'N/A' : date('d/m/Y', strtotime($row['endorse_eff_date'])) ?></td>
<td><?php echo empty($row['policy_start_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo empty($row['policy_end_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
<td><?php echo $row['ref'] ?: 'N/A'; ?></td>
<td><?php echo $row['remarks'] ?: 'N/A'; ?></td>
<td class="right-align-input"><?php echo $row['bp_amt']; ?></td>
<td class="right-align-input"><?php echo $row['tp_or_ter']; ?></td>
<td class="right-align-input"><?php echo $row['premium_wo_gst']; ?></td>
@ -227,10 +262,15 @@ $(document).ready(function() {
// }
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
title: 'Policy-Tranction-BDS-List',
exportOptions: {
columns: ':visible', // or specify exact columns [0,1,2,...]
@ -251,8 +291,9 @@ $(document).ready(function() {
},
{
extend: 'excel',
text: 'Excel',
title: 'Policy-Tranction-BDS-List',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
// customize: function (xlsx) {
// var sheet = xlsx.xl.worksheets['sheet1.xml'];
// var total = 0;
@ -360,14 +401,19 @@ $(document).ready(function() {
}
}
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
pageLength: 10, // Set default number of rows per page (optional)
ordering: false,
"footerCallback": function(row, data, start, end, display) {
var api = this.api();

View File

@ -1,25 +1,25 @@
<style>
.col-12 {
max-width: 98% !important;
}
</style>
<div class="row">
<div class="col-12" style="margin-top: -12px;">
<div class="container-fluid-min">
<div class="col-12" id="bds_filter">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<h4 class="m-1">
<span>Filter</span>
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-3">
<label for="client_branch">Client<span class="text-danger"></span></label>
<select class="form-control" id="client_id" name="client_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
@ -36,7 +36,7 @@
<div class="form-group col-md-3">
<label for="insurer_id"> Insurer <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()" >
<select class="form-control" id="insurer_id" name="insurer_id" onchange="getClientPolicyDataBasedOnClientAndInsuer()">
<option value="0" selected>Select Insurer</option>
</select>
</div>
@ -64,7 +64,7 @@
<div class="form-group col-md-3">
<label for="client_policy_id"> Client Policy <span id="base_danger" class="text-danger"></span></label>
<select class="form-control" id="client_policy_id" name="client_policy_id" >
<select class="form-control" id="client_policy_id" name="client_policy_id">
<option value="0" selected>Select client policy</option>
</select>
</div>
@ -85,7 +85,7 @@
<div class="form-group col-md-3">
<label for="user_id">Users<span class="text-danger"></span></label>
<select class="form-control" id="user_id" name="user_id" >
<select class="form-control" id="user_id" name="user_id">
<option value="0">Select user</option>
<?php
if (isset($users) && count($users)) {
@ -113,9 +113,9 @@
<div class="form-group col-md-3" style="display: none;" id="date_div">
<label>Date<span class="text-danger"></span></label>
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp;
<span></span> <i class="mdi mdi-menu-down"></i>
<div class="input-icon">
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
</div>
<input type="hidden" id="startDate">
<input type="hidden" id="endDate">
@ -141,24 +141,27 @@
</div>
</div>
</div>
<!-- end page title -->
<div id="file_list">
<?php include('report_bds.php'); ?>
</div>
</div>
<!-- end page title -->
<div class="row" id="file_list">
<?php include('report_bds.php'); ?>
</div>
<script>
let client_list = [];
let branch_list = [];
let policy_list = [];
let insurer_list = [];
let insurer_branch_list = [];
let client_list = [];
let branch_list = [];
let policy_list = [];
let insurer_list = [];
let insurer_branch_list = [];
$(document).ready(function() {
$(document).ready(function() {
getClientAndBranchAndPolicy()
getURLParams()
@ -170,10 +173,9 @@ $(document).ready(function() {
$('#client_policy_id').select2();
$('#user_id').select2();
})
})
function fetchEmpolyeeList(event)
{
function fetchEmpolyeeList(event) {
event.preventDefault(); // Prevent default action
var start_date = $('#startDate').val();
@ -209,15 +211,13 @@ function fetchEmpolyeeList(event)
const apiURL = $('#get-emp-list').attr('href') + "?" + queryString;
console.log(apiURL);
window.location.href = apiURL;
}
}
function objectToQueryString(obj)
{
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
}
}
function getURLParams()
{
function getURLParams() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -252,7 +252,7 @@ function getURLParams()
console.log('End Date:', endDate);
if (startDate != 0 && endDate != 0) {
setTimeout(function(){
setTimeout(function() {
$('#start_date').val(startDate)
$('#end_date').val(endDate)
$('#client_id').val(client_id).select2()
@ -261,20 +261,20 @@ function getURLParams()
$('#policy_type_id').val(policy_type_id).select2()
$('#date_type').val(date_type).trigger('change');
$('#issuer').val(issuer)
setTimeout(function(){
setTimeout(function() {
$('#client_branch_id').val(client_branch_id).select2()
$('#insurer_branch_id').val(insurer_branch_id).select2()
setTimeout(function(){
setTimeout(function() {
$('#client_policy_id').val(client_policy_id).select2();
}, 1000);
}, 2000)
},1000)
}, 1000)
}
}
}
$(function() {
$(function() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
@ -291,7 +291,7 @@ $(function() {
// var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
$('#startDate').val(start.format('DD-MM-YYYY'));
$('#endDate').val(end.format('DD-MM-YYYY'));
}
@ -299,6 +299,9 @@ $(function() {
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
locale: {
format: 'DD-MM-YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
@ -326,28 +329,26 @@ $(function() {
cb(start, end); // Update the displayed date range
});
});
});
function hideDateField(input = null)
{
function hideDateField(input = null) {
let val = $('#date_type').val();
if(input){
if (input) {
val = input;
}
if(val != 0){
if (val != 0) {
$('#date_div').show()
}else{
} else {
$('#date_div').hide()
}
}
}
// -----------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy()
{
//featch client, client branch, insurer, insurer branch and client policy list data
function getClientAndBranchAndPolicy() {
$.ajax({
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
type: "GET",
@ -355,7 +356,7 @@ function getClientAndBranchAndPolicy()
success: function(res) {
console.log('getClientAndBranchAndPolicy', res);
if(res.status == true){
if (res.status == true) {
client_list = res.client_data;
branch_list = res.branch_data;
policy_list = res.policy_data;
@ -363,7 +364,7 @@ function getClientAndBranchAndPolicy()
insurer_branch_list = res.insurer_branch_data;
appendClients(res.client_data);
appendInsurer(res.insurer_data);
}else{
} else {
console.log('No data found');
}
@ -373,11 +374,10 @@ function getClientAndBranchAndPolicy()
console.error(status, error);
}
});
}
}
//append clients for filter
function appendClients(data)
{
//append clients for filter
function appendClients(data) {
$('#client_id').empty();
$('#client_id').append($('<option>', {
@ -397,11 +397,10 @@ function appendClients(data)
$('#client_id').append(option);
});
}
}
//append clients branch for filter
function appendBranch(data)
{
//append clients branch for filter
function appendBranch(data) {
$('#client_branch_id').empty();
@ -418,11 +417,10 @@ function appendBranch(data)
});
$('#client_branch_id').append(option);
});
}
}
//append insurer for filter
function appendInsurer(data)
{
//append insurer for filter
function appendInsurer(data) {
$('#insurer_id').empty();
$('#insurer_id').append($('<option>', {
@ -439,11 +437,10 @@ function appendInsurer(data)
$('#insurer_id').append(option);
});
}
}
//append insurer branch for filter
function appendInsurerBranch(data)
{
//append insurer branch for filter
function appendInsurerBranch(data) {
$('#insurer_branch_id').empty();
@ -460,11 +457,10 @@ function appendInsurerBranch(data)
});
$('#insurer_branch_id').append(option);
});
}
}
//append client policy for filter
function appendPolicies(data)
{
//append client policy for filter
function appendPolicies(data) {
// console.log('appendPolicies', data);
// console.log('appendPolicies', $('#client_policy_id'));
@ -481,19 +477,19 @@ function appendPolicies(data)
});
$('#client_policy_id').append(option);
});
}
}
// -------------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------
//client branch and insurer branch onchange document ready function
$(document).ready(function(){
//client branch and insurer branch onchange document ready function
$(document).ready(function() {
$('#client_id').change(function(){
$('#client_id').change(function() {
let client_id = $(this).val();
console.log('client_id', client_id);
if(branch_list != '') {
if (branch_list != '') {
// console.log(branch_list[client_id]);
let data = branch_list[client_id];
appendBranch(data);
@ -501,12 +497,12 @@ $(document).ready(function(){
})
$('#insurer_id').change(function(){
$('#insurer_id').change(function() {
let insurer_id = $(this).val();
console.log('insurer_id', insurer_id);
if(insurer_branch_list != '') {
if (insurer_branch_list != '') {
// console.log(insurer_branch_list[insurer_id]);
let data = insurer_branch_list[insurer_id];
appendInsurerBranch(data);
@ -514,10 +510,10 @@ $(document).ready(function(){
})
});
});
//get policy list based on the client, client_branch, insurer, insurer_branch and policy type
function getClientPolicyDataBasedOnClientAndInsuer(){
//get policy list based on the client, client_branch, insurer, insurer_branch and policy type
function getClientPolicyDataBasedOnClientAndInsuer() {
let client_id = $('#client_id').val() ?? 0;
let client_branch_id = $('#client_branch_id').val() ?? 0;
@ -550,18 +546,17 @@ function getClientPolicyDataBasedOnClientAndInsuer(){
console.error(xhr.responseText);
});
}
}
//for the change title
function changeTitle(input){
//for the change title
function changeTitle(input) {
let val = $(input).val();
if(val == 'statement_month'){
if (val == 'statement_month') {
$('#bds_title').text(' - Statement Month Wise List')
}else{
} else {
$('#bds_title').text(' - Policy Wise List')
}
}
}
</script>

View File

@ -193,7 +193,7 @@ $(document).ready(function() {
searchPlaceholder: "Search..."
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
pageLength: 10, // Set default number of rows per page (optional)
ordering: false,
});
} else {

View File

@ -12,12 +12,16 @@
position: relative;
left: 79px;
}
.emp_data_model {
font-size: 17px; /* keep fixed size */
font-size: 17px;
/* keep fixed size */
color: #555 !important;
cursor: pointer;
transition: transform 0.2s, color 0.2s; /* smooth hover effect */
display: inline-block; /* important for transform */
transition: transform 0.2s, color 0.2s;
/* smooth hover effect */
display: inline-block;
/* important for transform */
}
.emp_data_model:hover {
@ -26,17 +30,19 @@
}
</style>
<div class="container-fluid">
<h2>Retail Endorsement</h2>
<div class="container-fluid-min">
<div class="row">
<div class="col-xl-12">
<div class="card-body">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne" aria-expanded="true">
<h4>
Filter
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
</h4>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<!-- <div class="text-center"> -->
@ -89,6 +95,8 @@
</div>
</div>
</div>
</div>
</div>
<div class="row" id="client_list">
@ -103,17 +111,17 @@
<table data-custom-table-css="table" class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th class="font-weight-medium">SNO</th>
<th class="font-weight-medium">Policy number</th>
<th class="font-weight-medium">Endorsement Number</th>
<th class="font-weight-medium">Description</th>
<th class="font-weight-medium">Client</th>
<th class="font-weight-medium">Insurer name</th>
<th class="font-weight-medium">Agent</th>
<th class="font-weight-medium">Mananger</th>
<th class="font-weight-medium">Created At</th>
<th class="font-weight-medium">Status</th>
<th class="font-weight-medium">Action</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<th class="font-weight-medium">Policy number&nbsp;</th>
<th class="font-weight-medium">Endorsement Number&nbsp;</th>
<th class="font-weight-medium">Description&nbsp;</th>
<th class="font-weight-medium">Client&nbsp;</th>
<th class="font-weight-medium">Insurer name&nbsp;</th>
<th class="font-weight-medium">Agent&nbsp;</th>
<th class="font-weight-medium">Mananger&nbsp;</th>
<th class="font-weight-medium">Created At&nbsp;</th>
<th class="font-weight-medium">Status&nbsp;</th>
<th class="font-weight-medium">Action&nbsp;</th>
</tr>
</thead>
@ -126,8 +134,8 @@
<td class="text-center"><?php echo $employee['policy_number'] ?></td>
<td class="text-center"><?php echo $employee['endorsement_no'] ?></td>
<td class="text-center"><?php echo $employee['endorsement_description'] ?></td>
<td class="text-center"><?php echo $employee['client_name'] ? $employee['client_name'] .' ( '. $employee['client_short_name'] .' ) ' : 'N/A' ?></td>
<td class="text-center"><?php echo $employee['insurer_name'] ? $employee['insurer_name'] .' ( '. $employee['insurer_short_name'] .' ) ' : 'N/A' ?></td>
<td class="text-center"><?php echo $employee['client_name'] ? $employee['client_name'] . ' ( ' . $employee['client_short_name'] . ' ) ' : 'N/A' ?></td>
<td class="text-center"><?php echo $employee['insurer_name'] ? $employee['insurer_name'] . ' ( ' . $employee['insurer_short_name'] . ' ) ' : 'N/A' ?></td>
<td class="text-center"><?php echo $employee['agent_name'] ?? 'N/A' ?></td>
<td class="text-center"><?php echo $employee['manager_name'] ?? 'N/A' ?></td>
<td class="text-center"><?php if (!empty($employee['created_at'])):
@ -163,7 +171,7 @@
<div class="modal fade app-text-black " id="centermodal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
<div class="modal fade font-color-black " id="centermodal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<form id="retailEndorsementForm">
@ -176,7 +184,7 @@
<div class="form-row">
<input type="hidden" id="edit_id" name="id">
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
<div class="form-group col-md-12">
@ -260,7 +268,7 @@
var eno = $(this).data('eno');
var status = $(this).data('status');
// console.log(val);
fetchRetailEndorsementData(id,eno,status)
fetchRetailEndorsementData(id, eno, status)
});
@ -311,7 +319,7 @@
});
}
function fetchRetailEndorsementData(id,eno,status) {
function fetchRetailEndorsementData(id, eno, status) {
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
@ -332,26 +340,49 @@
$(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'Retail-Endorsement-List',
// className: 'my_class',
// exportOptions: {
// columns: ':not(:last-child)',
// format: {
// body: function (data, row, column, node) {
// // Convert data to string to avoid scientific notation in CSV
// if (!isNaN(data) && parseFloat(data) > 1e20) {
// return `'${data}`;
// }
// return data.toString();// Ensures all data is treated as strings
// }
// }
// }
// }],
buttons: [{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Retail-Endorsement-List',
className: 'my_class',
exportOptions: {
columns: ':not(:last-child)',
format: {
body: function (data, row, column, node) {
body: function(data, row, column, node) {
// Convert data to string to avoid scientific notation in CSV
if (!isNaN(data) && parseFloat(data) > 1e20) {
return `'${data}`;
}
return data.toString();// Ensures all data is treated as strings
return data.toString(); // Ensures all data is treated as strings
}
}
}
}, ]
}],
initComplete: function(settings, json) {
$('.my_class').css({
@ -360,13 +391,19 @@
});
},
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
// pagingType: 'full_numbers'
columnDefs: [
{ type: 'scientific', targets: 0 } // Apply custom sorting type to the first column
columnDefs: [{
type: 'scientific',
targets: 0
} // Apply custom sorting type to the first column
],
});

View File

@ -130,21 +130,21 @@
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="incept_emp_count" class="emp_title"> No of Employees at Inception <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['incept_emp_count']) ? $lead_edit_data['incept_emp_count'] : '' ?>" type="text" class="form-control" id="incept_emp_count" name="incept_emp_count[]"
placeholder="Enter Lives" required oninput="calculateTotalLives(this)">
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="incept_dept_count" class="depnd_title"> No of Dependents at Inception <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['incept_dept_count']) ? $lead_edit_data['incept_dept_count'] : '' ?>" type="text" class="form-control" id="incept_dept_count" name="incept_dept_count[]"
placeholder="Enter Lives" required oninput="calculateTotalLives(this)">
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="incept_no_of_lives" class="total_title"> Total Lives at Inception <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['incept_no_of_lives']) ? $lead_edit_data['incept_no_of_lives'] : '' ?>" type="text" class="form-control" id="incept_no_of_lives" name="incept_no_of_lives[]"
@ -155,20 +155,20 @@
<div class="form-row">
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="exp_emp_count"> No of Employees at Expiry <span class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['exp_emp_count']) ? $lead_edit_data['exp_emp_count'] : '' ?>" type="text" class="form-control" id="exp_emp_count" name="exp_emp_count[]"
placeholder="Enter Lives">
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="exp_dept_count"> No of Dependents at Expiry <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['exp_dept_count']) ? $lead_edit_data['exp_dept_count'] : '' ?>" type="text" class="form-control" id="exp_dept_count" name="exp_dept_count[]"
placeholder="Enter Lives">
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="exp_no_of_lives"> Total Lives at Expiry <span class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['exp_no_of_lives']) ? $lead_edit_data['exp_no_of_lives'] : '' ?>" type="text" class="form-control" id="exp_no_of_lives" name="exp_no_of_lives[]"
placeholder="Enter Lives">
@ -178,21 +178,21 @@
<div class="form-row">
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="renewal_emp_count"> No of Employees at Renewal <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['renewal_emp_count']) ? $lead_edit_data['renewal_emp_count'] : '' ?>" type="text" class="form-control" id="renewal_emp_count" name="renewal_emp_count[]"
placeholder="Enter Lives">
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="renewal_dept_count"> No of Dependents at Renewal <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['renewal_dept_count']) ? $lead_edit_data['renewal_dept_count'] : '' ?>" type="text" class="form-control" id="renewal_dept_count" name="renewal_dept_count[]"
placeholder="Enter Lives">
</div>
<div class="form-group col-md-3 renewalFields" style="display: none;">
<div class="form-group col-md-4 renewalFields" style="display: none;">
<label for="renewal_no_of_lives"> Total Lives at Renewal <span
class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['renewal_no_of_lives']) ? $lead_edit_data['renewal_no_of_lives'] : '' ?>" type="text" class="form-control" id="renewal_no_of_lives" name="renewal_no_of_lives[]"

View File

@ -2,32 +2,32 @@
<div class="form-row" >
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="incept_emp_count" class="emp_title"> No of Employees at Inception <span class="text-danger">*</span></label>
<input value="<?= isset($lead_edit_data['incept_emp_count']) ? $lead_edit_data['incept_emp_count'] : '' ?>" type="text" class="form-control" id="incept_emp_count" name="incept_emp_count[]" placeholder="Enter Lives" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="total_lives_at_incept" class="total_title"> Total Lives at Inception <span class="text-danger"></span></label>
<input value="<?= isset($lead_edit_data['total_lives_at_incept']) ? $lead_edit_data['total_lives_at_incept'] : '' ?>" type="text" class="form-control" id="total_lives_at_incept" name="total_lives_at_incept[]" placeholder="Enter Lives" disabled>
</div>
<div class="form-group col-md-3 renewalFields">
<div class="form-group col-md-4 renewalFields">
<label for="total_si_at_incept"> Total Sum Insured at Inception <span class="text-danger">*</span></label>
<input value="<?= isset($lead_edit_data['total_si_at_incept']) ? $lead_edit_data['total_si_at_incept'] : '' ?>" type="text" class="form-control" id="total_si_at_incept" name="total_si_at_incept[]" placeholder="Enter Sum Insured" required>
</div>
<div class="form-group col-md-3 renewalFields">
<div class="form-group col-md-4 renewalFields">
<label for="premium_at_incept"> Premium at inception <span class="text-danger">*</span></label>
<input value="<?= isset($lead_edit_data['premium_at_incept']) ? $lead_edit_data['premium_at_incept'] : '' ?>" type="text" class="form-control" id="premium_at_incept" name="premium_at_incept[]" placeholder="Enter Premium" required>
</div>
<div class="form-group col-md-3 renewalFields">
<div class="form-group col-md-4 renewalFields">
<label for="renewal_emp_count"> No of Employees at Renewal <span class="text-danger">*</span></label>
<input value="<?= isset($lead_edit_data['renewal_emp_count']) ? $lead_edit_data['renewal_emp_count'] : '' ?>" type="text" class="form-control" id="renewal_emp_count" name="renewal_emp_count[]" placeholder="Enter Lives" >
</div>
<div class="form-group col-md-3 renewalFields">
<div class="form-group col-md-4 renewalFields">
<label for="total_si_at_renewal"> Total Sum Insured at Renewal <span class="text-danger">*</span></label>
<input value="<?= isset($lead_edit_data['total_si_at_renewal']) ? $lead_edit_data['total_si_at_renewal'] : '' ?>" type="text" class="form-control" id="total_si_at_renewal" name="total_si_at_renewal[]" placeholder="Enter Sum Insured" >
</div>

View File

@ -12,36 +12,71 @@ $increment = 1;
?>
<div class="form-row d-flex align-items-end" id="fileField_<?= $displayIndex ?>">
<div class="form-group row" style="width: 100%;">
<input type="hidden" name="leads_file_id[]" value="<?= htmlspecialchars($value['id']) ?>" id="file_id_<?= $displayIndex ?>">
<div class="form-group col-md-5">
<label>Document Name</label>
<div class="col-auto" style="align-content: center;">
<label class="col-form-label">Document Name</label>
</div>
<div class="col-md-3">
<input type="text" class="form-control" name="docs_name_<?= $increment ?>[]"
placeholder="<?= $placeholder ?>"
placeholder="<?= $placeholder ?>" style="background: #F5FFFF !important;"
value="<?= htmlspecialchars($value['docs_name']) ?>" id="docs_name_<?= $displayIndex ?>">
</div>
<div class="form-group col-md-5">
<div class="col-auto" style="align-content: center;">
<label>
File Upload<br>
<small id="file_name_display_<?= $displayIndex ?>" class="text-muted">
<?= !empty($value['file_name']) ? htmlspecialchars($value['file_name']) : 'No file chosen' ?>
</small>
</label>
<input type="file" class="form-control" id="file_name_<?= $displayIndex ?>"
name="file_name_<?= $increment ?>[]" accept="<?= $accept ?>"
onchange="showFileName(this, <?= $displayIndex ?>)">
</div>
<div class="col-md-2" style="position: relative; bottom: 16px;">
<button type="button" class="btn btn-danger" onclick="removeFileField(<?= $displayIndex ?>, <?= htmlspecialchars($value['id']) ?>)">x</button>
<button type="button" class="btn btn-primary" onclick="addFileField(<?= $increment ?>)">+</button>
<div class="col-md-3">
<div class="input-icon">
<input type="file" class="form-control" id="file_name_<?= $displayIndex ?>" name="file_name_<?= $increment ?>[]" accept="<?= $accept ?>" onchange="showFileName(this, <?= $displayIndex ?>)" style="background: #F5FFFF !important;">
<i class="mdi mdi-upload additional-icon"></i>
</div>
</div>
<?php } } else { ?>
<div class="col-auto">
<button type="button" class="btn btn-danger" onclick="removeFileField(<?= $displayIndex ?>, <?= htmlspecialchars($value['id']) ?>)"><span class="mdi mdi-trash-can"></span></button>
<button type="button" class="btn app-btn-secondary" onclick="addFileField(<?= $increment ?>)">+</button>
</div>
</div>
</div>
<?php } }else { ?>
<!-- Default field if no file data exists -->
<div class="form-row d-flex align-items-end" id="fileField_1">
<div class="form-group row" style="width: 100%;">
<input type="hidden" name="leads_file_id[]" value="">
<div class="col-auto" style="align-content: center;">
<label class="col-form-label">Document Name</label>
</div>
<div class="col-md-3">
<input type="text" class="form-control" name="docs_name_1[]"
placeholder="First file must be Demography." id="docs_name_1" style="background: #F5FFFF !important;">
</div>
<div class="col-auto" style="align-content: center;">
<label>File Upload<br>
<small id="file_name_display_1" class="text-muted">No file chosen</small></label>
</div>
<div class="col-md-3">
<div class="input-icon">
<input type="file" class="form-control" id="file_name_1"
name="file_name_1[]" accept=".xls,.xlsx" onchange="showFileName(this, 1)" style="background: #F5FFFF !important;">
<i class="mdi mdi-upload additional-icon"></i>
</div>
</div>
<div class="col-auto">
<button type="button" class="btn btn-danger" onclick="removeFileField(1, '')"><span class="mdi mdi-trash-can"></span></button>
<button type="button" class="btn app-btn-secondary" onclick="addFileField(1)">+</button>
</div>
</div>
</div>
<!-- <div class="form-row d-flex align-items-end" id="fileField_1">
<input type="hidden" name="leads_file_id[]" value="">
<div class="form-group col-md-5">
@ -63,5 +98,5 @@ $increment = 1;
<button type="button" class="btn btn-danger" onclick="removeFileField(1, '')">x</button>
<button type="button" class="btn btn-primary" onclick="addFileField(1)">+</button>
</div>
</div>
</div> -->
<?php } ?>

View File

@ -8,10 +8,7 @@
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
@ -103,21 +100,45 @@
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'TAT BAND WISE DATA',
// },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'TAT BAND WISE DATA',
// }
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'TAT BAND WISE DATA',
},
{
extend: 'excel',
text: 'Excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
className: 'app-btn-primary ',
title: 'TAT BAND WISE DATA',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 10, // Set default number of rows per page (optional)

View File

@ -138,22 +138,22 @@ th:first-child, td:first-child {
<table data-custom-table-css="table" class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th><input type="checkbox" id="selectAll" onclick="toggleAll(this)"></th>
<th class="font-weight-medium">SNO</th>
<th><input type="checkbox" id="selectAll" onclick="toggleAll(this)">&nbsp;</th>
<th class="font-weight-medium">S.No&nbsp;</th>
<?php if (isset($getData)) {
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
<th class="font-weight-medium">Client/Branch</th>
<th class="font-weight-medium">Client/Branch&nbsp;</th>
<?php }
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
<th class="font-weight-medium">Branch</th>
<th class="font-weight-medium">Branch&nbsp;</th>
<?php } } ?>
<th class="font-weight-medium">Name</th>
<th class="font-weight-medium">EMP Code</th>
<th class="font-weight-medium">Relationship</th>
<th class="font-weight-medium">Gender</th>
<th class="font-weight-medium">Date of Birth</th>
<th class="font-weight-medium">Existing Policy Count</th>
<th class="font-weight-medium">Name&nbsp;</th>
<th class="font-weight-medium">EMP Code&nbsp;</th>
<th class="font-weight-medium">Relationship&nbsp;</th>
<th class="font-weight-medium">Gender&nbsp;</th>
<th class="font-weight-medium">Date of Birth&nbsp;</th>
<th class="font-weight-medium">Existing Policy Count&nbsp;</th>
<!-- <th class="font-weight-medium">Policy name</th>
<th class="font-weight-medium">Insurer name</th>
<th class="font-weight-medium">TPA ID</th>
@ -557,8 +557,12 @@ document.addEventListener("DOMContentLoaded", function () {
className:"unmapEmployees"
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)

View File

@ -1,21 +1,29 @@
<style>
.table th,
.table td {
padding: 8px;
}
table.dataTable tbody td {
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.right-align-input {
text-align: right;
.dataTables_filter {
position: absolute;
}
.text-custom {
font-weight: 400;
font-style: normal;
font-size: 11px;
line-height: 1.44;
letter-spacing: -0.02em;
.column-header {
margin-right: 10px;
}
.btn {
font-size: 0.9rem;
padding: 0.5rem 1rem;
}
</style>
@ -27,74 +35,65 @@
color: #6c757d !important;
}
table.dataTable td.wrap {
white-space: normal !important;
word-break: break-word;
}
</style>
<div class="col-12">
<div class="row" id="ticket_list">
<div class="col-12">
<div class="card">
<div class="card-body maincard">
<div class="row">
<div class="col-6" style="align-self: center;">
<p class="title-text font-color-black" style="position: relative;">Tickets </p>
</div>
</div>
<div class="card-body">
<div>
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head">
<div class="table-responsive">
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
<thead class="bg-light">
<tr>
<th>Ticket ID</th>
<th class="app-text-left">Name</th>
<th>Policy Number</th>
<th>Ticket Type</th>
<th>Subject</th>
<th>Status</th>
<th class="app-text-left">Assign To</th>
<th>Created At</th>
<th>Updated At</th>
<th><div class="column-header">Ticket ID&nbsp;</div></th>
<th class="text-left"><div class="column-header">Name &nbsp;</div></th>
<th><div class="column-header">Policy Number &nbsp;</div></th>
<th><div class="column-header">Ticket Type &nbsp;</div></th>
<th><div class="column-header">Subject &nbsp;</div></th>
<th><div class="column-header">Status &nbsp;</div></th>
<th class="text-left"><div class="column-header">Assign To &nbsp;</div></th>
<th><div class="column-header">Created At &nbsp;</div></th>
<th><div class="column-header">Updated At &nbsp;</div></th>
</tr>
</thead>
<tbody class="app-table-body">
<?php if (isset($ticket_data)) { ?>
<?php foreach($ticket_data as $index => $row){ ?>
<tbody class="app-table-body">
<?php if(isset($ticket_data)) { ?>
<?php foreach($ticket_data as $index => $row){ ?>
<tr data-id="<?= $row['thz_id']; ?>" style="cursor: pointer;">
<td class="app-text-right"><?php echo $row['thz_id']; ?></td>
<td class="app-text-left">
<?php echo $row['name']; ?>
<td class="text-center"><?php echo $row['thz_id']; ?></td>
<td class="text-left"><?php echo $row['name']; ?>
<span class="text-custom-grey"><?php if (!empty($row['empcode'])): echo '('.$row['empcode'].')'; endif; ?></span><br>
<span class="text-custom-grey"><?php if (!empty($row['mobile'])): echo $row['mobile']; endif; ?></span>
</td>
<td class="app-text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
<td class="text-center"><?php echo (!empty($row['policy_no']) && strtolower($row['policy_no']) !== 'null')
? $row['policy_no']
: 'N/A'; ?>
</td>
<td class="app-text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : '-'; ?></td>
<td class="app-text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
<td class="text-center"><?php echo $row['ticket_type'] ? $row['ticket_type'] : 'N/A'; ?></td>
<td class="text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
<?php
$subject = $row['subject'] ? $row['subject'] : 'N/A';
echo (strlen($subject) > 50)
? htmlspecialchars(substr($subject, 0, 50)) . "..."
echo (strlen($subject) > 18)
? htmlspecialchars(substr($subject, 0, 18)) . "..."
: htmlspecialchars($subject);
?>
</td>
<td class="app-text-center"><?php echo $row['status'] ? $row['status'] : '-' ; ?></td>
<td class="app-text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : '-'; ?></td>
<td class="app-text-left">
<td class="text-center"><?php echo $row['status'] ? $row['status'] : 'N/A' ; ?></td>
<td class="text-left"><?php echo $row['assignee_name'] ? $row['assignee_name'] : 'N/A'; ?></td>
<td class="text-left">
<?php if (!empty($row['created_at'])):
$cd = date("j F Y", strtotime($row['created_at']));
$cd = date("j M Y", strtotime($row['created_at']));
$ct = date("h:i a", strtotime($row['created_at']));
echo $cd . "<br><span class='time'> " . $ct . "</span>";
endif;
?>
</td>
<td class="app-text-left">
<td class="text-left">
<?php if (!empty($row['updated_at'])):
$ud = date("j F Y", strtotime($row['updated_at']));
$ud = date("j M Y", strtotime($row['updated_at']));
$ut = date("h:i a", strtotime($row['updated_at']));
echo $ud . "<br><span class='time'> " . $ut . "</span>";
endif;
@ -102,15 +101,19 @@ table.dataTable td.wrap {
</td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<td colspan="9" class="text-center">No data available</td>
</tr>
<?php } ?>
</tbody>
</table>
<div>
</table>
</div>
</div>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<div class="modal fade " id="ticketModal" tabindex="-1" role="dialog" aria-hidden="true">
@ -244,7 +247,7 @@ table.dataTable td.wrap {
<!-- <div class="form-group col-md-12 ">
<label for="subject">Subject<span class="text-danger">*</span></label>
<small id="subjectCounter" class="form-text text-muted app-text-right">0/150</small>
<small id="subjectCounter" class="form-text text-muted text-right">0/150</small>
</div> -->
<div class="form-group col-md-12 ">
<div class="d-flex justify-content-between">
@ -257,7 +260,7 @@ table.dataTable td.wrap {
<div class="form-group col-md-12 ">
<div class="d-flex justify-content-between">
<label for="message">Message<span class="text-danger">*</span></label>
<small id="messageCounter" class="form-text text-muted text-end app-text-right">0/1500</small>
<small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small>
</div>
<!-- <input type="text" class="form-control" id="message" name="message" placeholder="Enter Message"> -->
<textarea class="form-control" id="message" name="message" placeholder="Enter Message" rows="3" required maxlength="1500"></textarea>
@ -306,8 +309,69 @@ table.dataTable td.wrap {
</div>
<script>
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#tickets-table');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
openTicket();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Tickets',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
title: 'Tickets'
}
]
}
],
language: {
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true,
pageLength: 10,
order: [[0, 'desc']]
});
} else {
console.error("Table not found.");
}
});
function openTicket(){
var form = document.getElementById('ticketForm');
form.reset();
@ -344,8 +408,8 @@ table.dataTable td.wrap {
var ticketType = document.getElementById('ticket_type').value.trim();
// Validation checks
if (name === "" || mobile === "" || email === "" || ticketType === "") {
toastr.warning('Please fill all required fields.', 'Warning');
if (message.length === 0) {
toastr.error('Message cannot be empty', 'Warning');
form.classList.add('was-validated');
return;
}
@ -356,6 +420,12 @@ table.dataTable td.wrap {
return;
}
if (subject.length === 0) {
toastr.error('Subject cannot be empty', 'Warning');
form.classList.add('was-validated');
return;
}
if (subject.length > 150) {
toastr.error('Subject cannot exceed 150 characters', 'Warning');
form.classList.add('was-validated');
@ -376,6 +446,12 @@ table.dataTable td.wrap {
return;
}
if (name === "" || mobile === "" || email === "" || ticketType === "" || subject === "" || message === "") {
toastr.warning('Please fill all required fields.', 'Warning');
form.classList.add('was-validated');
return;
}
var form = document.getElementById("ticketForm"); // your form ID
var formData = new FormData(form);
@ -583,53 +659,6 @@ $(document).ready(function() {
$("#modal_assignee").select2();
hideandshowpolicy();
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
buttons: [
{
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Create New Ticket </span>',
className: 'btn app-btn-primary mr-2',
action: function(e, dt, node, config) {
openTicket();
}
},
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary ',
}
]
}
],
paging: true,
pageLength: 25,
order: [[0, 'desc']]
});
} else {
console.error("Table Not found.");
}
const subjectInput = document.getElementById("subject");
const subjectCounter = document.getElementById("subjectCounter");

View File

@ -1,5 +1,4 @@
<style>
.notes-box {
display: flex;
align-items: center;
@ -15,6 +14,10 @@
resize: none;
padding: 8px;
font-size: 14px;
background-color: transparent !important;
border-radius: 0px !important;
box-shadow: 0px 0px 0px 0px transparent !important;
border-color: transparent !important;
}
.icon-buttons {
@ -72,10 +75,12 @@
.conversation-card,
.conversation-card .card-header,
.conversation-card .card-body {
background: #F5FFFF !important;
}
.conversation-card{
box-shadow: 0 2px 4px 0 #00000040;
border-radius : 15px !important;
}
.master-card{
border-radius: 15px !important;
box-shadow: 0 2px 4px 0 #00000040;
@ -129,33 +134,24 @@ hr{
}
</style>
<div class="row" id="notespage">
<h3 class="secondary-title">
<a href="#" onclick="history.back(); return false;">
<i class="mdi mdi-chevron-left" title="Back"></i>
</a>
<span>Ticket ID - <?= $master[0]['thz_id']; ?></span>
</h3>
<div class="col-12">
<div class="card ">
<div class="card-body maincard">
<!-- Title -->
<div class="row" id="notes-title" style="padding-bottom: 10px;">
<!-- <div class="col-6" style="align-self: center;">
<h4 style="position: relative;"><span onclick="history.back()"><i class="mdi mdi-chevron-left" style="font-size: 24px;"></i></span> Ticket ID-<?php echo $master[0]['thz_id']; ?></h4>
</div> -->
<h4 class="d-flex align-items-center" style="gap: 8px;">
<span onclick="history.back()" style="cursor: pointer;">
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
</span>
<span class="title-text ">Ticket ID-<?= $master[0]['thz_id']; ?></span>
</h4>
</div>
<!-- Body -->
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" id="notes-body">
<!-- Left Details -->
<div class="col-5" id="notes-body-left">
<div class="card master-card" style="background:#F5FFFF;">
<div class="card master-card" style="background:#F5FFFF; border-radius: 15px;">
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none;">
<p class="sub-title-text mb-0">Details</p>
<h3 class="mb-0">Details</h3>
<?php if($master[0]['status'] !== "Closed") : ?>
<a href="javascript:void(0);" onclick="openEditTicket()">
<i class="mdi mdi-pencil edit-icon" title="Edit"></i>
@ -168,26 +164,26 @@ hr{
</a>
<?php endif; ?>
</div>
<div class="card-body card-scroll sub-title-text " style="padding:0 27px !important; background:#F5FFFF;">
<div class="card-body card-scroll " style="padding:0 27px !important; background:#F5FFFF; border-radius: 15px !important;">
<div class="row mb-2 ml-o">
<div class="col-4 app-subtitle app-text-grey ">Ticket ID</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Name</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Mobile</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Policy Number</div>
<div class="col-8 app-text text-end app-text-black" style="font-weight: 500 !important;">
<div class="col-8 text-end font-color-black" style="font-weight: 500 !important;">
<?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null')
? '<u class="app-text-black">
? '<u class="font-color-black">
<a href="javascript:void(0);"
class="app-text-black"
class="font-color-black"
data-toggle="modal"
data-target="#PolicyModal"
title="Click to view Policy Terms"
@ -200,15 +196,15 @@ hr{
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Assigned To</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Status</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;">
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;">
<?= (!empty($master[0]['status']) && strtolower($master[0]['status']) !== 'null')
? '<u class="app-text-black">
? '<u class="font-color-black">
<a href="javascript:void(0);"
class="app-text-black"
class="font-color-black"
onclick="statusHistory('.$master[0]['thz_id'].')"
data-toggle="modal"
data-target="#StatusModal"
@ -221,19 +217,19 @@ hr{
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Ticket Type</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Subject</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Message</div>
<div class="col-8 app-text app-text-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div>
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div>
</div>
<div class="row mb-2">
<div class="col-4 app-subtitle app-text-grey ">Related Tickets</div>
<div class="col-8 app-text text-end " style="font-weight: 500 !important;">
<div class="col-8 text-end " style="font-weight: 500 !important;">
<u class="text-warning">
<a href="javascript:void(0);"
class="text-warning"
@ -251,24 +247,21 @@ hr{
</div>
</div>
</div>
<!-- Right Conversation -->
<div class="col-7">
<div class="col-7" id="notes-body-right">
<!-- Conversation Card -->
<div class="card mb-3 conversation-card">
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none; padding-bottom: 0px;">
<p class="sub-title-text app-text-black" >Conversation</p>
<div class="card mb-3 conversation-card" style="background:#F5FFFF; border-radius: 15px !important;">
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none; padding-bottom: 0px; border-radius: 15px !important;">
<h3 class="font-color-black" >Conversation</h3>
</div>
<div class="card-body recard-scroll" style="padding:0 27px !important; margin:0 !important; background:#F5FFFF;">
<div class="card-body recard-scroll" style="padding:0 27px !important; margin:0 !important; background:#F5FFFF; border-radius: 15px !important;">
<?php if(!empty($notes)): ?>
<?php foreach($notes as $i => $conv): ?>
<div style="border:none; padding: 0px; margin: 0px;">
<hr/>
<!-- Top Row: Message + Badge -->
<div class="d-flex justify-content-between align-items-start app-text app-text-black ">
<div class="d-flex justify-content-between align-items-start font-color-black ">
<p class="mb-1 ml-0 mr-0 " style="font-weight: 400 !important;"><?= $conv['notes'] ?></p>
<!-- <?php if(!empty($conv['notes_by'])): ?>
<span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span>
@ -313,24 +306,27 @@ hr{
<button type="button" class="btn-icon" onclick="submitConverstionTicket('External', this)"><i class="mdi mdi-email"></i></button>
</div>
</div>
<small id="messageCounter" class="form-text text-muted text-end app-text-right">0/1500</small>
<small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small>
</form>
</div>
</div>
</div> <!-- /notes-body -->
</div>
</div>
</div>
</div>
</div>
<div class="modal fade app-text-black " id="EditModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal fade font-color-black " id="EditModal" tabindex="-1" role="dialog" aria-hidden="true"
data-backdrop="static"
data-keyboard="false"
data-bs-backdrop="static"
data-bs-keyboard="false">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<form id="ticketForm">
<div class="modal-header">
<h4 class="modal-title title-text" id="EditModalLabel" style="font-size:27px !important">Update</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div>
<div class="modal-body">
@ -339,7 +335,7 @@ hr{
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
<div class="form-group col-md-12">
<label for="ticket_type" class="sub-title-text ">Ticket Type<span class="text-danger">*</span></label>
<label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
<select class="form-control" id="ticket_type" name="ticket_type" required>
<option value="">Select Ticket Type</option>
<!-- <option value="Sales">Sales</option>
@ -356,7 +352,7 @@ hr{
<div class="form-group col-md-12">
<label for="status" class="sub-title-text ">Status</label>
<label for="status">Status</label>
<select class="form-control" id="status" name="status">
<option value="">Select Status</option>
<option value="Open">Open</option>
@ -370,7 +366,7 @@ hr{
// 2,3,4 dropdown data'va varannum but dropdown hide pannanum -->
<?php if(in_array(get_role_id(), [1,5]) ) { ?>
<div class="form-group col-md-12">
<label for="assign_to" class="sub-title-text ">Assign To</label>
<label for="assign_to">Assign To</label>
<select class="form-control" id="assign_to" name="assign_to">
<option value="">Select Assign To</option>
<?php if(isset($assignee)) { ?>
@ -386,7 +382,7 @@ hr{
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn app-btn-secondary " onclick="submitTicket()">Save</button>
<button type="button" class="btn app-btn-secondary" onclick="submitTicket()">Save</button>
</div>
</form>
</div>
@ -399,7 +395,7 @@ hr{
<div class="modal-header" style="border-bottom-width:0;">
<h4 class="modal-title title-text " style="font-size:27px !important">Related Tickets</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div>
<div class="modal-body card-scroll" style="padding-top:5px!important;">
@ -446,7 +442,7 @@ hr{
<div class="modal-header" style="border-bottom-width:0;">
<h4 class="modal-title title-text ">Policy Terms</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div>
<div class="modal-body card-scroll" style="padding-top:5px!important;">
@ -471,7 +467,7 @@ hr{
<div class="modal-header" style="border-bottom-width:0;">
<h4 class="modal-title title-text ">Status History</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
</div>
<div class="modal-body card-scroll history-container" style="padding:5px 11px 11px 11px!important;">
@ -481,15 +477,12 @@ hr{
</div>
</div>
<script>
$(document).ready(function() {
// Initialize select2
$("#ticket_type").select2();
$("#status").select2();
$("#assign_to").select2();
$("#ticket_type, #status, #assign_to").select2();
const messageInput = document.getElementById("notes");
const messageCounter = document.getElementById("messageCounter");
@ -505,18 +498,33 @@ hr{
}
});
const btn = document.querySelector("button[onclick='submitTicket()']");
$("#ticket_type, #status, #assign_to").on('change', function() {
if (btn.disabled) {
btn.disabled = false;
btn.innerText = "Save";
}
});
});
function openEditTicket() {
var form = document.getElementById('ticketForm');
form.reset();
form.classList.remove('was-validated'); // remove Bootstrap validation styling
var btn = document.querySelector("button[onclick='submitTicket()']");
btn.disabled = false;
btn.innerText = "Save";
var masterData = <?= json_encode($master[0]); ?>;
console.log(masterData);
$("#edit_thz_id").val(masterData.thz_id);
// $("#updated_by").val("<?= get_session_userid(); ?>");
$("#ticket_type").val(masterData.ticket_type).trigger("change");
$("#status").val(masterData.status).trigger("change");
$("#assign_to").val(masterData.assign_to).trigger("change");
@ -633,13 +641,13 @@ function statusHistory(thzId) {
let table = `
<div class="table-responsive">
<table data-custom-table-css="table" class="table w-100 nowrap text-custom-black text-custom app-datatable">
<thead class="app-table-head">
<thead class="bg-light">
<tr>
<th class="app-text app-text-white">S.No</th>
<th class="app-text app-text-white">Old Status</th>
<th class="app-text app-text-white">New Status</th>
<th class="app-text app-text-white">Updated By</th>
<th class="app-text app-text-white">Date/Time</th>
<th class="app-text-white">S.No</th>
<th class="app-text-white">Old Status</th>
<th class="app-text-white">New Status</th>
<th class="app-text-white">Updated By</th>
<th class="app-text-white">Date/Time</th>
</tr>
</thead>
<tbody class="app-table-body">

View File

@ -1,12 +1,37 @@
<style>
.bg-staff {
.bg-staff {
background-color: #FFF5E5;
}
}
.label-font-size{
font-size:0.875rem;
}
.label-font-size {
font-size: 0.875rem;
}
.nav-pills,
.nav-link {
background-color: #F5FFFF !important;
color: #00999E !important;
border-radius: 10px;
}
.nav-pills {
background-color: #F5FFFF !important;
color: #00999E !important;
box-shadow: 0px 2px 4px 0px #00000040;
padding-top: 5px;
}
.nav-link.active-tab {
color: white !important;
background-color: #00999E !important;
font-size: small !important;
padding: 8px 16px;
border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000040;
}
</style>
<div class="row">
<div class="col-12">
@ -25,38 +50,42 @@
</div>
<!-- Navigation Tabs -->
<ul class="nav nav-pills navtab-bg">
<div class="tab-wrapper position-relative">
<ul class="nav nav-pills navtab-bg" id="myTab">
<li class="nav-item d-flex justify-content-center align-items-center">
<button class="scroll-btn left-btn" type="button">&#9664;</button>
</li>
<li class="nav-item">
<a href="#general-tab" data-toggle="tab" class="nav-link px-2 py-1 active label-font-size" id="general_tab"
<a href="#general-tab" data-toggle="tab" class="nav-link px-3 py-2 active label-font-size" id="general_tab"
aria-expanded="true">
<i class="mdi mdi-ticket-account"></i>
<span class="d-none d-sm-inline-block ">General</span>
</a>
</li>
<li class="nav-item">
<a href="#reply-tab" data-toggle="tab" class="nav-link px-2 py-1 label-font-size" id="reply_tab"
<a href="#reply-tab" data-toggle="tab" class="nav-link px-3 py-2 label-font-size" id="reply_tab"
aria-expanded="false">
<i class="mdi mdi-message-processing"></i>
<span class="d-none d-sm-inline-block">Reply</span>
</a>
</li>
<li class="nav-item">
<a href="#note-tab" data-toggle="tab" class="nav-link px-2 py-1 label-font-size" id="note_tab"
<a href="#note-tab" data-toggle="tab" class="nav-link px-3 py-2 label-font-size" id="note_tab"
aria-expanded="false">
<i class="mdi mdi-note-text"></i>
<span class="d-none d-sm-inline-block">Notes</span>
</a>
</li>
<li class="nav-item">
<a href="#history-tab" data-toggle="tab" class="nav-link px-2 py-1 label-font-size" id="history_tab"
<a href="#history-tab" data-toggle="tab" class="nav-link px-3 py-2 label-font-size" id="history_tab"
aria-expanded="false">
<i class="mdi mdi-history"></i>
<span class="d-none d-sm-inline-block">History</span>
</a>
</li>
<?php if(in_array($ticket_data['ticket_type_id'], [1,2,3,4,5,6,7])){ ?>
<?php if (in_array($ticket_data['ticket_type_id'], [1, 2, 3, 4, 5, 6, 7])) { ?>
<li class="nav-item">
<a href="#autoQuery-tab" data-toggle="tab" class="nav-link px-2 py-1 label-font-size" id="auto_query_tab"
<a href="#autoQuery-tab" data-toggle="tab" class="nav-link px-3 py-2 label-font-size" id="auto_query_tab"
aria-expanded="false">
<i class="mdi mdi-robot mr-1"></i>
<span class="d-none d-sm-inline-block">Auto Query Content</span>
@ -64,22 +93,28 @@
</li>
<?php } ?>
<li class="nav-item">
<a href="#uploads-tab" data-toggle="tab" class="nav-link px-2 py-1 label-font-size" id="uploads_tab"
<a href="#uploads-tab" data-toggle="tab" class="nav-link px-3 py-2 label-font-size" id="uploads_tab"
aria-expanded="false">
<i class="mdi mdi-file mr-1"></i>
<span class="d-none d-sm-inline-block">Claim Files</span>
</a>
</li>
<?php if(in_array($ticket_data['ticket_type_id'], [1,2,3,4,5,6,7])){ ?>
<?php if (in_array($ticket_data['ticket_type_id'], [1, 2, 3, 4, 5, 6, 7])) { ?>
<li class="nav-item">
<a href="#viewpolicyterms-tab" data-toggle="tab" class="nav-link px-2 py-1 label-font-size" id="viewpolicyterms_tab"
<a href="#viewpolicyterms-tab" data-toggle="tab" class="nav-link px-3 py-2 label-font-size" id="viewpolicyterms_tab"
aria-expanded="false">
<i class="mdi mdi-eye mr-1"></i>
<span class="d-none d-sm-inline-block">View Policy Terms</span>
</a>
</li>
<?php } ?>
<li class="nav-item d-flex justify-content-center align-items-center">
<!-- Right Arrow -->
<button class="scroll-btn right-btn" type="button">&#9654;</button>
</li>
</ul>
</div>
<!-- Tab Content -->
<div class="tab-content">
@ -88,7 +123,7 @@
if ($ticket_data['ticket_type_id'] == 1) {
include('ticket_form_gmc.php');
} else if($ticket_data['ticket_type_id'] == 8){
} else if ($ticket_data['ticket_type_id'] == 8) {
include('ticket_form_motor.php');
} else {
include('ticket_form_gpa.php');
@ -104,7 +139,7 @@
<div class="tab-pane fade" id="history-tab">
<?php include('ticket_history.php'); ?>
</div>
<?php if(in_array($ticket_data['ticket_type_id'], [1,2,3,4,5,6,7])){ ?>
<?php if (in_array($ticket_data['ticket_type_id'], [1, 2, 3, 4, 5, 6, 7])) { ?>
<div class="tab-pane fade" id="autoQuery-tab">
<?php include('ticket_auto_query.php'); ?>
</div>
@ -112,7 +147,7 @@
<div class="tab-pane fade" id="uploads-tab">
<?php include('claim_files_upload.php'); ?>
</div>
<?php if(in_array($ticket_data['ticket_type_id'], [1,2,3,4,5,6,7])){ ?>
<?php if (in_array($ticket_data['ticket_type_id'], [1, 2, 3, 4, 5, 6, 7])) { ?>
<div class="tab-pane fade" id="viewpolicyterms-tab">
<?php include('view_policy_terms.php'); ?>
</div>
@ -166,11 +201,11 @@
<?php include("ticket_conversation.php") ?>
</div>
<?php //include("ticket_form_handler.php") ?>
<?php //include("ticket_form_handler.php")
?>
<script>
function submitClaimForm(event, form) {
function submitClaimForm(event, form) {
event.preventDefault();
@ -221,14 +256,15 @@ function submitClaimForm(event, form) {
$('.loader-mask').delay(350).fadeOut('slow');
}
});
}
}
function openFetchEmpDataodal() {
function openFetchEmpDataodal() {
var myModal = new bootstrap.Modal(document.getElementById('member_data_modal'));
myModal.show();
}
}
function setMemberData(input) {is_head_approved
function setMemberData(input) {
is_head_approved
var selectedOption = $(input).find(':selected');
@ -249,9 +285,9 @@ function setMemberData(input) {is_head_approved
$(this).prop('selected', true);
}
});
}
}
function showConfirmationModal(event) {
function showConfirmationModal(event) {
Swal.fire({
title: "Approve Claim Rejection",
// text: "Do you want to save this?",
@ -313,6 +349,5 @@ function showConfirmationModal(event) {
return false;
}
});
}
}
</script>

View File

@ -63,10 +63,10 @@ table.dataTable tbody td {
<?php if (isset($feedback_data)) { ?>
<?php foreach($feedback_data as $data){ ?>
<tr onclick="viewFeedbackForm(<?php echo $data['id']; ?>)">
<td><?php echo $data['claim_number']; ?></td>
<td><?php echo $data['emp_code']; ?></td>
<td><?php echo $data['emp_name']; ?></td>
<td><?php echo $data['client_name']; ?></td>
<td><?php echo $data['claim_number'] ?: 'N/A'; ?></td>
<td><?php echo $data['emp_code'] ?: 'N/A'; ?></td>
<td><?php echo $data['emp_name'] ?: 'N/A'; ?></td>
<td><?php echo $data['client_name'] ?: 'N/A'; ?></td>
</tr>
<?php } ?>
<?php } ?>
@ -98,26 +98,54 @@ $(document).ready(function() {
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
// buttons: [{
// extend: 'csv',
// text: 'CSV',
// title: 'Claim-List',
// },
// {
// extend: 'excel',
// text: 'Excel',
// title: 'claim-List',
// exportOptions: {
// orthogonal: 'sort'
// },
// },
// ],
buttons: [
{
extend: 'collection',
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
className: 'btn app-btn-secondary ',
buttons: [
{
extend: 'csv',
text: 'CSV',
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
className: 'app-btn-primary ',
title: 'Claim-List',
},
{
extend: 'excel',
text: 'Excel',
title: 'claim-List',
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
exportOptions: {
orthogonal: 'sort'
},
},
title: 'claim-List',
className: 'app-btn-primary ',
}
]
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
search: `
<div class="datatable-search-wrapper">
_INPUT_
<i class="mdi mdi-magnify datatable-search-icon"></i>
</div>`,
searchPlaceholder: "Search"
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
pageLength: 10, // Set default number of rows per page (optional)
ordering: false,
});
} else {

Some files were not shown because too many files have changed in this diff Show More