FEAT_CLAIM_FILE_UPLOAD_FE : RV
This commit is contained in:
parent
84c45897bd
commit
9b969cdc41
@ -2148,6 +2148,29 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function generateKycPrimaryTable($client_id){
|
||||||
|
|
||||||
|
$db = db_connect();
|
||||||
|
$builder = $db->table('kyc_docs kd');
|
||||||
|
$builder->select('kd.*, ck.file_name AS upload_doc_name');
|
||||||
|
$builder->join('clients c', 'kd.kyc_type_id = c.entity_type_id');
|
||||||
|
$builder->join(
|
||||||
|
'client_kyc_documents ck',
|
||||||
|
'kd.id = ck.kyc_doc_type_id AND ck.client_id = c.id AND ck.is_active = 1',
|
||||||
|
'left'
|
||||||
|
);
|
||||||
|
$builder->where('c.id', $client_id);
|
||||||
|
$builder->groupBy(['kd.id', 'ck.file_name']);
|
||||||
|
|
||||||
|
$query = $builder->get();
|
||||||
|
$result['data'] = $query->getResult();
|
||||||
|
|
||||||
|
$table = view('client_kyc_primary_table', $result);
|
||||||
|
|
||||||
|
print_r($table);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function getPolicesByInsurerId($id = null)
|
public function getPolicesByInsurerId($id = null)
|
||||||
{
|
{
|
||||||
$this->myLogger->logme('error', 'getPolicesByInsurerId function called');
|
$this->myLogger->logme('error', 'getPolicesByInsurerId function called');
|
||||||
@ -2659,193 +2682,268 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function enrollmentGMCDisplayValueTransform()
|
||||||
|
// {
|
||||||
|
// $data = [];
|
||||||
|
|
||||||
|
// if ($this->request->getPost("waiverofpreexistingdiseases_display")) {
|
||||||
|
// $data['Waiver of Pre-existing Diseases'] = $this->request->getPost("waiverofpreexistingdiseases");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("waiverof1234thyearexclusions_display")) {
|
||||||
|
// $data['Waiver of 1, 2, 3 & 4th year Exclusions'] = $this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("waiverof30dayswaitingperiod_display")) {
|
||||||
|
// $data['Waiver of 30 days waiting period'] = $this->request->getPost("waiverof30dayswaitingperiod");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("suminsuredenhancement_display")) {
|
||||||
|
// $data['Sum Insured Enhancement'] = $this->request->getPost("suminsuredenhancement");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("waiver_of_90_days_waiting_period_display")) {
|
||||||
|
// $data['Waiver of 90 Days Waiting Period'] = $this->request->getPost("waiver_of_90_days_waiting_period");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("waiver_of_other_waiting_periods_display")) {
|
||||||
|
// $data['Waiver of Other Waiting Periods'] = $this->request->getPost("waiver_of_other_waiting_periods");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("maternity_benefit_display")) {
|
||||||
|
// $data['Maternity Benefit'] = $this->request->getPost("maternity_benefit");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("9monthwaitingperiodwaived_display")) {
|
||||||
|
// $data['9-month waiting Period - waived'] = $this->request->getPost("9monthwaitingperiodwaived");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("maternitycoverage_display")) {
|
||||||
|
// $data['Maternity Coverage'] = $this->request->getPost("maternitycoverage");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("twindelivery_display")) {
|
||||||
|
// $data['Twin Delivery'] = $this->request->getPost("twindelivery");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("well_baby_well_mother_expenses_display")) {
|
||||||
|
// $data['Well baby / Well Mother Expenses'] = $this->request->getPost("well_baby_well_mother_expenses");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("preandpostnatal_display")) {
|
||||||
|
// $data['Pre and Post natal'] = $this->request->getPost("preandpostnatal");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("infertility_treatment_coverage_display")) {
|
||||||
|
// $data['Infertility Treatment Coverage'] = $this->request->getPost("infertility_treatment_coverage");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("babyday1cover_display")) {
|
||||||
|
// $data['Baby Day 1 Cover'] = $this->request->getPost("babyday1cover");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("coverfromthedateofjoining_display")) {
|
||||||
|
// $data['Cover from the date of Joining'] = $this->request->getPost("coverfromthedateofjoining");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse_display")) {
|
||||||
|
// $data['Mid Term Addition of New Born / Newly Wedded Spouse'] = $this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("prehospitalizationcover_display")) {
|
||||||
|
// $data['Pre Hospitalization Cover'] = $this->request->getPost("prehospitalizationcover");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("posthospitalizationcover_display")) {
|
||||||
|
// $data['Post Hospitalization Cover'] = $this->request->getPost("posthospitalizationcover");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("congenitaldiseasesinternal_display")) {
|
||||||
|
// $data['Congenital Diseases - Internal'] = $this->request->getPost("congenitaldiseasesinternal");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("congenitaldiseasesexternal_display")) {
|
||||||
|
// $data['Congenital Diseases - External'] = $this->request->getPost("congenitaldiseasesexternal");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("copayzonewisecopay_display")) {
|
||||||
|
// $data['Co-Pay/Zone wise Co Pay'] = $this->request->getPost("copayzonewisecopay");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("roomrentlimit_display")) {
|
||||||
|
// $data['Room Rent Limit'] = $this->request->getPost("roomrentlimit");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("icu_limit_display")) {
|
||||||
|
// $data['ICU Limit'] = $this->request->getPost("icu_limit");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("proportionatedeductionclause_display")) {
|
||||||
|
// $data['Proportionate Deduction Clause'] = $this->request->getPost("proportionatedeductionclause");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("ailmentcapping_display")) {
|
||||||
|
// $data['Ailment capping'] = $this->request->getPost("ailmentcapping");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("ailment_capping_details_display")) {
|
||||||
|
// $data['Ailment capping Details'] = $this->request->getPost("ailment_capping_details");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("corporatebuffer_display")) {
|
||||||
|
// $data['Corporate Buffer'] = $this->request->getPost("corporatebuffer");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("non_admissible_contingency_corporate_buffer_display")) {
|
||||||
|
// $data['Non-Admissible / Contingency Corporate Buffer'] = $this->request->getPost("non_admissible_contingency_corporate_buffer");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("ambulancecharges_display")) {
|
||||||
|
// $data['Ambulance Charges'] = $this->request->getPost("ambulancecharges");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("airambulance_display")) {
|
||||||
|
// $data['Air Ambulance'] = $this->request->getPost("airambulance");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("reasonableandcustomarycharges_display")) {
|
||||||
|
// $data['Reasonable and Customary Charges'] = $this->request->getPost("reasonableandcustomarycharges");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("daycaretreatment_display")) {
|
||||||
|
// $data['Day Care Treatment'] = $this->request->getPost("daycaretreatment");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("lasiksurgery_display")) {
|
||||||
|
// $data['Lasik Surgery'] = $this->request->getPost("lasiksurgery");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("ayushtreatmentcover_display")) {
|
||||||
|
// $data['AYUSH treatment cover'] = $this->request->getPost("ayudhtreatmentcover");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("moderntreatmentsasperirdai_display")) {
|
||||||
|
// $data['Modern treatments as per IRDAI'] = $this->request->getPost("moderntreatmentsasperirdai");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("opd_treatment_display")) {
|
||||||
|
// $data['OPD Treatment'] = $this->request->getPost("opd_treatment");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("days_of_discharge_display")) {
|
||||||
|
// $data['Claim Intimation Clause'] = $this->request->getPost("days_of_discharge");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("days_from_dod_display")) {
|
||||||
|
// $data['Claim Submission'] = $this->request->getPost("days_from_dod");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("terrorism_display")) {
|
||||||
|
// $data['Terrorism'] = $this->request->getPost("terrorism");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("widower_cover_display")) {
|
||||||
|
// $data['Widower Cover'] = $this->request->getPost("widower_cover");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("breavement_cover_display")) {
|
||||||
|
// $data['Breavement Cover'] = $this->request->getPost("breavement_cover");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("special_condition_display_value")) {
|
||||||
|
|
||||||
|
// $specialConditionKeyValue = $this->request->getPost("special_condition_display_value") ?? [];
|
||||||
|
// $specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
||||||
|
|
||||||
|
// if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
||||||
|
// $mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
||||||
|
// $data = array_merge($data, $mergedArray);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(isset($data) && !empty($data)){
|
||||||
|
// return $data;
|
||||||
|
// }else{
|
||||||
|
// $data = [];
|
||||||
|
// return $data;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
public function enrollmentGMCDisplayValueTransform()
|
public function enrollmentGMCDisplayValueTransform()
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
if ($this->request->getPost("waiverofpreexistingdiseases_display")) {
|
// Mapping of POST keys to display labels
|
||||||
$data['Waiver of Pre-existing Diseases'] = $this->request->getPost("waiverofpreexistingdiseases");
|
$fields = [
|
||||||
}
|
'waiverofpreexistingdiseases' => 'Waiver of Pre-existing Diseases',
|
||||||
|
'waiverof1,2,3&4thyearexclusions' => 'Waiver of 1, 2, 3 & 4th year Exclusions',
|
||||||
if ($this->request->getPost("waiverof1234thyearexclusions_display")) {
|
'waiverof30dayswaitingperiod' => 'Waiver of 30 days waiting period',
|
||||||
$data['Waiver of 1, 2, 3 & 4th year Exclusions'] = $this->request->getPost("waiverof1,2,3&4thyearexclusions");
|
'suminsuredenhancement' => 'Sum Insured Enhancement',
|
||||||
}
|
'waiver_of_90_days_waiting_period' => 'Waiver of 90 Days Waiting Period',
|
||||||
|
'waiver_of_other_waiting_periods' => 'Waiver of Other Waiting Periods',
|
||||||
if ($this->request->getPost("waiverof30dayswaitingperiod_display")) {
|
'maternity_benefit' => 'Maternity Benefit',
|
||||||
$data['Waiver of 30 days waiting period'] = $this->request->getPost("waiverof30dayswaitingperiod");
|
'9monthwaitingperiodwaived' => '9-month waiting Period - waived',
|
||||||
}
|
'maternitycoverage' => 'Maternity Coverage',
|
||||||
|
'twindelivery' => 'Twin Delivery',
|
||||||
if ($this->request->getPost("suminsuredenhancement_display")) {
|
'well_baby_well_mother_expenses' => 'Well baby / Well Mother Expenses',
|
||||||
$data['Sum Insured Enhancement'] = $this->request->getPost("suminsuredenhancement");
|
'preandpostnatal' => 'Pre and Post natal',
|
||||||
}
|
'infertility_treatment_coverage' => 'Infertility Treatment Coverage',
|
||||||
|
'babyday1cover' => 'Baby Day 1 Cover',
|
||||||
if ($this->request->getPost("waiver_of_90_days_waiting_period_display")) {
|
'coverfromthedateofjoining' => 'Cover from the date of Joining',
|
||||||
$data['Waiver of 90 Days Waiting Period'] = $this->request->getPost("waiver_of_90_days_waiting_period");
|
'mid_term_addition_of_new_born_newly_wedded_spouse' => 'Mid Term Addition of New Born / Newly Wedded Spouse',
|
||||||
}
|
'prehospitalizationcover' => 'Pre Hospitalization Cover',
|
||||||
|
'posthospitalizationcover' => 'Post Hospitalization Cover',
|
||||||
if ($this->request->getPost("waiver_of_other_waiting_periods_display")) {
|
'congenitaldiseasesinternal' => 'Congenital Diseases - Internal',
|
||||||
$data['Waiver of Other Waiting Periods'] = $this->request->getPost("waiver_of_other_waiting_periods");
|
'congenitaldiseasesexternal' => 'Congenital Diseases - External',
|
||||||
}
|
'copayzonewisecopay' => 'Co-Pay/Zone wise Co Pay',
|
||||||
|
'roomrentlimit' => 'Room Rent Limit',
|
||||||
if ($this->request->getPost("maternity_benefit_display")) {
|
'icu_limit' => 'ICU Limit',
|
||||||
$data['Maternity Benefit'] = $this->request->getPost("maternity_benefit");
|
'proportionatedeductionclause' => 'Proportionate Deduction Clause',
|
||||||
}
|
'ailmentcapping' => 'Ailment capping',
|
||||||
|
'ailment_capping_details' => 'Ailment capping Details',
|
||||||
if ($this->request->getPost("9monthwaitingperiodwaived_display")) {
|
'corporatebuffer' => 'Corporate Buffer',
|
||||||
$data['9-month waiting Period - waived'] = $this->request->getPost("9monthwaitingperiodwaived");
|
'non_admissible_contingency_corporate_buffer' => 'Non-Admissible / Contingency Corporate Buffer',
|
||||||
}
|
'ambulancecharges' => 'Ambulance Charges',
|
||||||
|
'airambulance' => 'Air Ambulance',
|
||||||
if ($this->request->getPost("maternitycoverage_display")) {
|
'reasonableandcustomarycharges' => 'Reasonable and Customary Charges',
|
||||||
$data['Maternity Coverage'] = $this->request->getPost("maternitycoverage");
|
'daycaretreatment' => 'Day Care Treatment',
|
||||||
}
|
'lasiksurgery' => 'Lasik Surgery',
|
||||||
|
'ayudhtreatmentcover' => 'AYUSH treatment cover',
|
||||||
if ($this->request->getPost("twindelivery_display")) {
|
'moderntreatmentsasperirdai' => 'Modern treatments as per IRDAI',
|
||||||
$data['Twin Delivery'] = $this->request->getPost("twindelivery");
|
'opd_treatment' => 'OPD Treatment',
|
||||||
}
|
'days_of_discharge' => 'Claim Intimation Clause',
|
||||||
|
'days_from_dod' => 'Claim Submission',
|
||||||
if ($this->request->getPost("well_baby_well_mother_expenses_display")) {
|
'terrorism' => 'Terrorism',
|
||||||
$data['Well baby / Well Mother Expenses'] = $this->request->getPost("well_baby_well_mother_expenses");
|
'widower_cover' => 'Widower Cover',
|
||||||
}
|
'breavement_cover' => 'Breavement Cover'
|
||||||
|
];
|
||||||
if ($this->request->getPost("preandpostnatal_display")) {
|
|
||||||
$data['Pre and Post natal'] = $this->request->getPost("preandpostnatal");
|
foreach ($fields as $postKey => $label) {
|
||||||
}
|
$displayKey = $postKey . '_display';
|
||||||
|
$value = $this->request->getPost($postKey);
|
||||||
if ($this->request->getPost("infertility_treatment_coverage_display")) {
|
if ($this->request->getPost($displayKey) && $value !== null && $value !== '') {
|
||||||
$data['Infertility Treatment Coverage'] = $this->request->getPost("infertility_treatment_coverage");
|
$data[$label] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->request->getPost("babyday1cover_display")) {
|
|
||||||
$data['Baby Day 1 Cover'] = $this->request->getPost("babyday1cover");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("coverfromthedateofjoining_display")) {
|
|
||||||
$data['Cover from the date of Joining'] = $this->request->getPost("coverfromthedateofjoining");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse_display")) {
|
|
||||||
$data['Mid Term Addition of New Born / Newly Wedded Spouse'] = $this->request->getPost("mid_term_addition_of_new_born_newly_wedded_spouse");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("prehospitalizationcover_display")) {
|
|
||||||
$data['Pre Hospitalization Cover'] = $this->request->getPost("prehospitalizationcover");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("posthospitalizationcover_display")) {
|
|
||||||
$data['Post Hospitalization Cover'] = $this->request->getPost("posthospitalizationcover");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("congenitaldiseasesinternal_display")) {
|
|
||||||
$data['Congenital Diseases - Internal'] = $this->request->getPost("congenitaldiseasesinternal");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("congenitaldiseasesexternal_display")) {
|
|
||||||
$data['Congenital Diseases - External'] = $this->request->getPost("congenitaldiseasesexternal");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("copayzonewisecopay_display")) {
|
|
||||||
$data['Co-Pay/Zone wise Co Pay'] = $this->request->getPost("copayzonewisecopay");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("roomrentlimit_display")) {
|
|
||||||
$data['Room Rent Limit'] = $this->request->getPost("roomrentlimit");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("icu_limit_display")) {
|
|
||||||
$data['ICU Limit'] = $this->request->getPost("icu_limit");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("proportionatedeductionclause_display")) {
|
|
||||||
$data['Proportionate Deduction Clause'] = $this->request->getPost("proportionatedeductionclause");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("ailmentcapping_display")) {
|
|
||||||
$data['Ailment capping'] = $this->request->getPost("ailmentcapping");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("ailment_capping_details_display")) {
|
|
||||||
$data['Ailment capping Details'] = $this->request->getPost("ailment_capping_details");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("corporatebuffer_display")) {
|
|
||||||
$data['Corporate Buffer'] = $this->request->getPost("corporatebuffer");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("non_admissible_contingency_corporate_buffer_display")) {
|
|
||||||
$data['Non-Admissible / Contingency Corporate Buffer'] = $this->request->getPost("non_admissible_contingency_corporate_buffer");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("ambulancecharges_display")) {
|
|
||||||
$data['Ambulance Charges'] = $this->request->getPost("ambulancecharges");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("airambulance_display")) {
|
|
||||||
$data['Air Ambulance'] = $this->request->getPost("airambulance");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("reasonableandcustomarycharges_display")) {
|
|
||||||
$data['Reasonable and Customary Charges'] = $this->request->getPost("reasonableandcustomarycharges");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("daycaretreatment_display")) {
|
|
||||||
$data['Day Care Treatment'] = $this->request->getPost("daycaretreatment");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("lasiksurgery_display")) {
|
|
||||||
$data['Lasik Surgery'] = $this->request->getPost("lasiksurgery");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("ayushtreatmentcover_display")) {
|
|
||||||
$data['AYUSH treatment cover'] = $this->request->getPost("ayudhtreatmentcover");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("moderntreatmentsasperirdai_display")) {
|
|
||||||
$data['Modern treatments as per IRDAI'] = $this->request->getPost("moderntreatmentsasperirdai");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("opd_treatment_display")) {
|
|
||||||
$data['OPD Treatment'] = $this->request->getPost("opd_treatment");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("days_of_discharge_display")) {
|
|
||||||
$data['Claim Intimation Clause'] = $this->request->getPost("days_of_discharge");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("days_from_dod_display")) {
|
|
||||||
$data['Claim Submission'] = $this->request->getPost("days_from_dod");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("terrorism_display")) {
|
|
||||||
$data['Terrorism'] = $this->request->getPost("terrorism");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("widower_cover_display")) {
|
|
||||||
$data['Widower Cover'] = $this->request->getPost("widower_cover");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->request->getPost("breavement_cover_display")) {
|
|
||||||
$data['Breavement Cover'] = $this->request->getPost("breavement_cover");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle special conditions
|
||||||
if ($this->request->getPost("special_condition_display_value")) {
|
if ($this->request->getPost("special_condition_display_value")) {
|
||||||
|
$specialConditionKeyValue = json_decode($this->request->getPost("special_condition_display_value"), true);
|
||||||
$specialConditionKeyValue = $this->request->getPost("special_condition_display_value") ?? [];
|
|
||||||
$specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
|
||||||
|
|
||||||
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
||||||
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
||||||
$data = array_merge($data, $mergedArray);
|
// Only add non-empty values
|
||||||
|
foreach ($mergedArray as $k => $v) {
|
||||||
|
if ($v !== null && $v !== '') {
|
||||||
|
$data[$k] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($data) && !empty($data)){
|
|
||||||
return $data;
|
|
||||||
}else{
|
|
||||||
$data = [];
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getterms()
|
public function getterms()
|
||||||
{
|
{
|
||||||
@ -3006,92 +3104,145 @@ class ClientController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function enrollmentGPADisplayValueTransform()
|
||||||
|
// {
|
||||||
|
// $data = [];
|
||||||
|
|
||||||
|
// if ($this->request->getPost("accidentalDeathBenefit_display")) {
|
||||||
|
// $data['Accidental Death Benefit'] = $this->request->getPost("accidentalDeathBenefit");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("permanentTotalDisablement_display")) {
|
||||||
|
// $data['Permanent Total Disablement'] = $this->request->getPost("permanentTotalDisablement");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("permanentPartialDisablement_display")) {
|
||||||
|
// $data['Permanent Partial Disablement'] = $this->request->getPost("permanentPartialDisablement");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("temporaryTotalDisablementBenefit_display")) {
|
||||||
|
// $data['Temporary Total Disablement Benefit'] = $this->request->getPost("temporaryTotalDisablementBenefit");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("medical_expenses_medical_extension_display")) {
|
||||||
|
// $data['Medical Expenses / Medical Extension (IPD)'] = $this->request->getPost("medical_expenses_medical_extension");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("opd_treatment_cover_display")) {
|
||||||
|
// $data['OPD Treatment Cover'] = $this->request->getPost("opd_treatment_cover");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("ambulanceCharges_display")) {
|
||||||
|
// $data['Ambulance Charges'] = $this->request->getPost("ambulanceCharges");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("repatriation_of_mortal_remains_display")) {
|
||||||
|
// $data['Repatriation of Mortal Remains'] = $this->request->getPost("repatriation_of_mortal_remains");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("childrenEducationWelfareFund_display")) {
|
||||||
|
// $data['Children Education Welfare Fund'] = $this->request->getPost("childrenEducationWelfareFund");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("terrorism_display")) {
|
||||||
|
// $data['Terrorism'] = $this->request->getPost("terrorism");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("worldwideCover_display")) {
|
||||||
|
// $data['Worldwide Cover'] = $this->request->getPost("worldwideCover");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("family_transportation_benefits_display")) {
|
||||||
|
// $data['Family Transportation Benefits'] = $this->request->getPost("family_transportation_benefits");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("fractures_dislocation_burns_display")) {
|
||||||
|
// $data['Fractures / Dislocation / Burns'] = $this->request->getPost("fractures_dislocation_burns");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("coma_display")) {
|
||||||
|
// $data['Coma'] = $this->request->getPost("coma");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("carriageofDeadBody_display")) {
|
||||||
|
// $data['Carriage of Dead Body'] = $this->request->getPost("carriageOfDeadBody");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("compassionateVisitExpenses_display")) {
|
||||||
|
// $data['Compassionate Visit Expenses'] = $this->request->getPost("compassionateVisitExpenses");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("travel_expenses_for_medical_treatment_display")) {
|
||||||
|
// $data['Travel expenses for Medical Treatment'] = $this->request->getPost("travel_expenses_for_medical_treatment");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("daily_cash_allowance_display")) {
|
||||||
|
// $data['Daily cash Allowance'] = $this->request->getPost("daily_cash_allowance");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("artifical_limb_and_prosthesis_display")) {
|
||||||
|
// $data['Artifical Limb and Prosthesis'] = $this->request->getPost("artifical_limb_and_prosthesis");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("animalSnakeInsectBite_display")) {
|
||||||
|
// $data['Animal/Snake/Insect Bite'] = $this->request->getPost("animalSnakeInsectBite");
|
||||||
|
// }
|
||||||
|
// if ($this->request->getPost("air_ambulance_display")) {
|
||||||
|
// $data['Air Ambulance'] = $this->request->getPost("air_ambulance");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($this->request->getPost("gpa_special_condition_display_value")) {
|
||||||
|
|
||||||
|
// $specialConditionKeyValue = $this->request->getPost("gpa_special_condition_display_value") ?? [];
|
||||||
|
// $specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
||||||
|
|
||||||
|
// if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
||||||
|
// $mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
||||||
|
// $data = array_merge($data, $mergedArray);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // print_r($data); die;
|
||||||
|
|
||||||
|
// if (isset($data) && !empty($data)) {
|
||||||
|
// return $data;
|
||||||
|
// } else {
|
||||||
|
// $data = [];
|
||||||
|
// return $data;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
public function enrollmentGPADisplayValueTransform()
|
public function enrollmentGPADisplayValueTransform()
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
if ($this->request->getPost("accidentalDeathBenefit_display")) {
|
// Map POST keys to display labels
|
||||||
$data['Accidental Death Benefit'] = $this->request->getPost("accidentalDeathBenefit");
|
$fields = [
|
||||||
|
'accidentalDeathBenefit' => 'Accidental Death Benefit',
|
||||||
|
'permanentTotalDisablement' => 'Permanent Total Disablement',
|
||||||
|
'permanentPartialDisablement' => 'Permanent Partial Disablement',
|
||||||
|
'temporaryTotalDisablementBenefit' => 'Temporary Total Disablement Benefit',
|
||||||
|
'medical_expenses_medical_extension' => 'Medical Expenses / Medical Extension (IPD)',
|
||||||
|
'opd_treatment_cover' => 'OPD Treatment Cover',
|
||||||
|
'ambulanceCharges' => 'Ambulance Charges',
|
||||||
|
'repatriation_of_mortal_remains' => 'Repatriation of Mortal Remains',
|
||||||
|
'childrenEducationWelfareFund' => 'Children Education Welfare Fund',
|
||||||
|
'terrorism' => 'Terrorism',
|
||||||
|
'worldwideCover' => 'Worldwide Cover',
|
||||||
|
'family_transportation_benefits' => 'Family Transportation Benefits',
|
||||||
|
'fractures_dislocation_burns' => 'Fractures / Dislocation / Burns',
|
||||||
|
'coma' => 'Coma',
|
||||||
|
'carriageOfDeadBody' => 'Carriage of Dead Body',
|
||||||
|
'compassionateVisitExpenses' => 'Compassionate Visit Expenses',
|
||||||
|
'travel_expenses_for_medical_treatment' => 'Travel expenses for Medical Treatment',
|
||||||
|
'daily_cash_allowance' => 'Daily cash Allowance',
|
||||||
|
'artifical_limb_and_prosthesis' => 'Artifical Limb and Prosthesis',
|
||||||
|
'animalSnakeInsectBite' => 'Animal/Snake/Insect Bite',
|
||||||
|
'air_ambulance' => 'Air Ambulance'
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($fields as $postKey => $label) {
|
||||||
|
$displayKey = $postKey . '_display';
|
||||||
|
$value = $this->request->getPost($postKey);
|
||||||
|
if ($this->request->getPost($displayKey) && $value !== null && $value !== '') {
|
||||||
|
$data[$label] = $value;
|
||||||
}
|
}
|
||||||
if ($this->request->getPost("permanentTotalDisablement_display")) {
|
|
||||||
$data['Permanent Total Disablement'] = $this->request->getPost("permanentTotalDisablement");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("permanentPartialDisablement_display")) {
|
|
||||||
$data['Permanent Partial Disablement'] = $this->request->getPost("permanentPartialDisablement");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("temporaryTotalDisablementBenefit_display")) {
|
|
||||||
$data['Temporary Total Disablement Benefit'] = $this->request->getPost("temporaryTotalDisablementBenefit");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("medical_expenses_medical_extension_display")) {
|
|
||||||
$data['Medical Expenses / Medical Extension (IPD)'] = $this->request->getPost("medical_expenses_medical_extension");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("opd_treatment_cover_display")) {
|
|
||||||
$data['OPD Treatment Cover'] = $this->request->getPost("opd_treatment_cover");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("ambulanceCharges_display")) {
|
|
||||||
$data['Ambulance Charges'] = $this->request->getPost("ambulanceCharges");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("repatriation_of_mortal_remains_display")) {
|
|
||||||
$data['Repatriation of Mortal Remains'] = $this->request->getPost("repatriation_of_mortal_remains");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("childrenEducationWelfareFund_display")) {
|
|
||||||
$data['Children Education Welfare Fund'] = $this->request->getPost("childrenEducationWelfareFund");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("terrorism_display")) {
|
|
||||||
$data['Terrorism'] = $this->request->getPost("terrorism");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("worldwideCover_display")) {
|
|
||||||
$data['Worldwide Cover'] = $this->request->getPost("worldwideCover");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("family_transportation_benefits_display")) {
|
|
||||||
$data['Family Transportation Benefits'] = $this->request->getPost("family_transportation_benefits");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("fractures_dislocation_burns_display")) {
|
|
||||||
$data['Fractures / Dislocation / Burns'] = $this->request->getPost("fractures_dislocation_burns");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("coma_display")) {
|
|
||||||
$data['Coma'] = $this->request->getPost("coma");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("carriageofDeadBody_display")) {
|
|
||||||
$data['Carriage of Dead Body'] = $this->request->getPost("carriageOfDeadBody");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("compassionateVisitExpenses_display")) {
|
|
||||||
$data['Compassionate Visit Expenses'] = $this->request->getPost("compassionateVisitExpenses");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("travel_expenses_for_medical_treatment_display")) {
|
|
||||||
$data['Travel expenses for Medical Treatment'] = $this->request->getPost("travel_expenses_for_medical_treatment");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("daily_cash_allowance_display")) {
|
|
||||||
$data['Daily cash Allowance'] = $this->request->getPost("daily_cash_allowance");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("artifical_limb_and_prosthesis_display")) {
|
|
||||||
$data['Artifical Limb and Prosthesis'] = $this->request->getPost("artifical_limb_and_prosthesis");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("animalSnakeInsectBite_display")) {
|
|
||||||
$data['Animal/Snake/Insect Bite'] = $this->request->getPost("animalSnakeInsectBite");
|
|
||||||
}
|
|
||||||
if ($this->request->getPost("air_ambulance_display")) {
|
|
||||||
$data['Air Ambulance'] = $this->request->getPost("air_ambulance");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle GPA special conditions
|
||||||
if ($this->request->getPost("gpa_special_condition_display_value")) {
|
if ($this->request->getPost("gpa_special_condition_display_value")) {
|
||||||
|
$specialConditionKeyValue = json_decode($this->request->getPost("gpa_special_condition_display_value"), true);
|
||||||
$specialConditionKeyValue = $this->request->getPost("gpa_special_condition_display_value") ?? [];
|
|
||||||
$specialConditionKeyValue = json_decode($specialConditionKeyValue, true);
|
|
||||||
|
|
||||||
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
if (is_array($specialConditionKeyValue) && count($specialConditionKeyValue) > 0) {
|
||||||
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
$mergedArray = array_merge(...array_map(fn($item) => (array) $item, $specialConditionKeyValue));
|
||||||
$data = array_merge($data, $mergedArray);
|
foreach ($mergedArray as $k => $v) {
|
||||||
|
if ($v !== null && $v !== '') {
|
||||||
|
$data[$k] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// print_r($data); die;
|
|
||||||
|
|
||||||
if (isset($data) && !empty($data)) {
|
|
||||||
return $data;
|
return $data;
|
||||||
} else {
|
|
||||||
$data = [];
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPolicyGPATerms()
|
public function getPolicyGPATerms()
|
||||||
|
|||||||
@ -51,7 +51,7 @@ use CodeIgniter\API\ResponseTrait;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
use App\Controllers\EmployeeServiceController;
|
use App\Controllers\EmployeeServiceController;
|
||||||
|
use App\Models\ClaimFilesModel;
|
||||||
use Kreait\Firebase\Factory;
|
use Kreait\Firebase\Factory;
|
||||||
use Kreait\Firebase\Messaging\CloudMessage;
|
use Kreait\Firebase\Messaging\CloudMessage;
|
||||||
use Kreait\Firebase\Messaging\Notification;
|
use Kreait\Firebase\Messaging\Notification;
|
||||||
@ -3417,11 +3417,19 @@ class EmployeeRestController extends AdminController
|
|||||||
{
|
{
|
||||||
|
|
||||||
$received_data = $this->request->getPost();
|
$received_data = $this->request->getPost();
|
||||||
// print_r($received_data); die;
|
$get_file_data = $this->request->getFiles('claim_doc');
|
||||||
|
// print_r($get_file_data); die;
|
||||||
$employee_id = $received_data['emp_id'];
|
$employee_id = $received_data['emp_id'];
|
||||||
$client_policy_id = $received_data['client_policy_id'];
|
$client_policy_id = $received_data['client_policy_id'];
|
||||||
$insured_emp_id = $received_data['insured_emp_id'];
|
$insured_emp_id = $received_data['insured_emp_id'];
|
||||||
|
|
||||||
|
$file_data = "";
|
||||||
|
if(isset($get_file_data) && !empty($get_file_data)){
|
||||||
|
$file_path = WRITEPATH . 'uploads/claim_files/';
|
||||||
|
$file_data = multi_file_Upload($get_file_data, $file_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (empty($received_data['doa'])) {
|
if (empty($received_data['doa'])) {
|
||||||
$received_data['doa'] = null;
|
$received_data['doa'] = null;
|
||||||
} else{
|
} else{
|
||||||
@ -3502,6 +3510,8 @@ class EmployeeRestController extends AdminController
|
|||||||
|
|
||||||
if ($insert_status && !empty($ticket_id)) {
|
if ($insert_status && !empty($ticket_id)) {
|
||||||
|
|
||||||
|
$this->handleCliamFiles($file_data, $ticket_id);
|
||||||
|
|
||||||
//insert first history
|
//insert first history
|
||||||
$this->ticketController->putHistoryAfterInsert($fetchData, $ticket_id);
|
$this->ticketController->putHistoryAfterInsert($fetchData, $ticket_id);
|
||||||
|
|
||||||
@ -3555,6 +3565,30 @@ class EmployeeRestController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function handleCliamFiles($data, $ticket_id)
|
||||||
|
{
|
||||||
|
if(!empty($data) && !empty($ticket_id))
|
||||||
|
{
|
||||||
|
$insert_ids = [];
|
||||||
|
$claim_file = new ClaimFilesModel();
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'ticket_id' => $ticket_id,
|
||||||
|
'doc_name' => $value['file_name'],
|
||||||
|
'url' => $value['file_path'],
|
||||||
|
'file_type' => 2,
|
||||||
|
];
|
||||||
|
|
||||||
|
$insert_ids[] = $claim_file->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $insert_ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
//department
|
//department
|
||||||
// public function get_ticket_type()
|
// public function get_ticket_type()
|
||||||
// {
|
// {
|
||||||
@ -3572,12 +3606,17 @@ class EmployeeRestController extends AdminController
|
|||||||
$emp_code = $this->request->getGet('emp_code');
|
$emp_code = $this->request->getGet('emp_code');
|
||||||
|
|
||||||
if (empty($client_id) || empty($emp_code)) {
|
if (empty($client_id) || empty($emp_code)) {
|
||||||
|
|
||||||
$this->myLogger->logme('error', "Missing required parameters: client_id={$client_id}, emp_code={$emp_code}");
|
$this->myLogger->logme('error', "Missing required parameters: client_id={$client_id}, emp_code={$emp_code}");
|
||||||
return $this->response->setJSON([
|
// return $this->response->setJSON([
|
||||||
'status' => false,
|
// 'status' => false,
|
||||||
'code' => 400,
|
// 'code' => 400,
|
||||||
'message' => 'client_id and emp_code are required'
|
// 'message' => 'client_id and emp_code are required'
|
||||||
])->setStatusCode(400);
|
// ])->setStatusCode(400);
|
||||||
|
|
||||||
|
$ticket_type = $this->ticketController->ticketType;
|
||||||
|
$ticket_type = array_map(fn($value, $key) => (object) ['id' => $key, 'name' => $value], array_values($ticket_type), array_keys($ticket_type));
|
||||||
|
return $this->response->setJSON(['ticket_type' => $ticket_type])->setStatusCode(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get policy type ids
|
// Get policy type ids
|
||||||
|
|||||||
@ -1894,6 +1894,8 @@ class MasterController extends AdminController
|
|||||||
'cache' => WRITEPATH . 'cache',
|
'cache' => WRITEPATH . 'cache',
|
||||||
'sample_import_excel' => ROOTPATH . 'public/sample_import_excel',
|
'sample_import_excel' => ROOTPATH . 'public/sample_import_excel',
|
||||||
'lead_files' => WRITEPATH . 'uploads/lead_files/',
|
'lead_files' => WRITEPATH . 'uploads/lead_files/',
|
||||||
|
'claim_files' => WRITEPATH . 'uploads/claim_files/',
|
||||||
|
'claim_dump_excel' => WRITEPATH . 'uploads/claim_dump_excel/',
|
||||||
'claim_sample_forms' => ROOTPATH . 'public/claim_sample_forms/',
|
'claim_sample_forms' => ROOTPATH . 'public/claim_sample_forms/',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -2287,7 +2287,8 @@ class TicketController extends BaseController
|
|||||||
'url' => $data['url'][$key]??'',
|
'url' => $data['url'][$key]??'',
|
||||||
'ticket_id'=> $data['ticket_id_url']??'',
|
'ticket_id'=> $data['ticket_id_url']??'',
|
||||||
'created_by' => get_session_userid(),
|
'created_by' => get_session_userid(),
|
||||||
'is_active' => 1
|
'is_active' => 1,
|
||||||
|
'file_type' => 1
|
||||||
];
|
];
|
||||||
|
|
||||||
$insertArr[] = $insertData;
|
$insertArr[] = $insertData;
|
||||||
@ -2324,6 +2325,7 @@ class TicketController extends BaseController
|
|||||||
$urlData = $this->claimFilesModel
|
$urlData = $this->claimFilesModel
|
||||||
->where('ticket_id', $ticket_id)
|
->where('ticket_id', $ticket_id)
|
||||||
->where('is_active',1)
|
->where('is_active',1)
|
||||||
|
->where('file_type',1)
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
|
|||||||
@ -64,6 +64,42 @@ if (!function_exists('file_Upload')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists('multi_file_Upload')) {
|
||||||
|
function multi_file_Upload($fileToUpload, $filepath)
|
||||||
|
{
|
||||||
|
$uploadedFiles = [];
|
||||||
|
|
||||||
|
// Handle multiple files
|
||||||
|
if (is_array($fileToUpload)) {
|
||||||
|
foreach ($fileToUpload as $file) {
|
||||||
|
if ($file !== null && $file->isValid() && !$file->hasMoved()) {
|
||||||
|
$file->move($filepath);
|
||||||
|
$fileName = $file->getName(); // safer unique name
|
||||||
|
$uploadedFiles[] = [
|
||||||
|
'file_name' => $fileName,
|
||||||
|
'file_path' => $filepath . $fileName
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Handle single file
|
||||||
|
else {
|
||||||
|
if ($fileToUpload !== null && $fileToUpload->isValid() && !$fileToUpload->hasMoved()) {
|
||||||
|
$fileToUpload->move($filepath);
|
||||||
|
$fileName = $fileToUpload->getName();
|
||||||
|
$uploadedFiles[] = [
|
||||||
|
'file_name' => $fileName,
|
||||||
|
'file_path' => $filepath . $fileName
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $uploadedFiles; // always return array of files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!function_exists('file_unlink')) {
|
if (!function_exists('file_unlink')) {
|
||||||
function file_unlink($filepath)
|
function file_unlink($filepath)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,6 +11,7 @@ class ClaimFilesModel extends Model
|
|||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
'id',
|
'id',
|
||||||
'ticket_id',
|
'ticket_id',
|
||||||
|
'file_type',
|
||||||
'doc_name',
|
'doc_name',
|
||||||
'url',
|
'url',
|
||||||
'created_by',
|
'created_by',
|
||||||
|
|||||||
@ -1253,12 +1253,17 @@ $(document).ready(function(){
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(shouldClose){
|
||||||
|
console.log("alert closed")
|
||||||
|
localStorage.removeItem('vehicleFormData');
|
||||||
|
$("#vehicle_form").find("input, select, textarea").val("");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#aadhar').attr('data-parsley-required', 'false');
|
$('#aadhar').attr('data-parsley-required', 'false');
|
||||||
$('#aadhar').removeAttr('required');
|
$('#aadhar').removeAttr('required');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user