code_merge : hema

This commit is contained in:
heama 2024-03-02 14:03:53 +05:30
commit 0a0322276a
32 changed files with 8574 additions and 257 deletions

View File

@ -68,22 +68,33 @@ $routes->post('save_deposit', 'ClientController::saveDeposit');
$routes->group("relation", ["filter" => "authMVC"], function($routes){
$routes->post("create", "ClientController::createClientRelation");
$routes->post("edit", "ClientController::editClientRelation");
});
});
$routes->group("policy", ["filter" => "authMVC"], function($routes){
$routes->post("create", "ClientController::createClientPolicy");
$routes->post("edit", "ClientController::editClientPolicy");
$routes->get("list/(:any)", "ClientController::getClientPolicyById/$1");
$routes->post("policyGMCTerms", "ClientController::policyGMCTerms");
$routes->get("getterms", "ClientController::getterms");
});
$routes->group("kyc", ["filter" => "authMVC"], function($routes){
$routes->post("create", "ClientController::createClientKYCInfo");
$routes->post("edit", "ClientController::editClientKYCInfo");
$routes->get("list/(:any)", "ClientController::getKycDocsById/$1");
$routes->get("delete/(:any)", "ClientController::deleteClientKycDocs/$1");
});
$routes->group("premimum", ["filter" => "authMVC"], function($routes){
$routes->post("create", "ClientController::createClientPolicyPremium");
$routes->post("edit", "ClientController::editClientPolicyPremium");
});
$routes->group("terms", ["filter" => "authMVC"], function($routes){
$routes->post("gpa_create", "ClientController::policyGPATerms");
$routes->post("edit", "ClientController::editClientPolicyPremium");
});
});

View File

@ -27,7 +27,7 @@ use App\Models\StateModel;
use App\Models\PolicyGridModel;
use App\Models\PolicyPremium1Model;
use App\Models\PolicyPremium2Model;
use App\Models\EmployeeModel;
class ClientController extends AdminController
{
@ -53,8 +53,7 @@ class ClientController extends AdminController
protected $policyPremium1Model;
protected $policyPremium2Model;
protected $clientDepositModel;
protected $employeeModel;
public function __construct()
{
@ -78,8 +77,11 @@ class ClientController extends AdminController
$this->tpaModel = new TPAModel();
$this->stateModel = new StateModel();
$this->policyGridModel = new PolicyGridModel();
$this->policyPremium1Model = new PolicyPremium1Model();
$this->policyPremium2Model = new PolicyPremium2Model();
$this->policyPremium1Model = new PolicyPremium1Model();
$this->policyPremium2Model = new PolicyPremium2Model();
$this->employeeModel = new EmployeeModel();
}
public function index()
@ -158,7 +160,7 @@ public function view_Deposit($insurerId) {
$data['deposiamount'] = $this->clientPolicyModel->getDepositSummary($clientId, $insurerId);
// print_r($data['depositdata'] );die;
// print_r($data['depositdata'] );die;
// Load the view for the new list page
echo view('layout/header', $headerData);
echo view('view_deposit',$data);
@ -234,9 +236,11 @@ public function saveDeposit()
$insert = $this->clientModel->insert($data);
if($insert){
$client_data = $this->clientModel->where(['id' => $insert, 'is_active' => 1])->first();
echo json_encode(array("status" => true , 'data' => $client_data));
return $this->respond(['status' => true,'code' => 200,'data' => $client_data], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -248,9 +252,9 @@ public function saveDeposit()
$data['updated_by'] = get_session_userid();
$update = $this->clientModel->update($id,$data);
if($update){
echo json_encode(array("status" => true , 'data' => $data));
return $this->respond(['status' => true,'code' => 200,'data' => $data], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -269,9 +273,9 @@ public function saveDeposit()
if($insert){
$kycDocs = $this->clientKYCDocsModel->where('client_id',$this->request->getPost('client_id'))->findAll();
echo json_encode(array("status" => true , 'data' => $kycDocs, 'file_name' => $File));
return $this->respond(['status' => true,'code' => 200,'data' => $kycDocs, 'file_name' => $File], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -290,9 +294,10 @@ public function saveDeposit()
$insert = $this->clientKYCDocsModel->insert($data);
if($insert){
$kycDocs = $this->clientKYCDocsModel->getKycDocsName($id);
echo json_encode(array("status" => true , 'data' => $kycDocs));
return $this->respond(['status' => true,'code' => 200,'data' => $kycDocs], 200);
}else{
echo json_encode(array());
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -301,9 +306,9 @@ public function saveDeposit()
$delete = $this->clientKYCDocsModel->where('kyc_doc_type_id', $id)->delete();
if($delete){
echo json_encode(array("status" => true, 'id' => $id ));
return $this->respond(['status' => true,'code' => 200,'id' => $id], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -312,9 +317,9 @@ public function saveDeposit()
$delete = $this->clientKYCDocsModel->where('id', $id)->delete();
if($delete){
echo json_encode(array("status" => true, 'id' => $id ));
return $this->respond(['status' => true,'code' => 200,'id' => $id], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -348,9 +353,9 @@ public function saveDeposit()
}
if ($inserted) {
echo json_encode(array("status" => true, 'data' => $this->request->getPost()));
return $this->respond(['status' => true,'code' => 200,'data' => $this->request->getPost()], 200);
} else {
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404,'message' => 'no data found'], 200);
}
}
@ -400,9 +405,9 @@ public function saveDeposit()
$lastQuery = $this->clientRMModel->getLastQuery();
if ($inserted) {
echo json_encode(array("status" => true, 'data' => $this->request->getPost(), "place" => 'edit'));
return $this->respond(['status' => true,'code' => 200,'data' => $this->request->getPost(), "place" => 'edit'], 200);
} else {
echo json_encode(array("status" => false, "place" => 'edit'));
return $this->respond(['status' => false,'code' => 404,"place" => 'edit', 'message' => 'no data found'], 200);
}
}
@ -432,9 +437,9 @@ public function saveDeposit()
if($insert){
$branchData = $this->clientBranchModel->where('client_id', $this->request->getPost('client_id'))->findAll();
echo json_encode(array("status" => true , 'data' => $branchData));
return $this->respond(['status' => true,'code' => 200,'data' => $branchData], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -469,9 +474,9 @@ public function saveDeposit()
if($insert){
$branchData = $this->clientBranchModel->where('client_id', $client_id)->findAll();
echo json_encode(array("status" => true , 'data' => $branchData));
return $this->respond(['status' => true,'code' => 200,'data' => $branchData], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -496,12 +501,12 @@ public function saveDeposit()
$data['client_id'] = $this->request->getPost('client_id');
$data['insured'] = $this->request->getPost('insured');
$data['no_of_lives'] = $this->request->getPost('no_of_lives');
$data['policy_status'] = $this->request->getPost('policy_status');
$data['no_of_employees'] = $this->request->getPost('no_of_employees');
$data['earned_premium_date'] = change_date_format($this->request->getPost('earned_premium_date'), 'd-m-Y', 'Y-m-d');
$data['claims_incurred_date'] = change_date_format($this->request->getPost('claims_incurred_date'), 'd-m-Y', 'Y-m-d'); $data['incurred_claims_ratio'] = $this->request->getPost('incurred_claims_ratio');
$data['claims_incurred_date'] = change_date_format($this->request->getPost('claims_incurred_date'), 'd-m-Y', 'Y-m-d');
$data['incurred_claims_ratio'] = $this->request->getPost('incurred_claims_ratio');
$data['no_lives_at_inception'] = $this->request->getPost('no_lives_at_inception');
$data['premium_paid_at_inception'] = $this->request->getPost('premium_paid_at_inception');
$data['claims_experience_for_last_3_years'] = $this->request->getPost('claims_experience_for_last_3_years');
@ -519,9 +524,9 @@ public function saveDeposit()
$insert = $this->clientPolicyModel->insert($data);
if($insert){
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($this->request->getPost('client_id'));
echo json_encode(array("status" => true , 'data' => $clientPoliceData, 'method' => 'CERATE'));
return $this->respond(['status' => true,'code' => 200,'data' => $clientPoliceData, 'method' => 'CERATE'], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -571,13 +576,12 @@ public function saveDeposit()
if($insert){
$clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($client_id);
echo json_encode(array("status" => true , 'data' => $clientPoliceData , 'method' => 'EDIT'));
return $this->respond(['status' => true,'code' => 200,'data' => $clientPoliceData, 'method' => 'EDIT'], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
public function createClientPolicyPremium()
{
$policy_type = $this->request->getPost('policy_type');
@ -649,9 +653,10 @@ public function saveDeposit()
}
if($insert){
echo json_encode(array("status" => true , 'data' => $data));
return $this->respond(['status' => true,'code' => 200,'data' => $data], 200);
}else{
echo json_encode(array("status" => false , 'data' => $data));
return $this->respond(['status' => false,'code' => 404, 'data' => $data,'message' => 'no data found'], 200);
}
}
@ -667,11 +672,11 @@ public function saveDeposit()
$this->myLogger->logme('error','getKycDocsById function called');
if($id){
$kyc_docs_data = $this->kycDocsModel->where(['kyc_type_id' => $id, 'is_active' => 1])->findAll();
echo json_encode(array("status" => true , 'data' => $kyc_docs_data));
$this->myLogger->logme('error','getKycDocs status TRUE');
return $this->respond(['status' => true,'code' => 200,'data' => $kyc_docs_data], 200);
}else{
echo json_encode(array("status" => false));
$this->myLogger->logme('error','getKycDocs status FALSE');
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -680,9 +685,9 @@ public function saveDeposit()
$this->myLogger->logme('error','getPolicesByInsurerId function called');
if($id){
$police_data = $this->policesModel->where(['insurer_id' => $id, 'is_active' => 1])->findAll();
echo json_encode(array("status" => true , 'data' => $police_data));
return $this->respond(['status' => true,'code' => 200,'data' => $police_data], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -693,9 +698,9 @@ public function saveDeposit()
if($id){
$branch_data = $this->clientBranchModel->where(['id' => $id, 'is_active' => 1])->first();
$branch_contact_data = $this->levelContactModel->where(['ref_id' => $id, 'contact_type'=>'client', 'is_active' => 1])->findAll();
echo json_encode(array("status" => true , 'data' => $branch_data, 'contact' => $branch_contact_data));
return $this->respond(['status' => true,'code' => 200,'data' => $branch_data, 'contact' => $branch_contact_data], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -707,9 +712,9 @@ public function saveDeposit()
$client_policy_data = $this->clientPolicyModel->where(['id' => $id, 'is_active' => 1])->first();
$insurer_id = $client_policy_data['insurer_id'];
$polices = $this->policesModel->where(['insurer_id' => $insurer_id, 'is_active' => 1])->findAll();
echo json_encode(array("status" => true , 'data' => $client_policy_data, 'policy' => $polices));
return $this->respond(['status' => true,'code' => 200,'data' => $client_policy_data, "insurer_id" => $client_policy_data['insurer_id'], 'policy' => $polices], 200);
}else{
echo json_encode(array("status" => false));
return $this->respond(['status' => false,'code' => 404, 'message' => 'no data found'], 200);
}
}
@ -720,6 +725,19 @@ public function saveDeposit()
$policy_id = $this->request->getGet('policy_id');
$client_id = $this->request->getGet('client_id');
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
->where("employees.client_id",$client_id)
->where("employees.emp_status",'active')
->countAllResults();
if($emp_count = 0){
$emp_count = true;
}else{
$emp_count = false;
}
$data = $this->policesModel->getPolicyPremium($policy_id);
$pattern = '/gmc/i';
$subject = $data[0]->policy_type;
@ -731,18 +749,248 @@ public function saveDeposit()
$results = $this->policyGridModel->like('policy_type', $search_term)->findAll();
if($search_term === 'GPA'){
$premiumData = $this->policyPremium1Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
}else{
$premiumData = $this->policyPremium2Model->where(['client_id' => $client_id, 'client_policy_id' => $policy_id, 'is_active' => 1])->findAll();
}
// echo '<pre>';
// print_r($results);
// print_r($data[0]->policy_type); die;
echo json_encode(array("status" => true , 'data' => $results, 'premiumData' => $premiumData));
return $this->respond(['status' => true,'code' => 200,'data' => $results, 'premiumData' => $premiumData, 'count' => $emp_count], 200);
}
public function policyGMCTerms()
{
try {
$this->myLogger->logme('error','Terms CREATE function called');
// print_r($this->request->getPost());
$client_id = $this->request->getPost("client_id");
$policy_id = $this->request->getPost("policy_id");
$data['sum_insured'] =$this->request->getPost("sum_insured");
$data['family_floater'] =$this->request->getPost("family_floater");
// print_r($data['familyfloater']);
if (!$data['family_floater'] || $data['family_floater'] == 0) {
$data['corporatebuffer'] = "";
$data['family_floaters'] = "";
}else{
$data['corporatebuffer'] = $this->request->getPost("corporatebuffer");
$data['family_floaters'] = $this->request->getPost("family_floaters") ?? [];
}
$data['waiverofpreexistingdiseases'] =$this->request->getPost("waiverofpreexistingdiseases");
if ($data['waiverofpreexistingdiseases'] == 1) {
$data['maternitycoverage'] =$this->request->getPost("maternitycoverage");
$data['twindelivery'] =$this->request->getPost("twindelivery");
$data['preandpostnatal'] =$this->request->getPost("preandpostnatal");
$data['babyday1cover'] =$this->request->getPost("babyday1cover");
}else{
$data['maternitycoverage'] ="";
$data['twindelivery'] ="";
$data['preandpostnatal'] ="";
$data['babyday1cover'] ="";
}
$data['9monthwaitingperiodwaived'] =$this->request->getPost("9monthwaitingperiodwaived");
$data['coverfromthedateofjoining'] =$this->request->getPost("coverfromthedateofjoining");
$data['waiverof1,2,3&4thyearexclusions'] =$this->request->getPost("waiverof1,2,3&4thyearexclusions");
$data['waiverof30dayswaitingperiod'] =$this->request->getPost("waiverof30dayswaitingperiod");
$data['prehospitalizationcover'] =$this->request->getPost("prehospitalizationcover");
// $data['posthospitalizationcover'] =$this->request->getPost("posthospitalizationcover");
$data['congenitaldiseasesinternal'] =$this->request->getPost("congenitaldiseasesinternal");
// $data['congenitaldiseasesexternal'] =$this->request->getPost("congenitaldiseasesexternal");
$data['copayzonewisecopay'] =$this->request->getPost("copayzonewisecopay");
$data['bioabsorbablestenttoriclensmultifocallens'] =$this->request->getPost("bioabsorbablestenttoriclensmultifocallens");
$data['roomrentlimit'] =$this->request->getPost("roomrentlimit");
$data['proportionatedeductionclause'] =$this->request->getPost("proportionatedeductionclause");
$data['nursingallowance'] =$this->request->getPost("nursingallowance");
$data['ailmentcapping'] =$this->request->getPost("ailmentcapping");
$data['ambulancecharges'] =$this->request->getPost("ambulancecharges");
$data['airambulance'] =$this->request->getPost("airambulance");
$data['familytransportationbenefit'] =$this->request->getPost("familytransportationbenefit");
$data['reasonableandcustomarycharges'] =$this->request->getPost("reasonableandcustomarycharges");
$data['ayudhtreatmentcover'] =$this->request->getPost("ayudhtreatmentcover");
$data['armdcovered'] =$this->request->getPost("armdcovered");
$data['suminsuredenhancement'] =$this->request->getPost("suminsuredenhancement");
$data['automaticsuminsuredreinstatement'] =$this->request->getPost("automaticsuminsuredreinstatement");
$data['additionalsicknessbenefit'] =$this->request->getPost("additionalsicknessbenefit");
$data['lasiksurgery'] =$this->request->getPost("lasiksurgery");
$data['midterminclusion'] =$this->request->getPost("midterminclusion");
$data['capd'] =$this->request->getPost("capd");
$data['organdonorexpenses'] =$this->request->getPost("organdonorexpenses");
$data['moderntreatmentsasperirdai'] =$this->request->getPost("moderntreatmentsasperirdai");
$data['Wellness'] =$this->request->getPost("Wellness");
$data['days_of_discharge'] =$this->request->getPost("days_of_discharge");
$data['days_from_dod'] =$this->request->getPost("days_from_dod");
$data['special_condition_label'] = $this->request->getPost("special_condition_label") ?? [];
$data['special_condition_input'] = $this->request->getPost("special_condition_input") ?? [];
$jsonData = json_encode($data);
$dataa = array(
'policy_terms' => $jsonData,
'client_id' => $client_id,
'policy_id' => $policy_id
);
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
if ($record) {
$update = $this->clientPolicyModel->update($record['id'], $dataa);
if ($update) {
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
} else {
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to update data'], 200);
}
}else{
$insert = $this->clientPolicyModel->insert($dataa);
if ($insert) {
return $this->respond(['status' => true,'code' => 200,'message' => 'Data stored successfully'], 200);
} else {
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to store data'], 200);
}
}
} catch (\Exception $e) {
echo "Failed to insert data: " . $e->getMessage();
// Log the error
log_message('error', 'Failed to insert data: ' . $e->getMessage());
}
}
public function getterms()
{
$client_id = $this->request->getVar('client_id');
$policy_id = $this->request->getVar('policy_id');
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
$emp_count = $this->employeeModel ->join('client_policy cp',"employees.client_id = cp.client_id")
->join('employee_polices ep',"cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
->where("employees.client_id",$client_id)
->where("employees.emp_status",'active')
->countAllResults();
if($emp_count = 0){
$emp_count = true;
}else{
$emp_count = false;
}
if ($record) {
return $this->respond(['Status' => true,'code' => 200,'data' => $record['policy_terms'], 'count' => $emp_count], 200);
} else {
return $this->respond(['Status' => false,'code' => 200,'message' => 'Record not found.', 'count' => $emp_count], 200);
}
}
public function policyGPATerms()
{
try {
$this->myLogger->logme('error','Policy GPA Terms CREATE function called');
// print_r($this->request->getPost());
$client_id = $this->request->getPost("client_id");
$policy_id = $this->request->getPost("policy_id");
$data['sumInsured2'] =$this->request->getPost("sumInsured2");
$data['totalSumInsured'] =$this->request->getPost("totalSumInsured");
$data['accidentalDeathBenefit'] =$this->request->getPost("accidentalDeathBenefit");
$data['permanentTotalDisablement'] =$this->request->getPost("permanentTotalDisablement");
$data['permanentPartialDisablement'] =$this->request->getPost("permanentPartialDisablement");
$data['temporaryTotalDisablementBenefit'] =$this->request->getPost("temporaryTotalDisablementBenefit");
$data['accidentalHospitalizationExpenses'] =$this->request->getPost("accidentalHospitalizationExpenses");
$data['childrenEducationWelfareFund'] =$this->request->getPost("childrenEducationWelfareFund");
$data['compassionateVisitExpenses'] =$this->request->getPost("compassionateVisitExpenses");
if ($data['compassionateVisitExpenses'] == 1) {
$data['compassionateVisitExpensesData'] =$this->request->getPost("compassionateVisitExpensesData");
}else{
$data['compassionateVisitExpensesData'] ="";
}
$data['brokenBoneExpenses'] = $this->request->getPost("brokenBoneExpenses");
if ($data['brokenBoneExpenses'] == 1) {
$data['brokenBoneExpensesData'] = $this->request->getPost("brokenBoneExpensesData");
}else{
$data['brokenBoneExpensesData'] ="";
}
$data['ambulanceCharges'] =$this->request->getPost("ambulanceCharges");
if ($data['ambulanceCharges'] == 1) {
$data['ambulanceChargesData'] =$this->request->getPost("ambulanceChargesData");
}else{
$data['ambulanceChargesData'] ="";
}
$data['burnExpenses'] = $this->request->getPost("burnExpenses");
if ($data['burnExpenses'] == 1) {
$data['burnExpensesData'] = $this->request->getPost("burnExpensesData");
}else{
$data['burnExpensesData'] = "";
}
$data['carriageOfDeadBody'] = $this->request->getPost("carriageOfDeadBody");
if ($data['carriageOfDeadBody'] == 1) {
$data['carriageOfDeadBodyData'] = $this->request->getPost("carriageOfDeadBodyData");
}else{
$data['carriageOfDeadBodyData'] = "";
}
$data['animalSnakeInsectBite'] = $this->request->getPost("animalSnakeInsectBite");
$data['terrorism'] = $this->request->getPost("terrorism");
$data['worldwideCover'] = $this->request->getPost("worldwideCover");
print_r($data);
// print_r($this->request->getPost());
// die();
$jsonData = json_encode($data);
$dataa = array(
'policy_terms' => $jsonData,
'client_id' => $client_id,
'policy_id' => $policy_id
);
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
if ($record) {
$update = $this->clientPolicyModel->update($record['id'], $dataa);
if ($update) {
return $this->respond(['status' => true,'code' => 200,'message' => 'Data updated successfully'], 200);
} else {
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to update data'], 200);
}
}else{
$insert = $this->clientPolicyModel->insert($dataa);
if ($insert) {
return $this->respond(['status' => true,'code' => 200,'message' => 'Data stored successfully'], 200);
} else {
return $this->respond(['status' => false,'code' => 404, 'message' => 'Failed to store data'], 200);
}
}
} catch (\Exception $e) {
// Handle the exception
echo "Failed to insert data: " . $e->getMessage();
// Log the error
log_message('error', 'Failed to insert data: ' . $e->getMessage());
}
}
public function getPolicyGPATerms(){
$client_id = $this->request->getVar('client_id');
$policy_id = $this->request->getVar('policy_id');
$record = $this->clientPolicyModel->where(['client_id' => $client_id, 'policy_id' => $policy_id])->first();
if ($record) {
echo $record['policy_terms'];
} else {
echo "Record not found.";
}
}

View File

@ -16,6 +16,8 @@ class ClientPolicyModel extends Model
"insurer_branch_id",
"tpa_id",
"tpa_branch_id",
"policy_type_id",
"policy_start_date",
"policy_end_date",
@ -33,6 +35,7 @@ class ClientPolicyModel extends Model
"earned_premium_amount",
"claims_incurred_amount",
"policy_terms",
"created_by",
"updated_by",
"Is_active",

View File

@ -139,6 +139,9 @@ $(document).ready(function () {
form_action = '<?= base_url("client/general/edit"); ?>';
}
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var formData = new FormData($('#general_form')[0]);
var OptionsHTML1 = ''
@ -150,20 +153,29 @@ $(document).ready(function () {
processData: false,
contentType: false,
success: function(res) {
if(res){
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
$('#kyc_tab').click();
var message = (PrimaryKey === '') ? 'Client General Info Created successfully' : 'Client General Info Updated successfully';
toastr.success(message, 'Success');
}, 1000);
}
console.log(res);
$('#client_id').val(res.data.id);
$('#client_id_relation').val(res.data.id);
$('#relation_PrimaryKey').val(res.data.id);
$('#client_id_branch').val(res.data.id);
$('#branch_PrimaryKey').val(res.data.id);
$('#client_id_policy').val(res.data.id);
$('#policy_PrimaryKey').val(res.data.id);
$('#client_id_kyc').val(res.data.id);
$('#kyc_PrimaryKey').val(res.data.id);
$('#entity_type').val(res.data.entity_type_id);
$('#kyc_tab').click();
var message = (PrimaryKey === '') ? 'Client General Info Created successfully' : 'Client General Info Updated successfully';
toastr.success(message, 'Success');
$.ajax({
url: '<?= base_url("client/kyc/list/"); ?>' + res.data.entity_type_id,

View File

@ -237,6 +237,9 @@ $(document).ready(function () {
if (isValid) {
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var formData = new FormData($('#branch_form')[0]);
$.ajax({
@ -247,9 +250,21 @@ $(document).ready(function () {
processData: false,
contentType: false,
success: function(res) {
console.log(res);
var message = (branch_PrimaryKey === '') ? 'Client General Info Created successfully' : 'Client General Info Updated successfully';
toastr.success(message, 'Success');
if(res){
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
$('#add_branch').hide();
$('#branch_table').show();
$('.btnBack').hide();
$('#btnBranchAdd').show();
var message = (branch_PrimaryKey === '') ? 'Client Branch Created successfully' : 'Client Branch Updated successfully';
toastr.success(message, 'Success');
}, 1000);
}
$('#branch_list tr').remove();
var branchTableInsert = ''
$.each(res.data, function(index, item) {
@ -262,10 +277,7 @@ $(document).ready(function () {
`;
});
$('#branch_list').append(branchTableInsert);
$('#add_branch').hide();
$('#branch_table').show();
$('.btnBack').hide();
$('#btnBranchAdd').show();
},
error: function (xhr, status, error) {
console.error(xhr.responseText);

View File

@ -105,7 +105,9 @@
$(document).on('click', '.submit', function(e) {
e.preventDefault();
kycPrimaryKey = $('#kyc_PrimaryKey').val();
// kycPrimaryKey = $('#kyc_PrimaryKey').val();
kycPrimaryKey = $('#client_id_kyc').val();
var form = $(this).closest('form');
var formData = new FormData(form[0]);
@ -149,8 +151,8 @@
processData: false,
contentType: false,
success: function (res) {
res = JSON.parse(res)
console.log(res);
// res = JSON.parse(res)
// console.log(res);
form.trigger('reset')
$.each(res.data, function (index, item) {
@ -168,8 +170,6 @@
});
});
;
if(kycPrimaryKey !== ''){
$.ajax({
@ -203,8 +203,10 @@
}
});
var table = '';
var data = <?= isset($client_kyc) ? json_encode($client_kyc) : '[]' ?>;
console.log(data)
$('#other_docs tr').remove();
$.each(data, function(index, item) {
@ -221,14 +223,15 @@
});
$('#other_docs').append(table);
$.each(data, function(index, item) {
// console.log(item.kyc_doc_type_id);
// console.log('name_' + item.kyc_doc_type_id);
// console.log(document.getElementById('name_' + item.kyc_doc_type_id));
setTimeout(function() {
$('#name_'+item.kyc_doc_type_id).show();
$('#name_'+item.kyc_doc_type_id).html(item.file_name);
$('#form_'+item.kyc_doc_type_id).hide();
$('#name_'+item.id).show();
$('#name_'+item.id).html(item.file_name);
$('#form_'+item.id).hide();
}, 1000);
});

View File

@ -36,12 +36,15 @@ body {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 class="header-title" style="position: relative;">Client Onboarding</h4>
<h4 class="header-title" 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"); ?>" class="btn btn-primary waves-effect waves-light">Back</a> -->
</div>
</div>
<br>
<ul class="nav nav-pills navtab-bg">
<li class="nav-item">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false"

View File

@ -1,4 +1,12 @@
<?php include('policy_grid.php'); ?>
<style>
th {
text-align: center;
}
td{
text-align: center;
}
</style>
<div class="tab-pane fade" id="police-tab">
@ -15,6 +23,8 @@
<th>Insurer</th>
<th>Policy</th>
<th>TPA</th>
<th>Date</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
@ -38,7 +48,7 @@
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
<input type="hidden" name="PrimaryKey" id="policy_PrimaryKey" />
<input type="hidden" id="policy_form_action" />
<input type="hidden" id="policy_type_id" id="policy_type_id"/>
<input type="hidden" name="policy_type_id" id="policy_type_id"/>
<input type="hidden" name="client_id" id="client_id_policy" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<div class="form-group">
@ -73,13 +83,17 @@
</div>
<div class="form-row">
<div class="form-group col-md-6">
<div class="form-group col-md-4">
<label for="policy_start_date">Policy Start Date<span class="text-danger">*</span></label>
<input value="" type="date" class="form-control" placeholder="Enter Start Date " name="policy_start_date" id="start_date" required>
<input value="" type="text" class="form-control" placeholder="Enter Start Date " name="policy_start_date" id="start_date" required>
</div>
<div class="form-group col-md-6">
<div class="form-group col-md-4">
<label for="policy_end_date">Policy End Date<span class="text-danger">*</span></label>
<input value="" type="date" class="form-control" placeholder="Enter End Date " name="policy_end_date" id="end_date" required>
<input value="" type="text" class="form-control" placeholder="Enter End Date " name="policy_end_date" id="end_date" required>
</div>
<div class="form-group col-md-4">
<label for="policy_status">Policy Status</label>
<input value="" type="text" class="form-control" placeholder="Policy Status" id="policy_status" readonly>
</div>
</div>
@ -101,162 +115,198 @@
</div>
<!-- end -->
<?php include('policy_grid.php'); ?>
<?php include('policy_gmc_terms.php'); ?>
<?php include('policy_gpa_terms.php'); ?>
<script>
var policy_PrimaryKey = $('#client_id_policy').val();
var policy_client = $('#policy_PrimaryKey').val();
var policy_PrimaryKey = $('#client_id_policy').val();
var policy_client = $('#policy_PrimaryKey').val();
$(document).ready(function () {
$(document).ready(function () {
//Configure Flatpicker for the policy start date datepicker.
flatpickr("#start_date", {
dateFormat: "d-m-Y",
defaultDate: "today",
allowInput: false,
});
// Get today's date
var today = new Date();
//Configure Flatpicker for the policy end date datepicker.
flatpickr("#end_date", {
dateFormat: "d-m-Y",
defaultDate: "today",
allowInput: false
});
$('#add_form').hide();
$('.btnBack').hide();
$('.btnAdd').click(function(){
$('#add_form').show();
$('#table_list').hide();
$('.btnBack').show();
$('.btnAdd').hide();
$('#policy_form_action').val('<?= base_url("client/policy/create"); ?>');
})
$('.btnBack').click(function(){
$('#GMC').remove();
$('#GPA').remove();
$('#add_form').hide();
$('#table_list').show();
$('.btnBack').hide();
$('.btnAdd').show();
$('#insurer').val('');
$('#tpa').val('');
$('#start_date').val('');
$('#end_date').val('');
$('#policy').html('<option value="" selected>Select Policy</option>');
})
if (policy_PrimaryKey !== '') {
var policyTable = '';
var data = <?= isset($client_policy) ? json_encode($client_policy) : '[]' ?>;
data.forEach(function(item) {
policyTable += `
<tr>
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
<td>${item.policy_name}</td>
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
<td>
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>&nbsp;&nbsp;
<a data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px;"></a>
</td>
</tr>
`;
// Initialize Flatpickr for the start date with today's date
var startDatePicker = flatpickr("#start_date", {
dateFormat: "d-m-Y",
defaultDate: today,
allowInput: false,
onChange: function(selectedDates, dateStr, instance) {
var endDate = new Date(selectedDates[0]);
endDate.setFullYear(endDate.getFullYear() + 1);
endDatePicker.setDate(endDate);
}
});
$('#policy_table').append(policyTable);
}
// Calculate the end date (today + 1 year)
var endDate = new Date(today);
endDate.setFullYear(endDate.getFullYear() + 1);
// Initialize Flatpickr for the end date with the calculated end date
var endDatePicker = flatpickr("#end_date", {
dateFormat: "d-m-Y",
defaultDate: endDate,
allowInput: false
});
});
//for form submit using AJAX
$("#policy_form").submit(function(event) {
event.preventDefault();
policy_PrimaryKey = $('#client_id_policy').val();
policy_client = $('#policy_PrimaryKey').val();
if (policy_PrimaryKey === '' && policy_client === '') {
toastr.error('Client is required', 'Error');
$('#insurer').val('');
$('#tpa').val('');
$('#policy').html('<option value="" selected>Select Policy</option>');
return;
}
var isValid = $('#policy_form').parsley().validate();
if (!isValid) {
console.log('Form is Empty', 'Warning');
return ;
}
var formData = new FormData($('#policy_form')[0]);
var policy_form_action = $('#policy_form_action').val();
$.ajax({
data: formData,
url: policy_form_action,
type: "POST",
dataType: 'json',
processData: false,
contentType: false,
success: function(res) {
$('#add_form').hide();
$('.btnBack').hide();
if (res.status === false) {
toastr.error('Policy Dose Not Create', 'Error');
return;
$('.btnAdd').click(function(){
$('#add_form').show();
$('#table_list').hide();
$('.btnBack').show();
$('.btnAdd').hide();
$('#policy_form_action').val('<?= base_url("client/policy/create"); ?>');
})
$('.btnBack').click(function(){
$('#GMC').remove();
$('#GPA').remove();
$('#add_form').hide();
$('#table_list').show();
$('.btnBack').hide();
$('.btnAdd').show();
$('#insurer').val('');
$('#tpa').val('');
$('#start_date').val('');
$('#end_date').val('');
$('#policy').html('<option value="" selected>Select Policy</option>');
})
if (policy_PrimaryKey !== '') {
var policyTable = '';
var data = <?= isset($client_policy) ? json_encode($client_policy) : '[]' ?>;
data.forEach(function(item) {
policyTable += `
<tr>
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
<td>${item.policy_name}</td>
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
<td>${checkDateStatus(item.policy_end_date, 1)}</td>
<td>
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>&nbsp;&nbsp;
<a data-id="${item.policy_id}" class="btnPolicyMaster mdi mdi-wrench" href="#" data-toggle="modal" id="${item.policy_type_id}" style="font-size:18px;"></a>
<a data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px; margin-left: 7px;"></a>
</td>
</tr>
`;
});
$('#policy_table').append(policyTable);
}
console.log(res);
var message = (policy_PrimaryKey === '') ? 'Policy Created successfully' : 'Policy Updated Successfully';
toastr.success(message, 'Success');
$('#policy_table tr').remove();
var policyTable = '';
$.each(res.data, function(index, item) {
policyTable += `
<tr>
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
<td>${item.policy_name}</td>
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
<td>
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>&nbsp;&nbsp;
<a data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px;"></a>
</td>
</tr>
`;
});
/******** for form submit using AJAX *******/
$("#policy_form").submit(function(event) {
event.preventDefault();
policy_PrimaryKey = $('#client_id_policy').val();
policy_client = $('#policy_PrimaryKey').val();
if (policy_PrimaryKey === '' && policy_client === '') {
toastr.error('Client is required', 'Error');
$('#insurer').val('');
$('#tpa').val('');
$('#policy').html('<option value="" selected>Select Policy</option>');
return;
}
var isValid = $('#policy_form').parsley().validate();
if (!isValid) {
console.log('Form is Empty', 'Warning');
return ;
}
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var formData = new FormData($('#policy_form')[0]);
var policy_form_action = $('#policy_form_action').val();
$.ajax({
data: formData,
url: policy_form_action,
type: "POST",
dataType: 'json',
processData: false,
contentType: false,
success: function(res) {
if (res.status === false) {
toastr.error('Policy Dose Not Create', 'Error');
return;
}
if(res){
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
$('#add_form').hide();
$('#table_list').show();
$('.btnBack').hide();
$('.btnAdd').show();
var message = (policy_PrimaryKey === '') ? 'Policy Created successfully' : 'Policy Updated Successfully';
toastr.success(message, 'Success');
}, 1000);
}
$('#policy_table tr').remove();
var policyTable = '';
$.each(res.data, function(index, item) {
policyTable += `
<tr>
<td>${item.insurer_short} - ${item.insurer_branch_name}</td>
<td>${item.policy_name}</td>
<td>${item.tpa_short} - ${item.tpa_branch_code}</td>
<td>${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}</td>
<td>${checkDateStatus(item.policy_end_date)}</td>
<td>
<a data-id="${item.id}" class="btnPolicyEdit mdi mdi-lead-pencil" href="#" style="font-size:18px;"></a>&nbsp;&nbsp;
<a data-id="${item.policy_id}" class="btnPolicyMaster mdi mdi-wrench" href="#" data-toggle="modal" data-target="${item.policy_type_id}" style="font-size:18px; margin-left: 7px;"></a>
<a data-id="${item.policy_id}" class="btnPolicyModel mdi mdi-book-open" href="#" data-toggle="modal" data-target="#bs-example-modal-lg" style="font-size:18px;"></a>
</td>
</tr>
`;
});
$('#policy_table').append(policyTable);
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
}
});
$('#policy_table').append(policyTable);
$('#add_form').hide();
$('#table_list').show();
$('.btnBack').hide();
$('.btnAdd').show();
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
}
});
});
});
//To get th POLICY base on Insurer
/********* To get th POLICY base on Insurer *******/
$('#insurer').change(function() {
var id = $(this).val();
var url = "<?= base_url("util/police-by-insurer/") ?>" + id;
var parts = id.split('-');
var secondPart = parts[1];
var url = "<?= base_url("util/police-by-insurer/") ?>" + secondPart;
$.get(url, function(res) {
res = JSON.parse(res)
// res = JSON.parse(res)//
console.log(res)
var OptionsHTML = '';
OptionsHTML += '<option value="" selected>Select Policy</option>';
@ -274,13 +324,17 @@ $.ajax({
// set the Policy_Type_id for Form Submit
$('#policy').change(function(){
var dataId = $(this).children('option:selected').attr('data-id');
console.log('dataId', dataId)
$('#policy_type_id').val(dataId);
if(dataId == 1){
appendPolicyFormFields(1)
}else{
appendPolicyFormFields(2)
}
// if(dataId == 1){
// appendPolicyFormFields(1);
// }else if (dataId >= 1){
// appendPolicyFormFields(2);
// }
});
@ -288,16 +342,18 @@ $.ajax({
$('body').on('click', '.btnPolicyEdit', function () {
var policy_form_action = '';
var policy_id = $(this).data('id');
console.log('1', policy_id)
var policyId = $(this).attr('data-id');
console.log('2', policyId)
// var policy_id = $(this).data('id');
// console.log('1', policy_id)
var policy_id = $(this).attr('data-id');
console.log('2', policy_id)
$.ajax({
url: '<?= base_url("client/policy/list/") ?>' + policy_id,
type: "GET",
dataType: 'json',
success: function (res) {
console.log('clientPolicy : ', res);
$('#policy_form_action').val('<?= base_url("client/policy/edit"); ?>');
@ -318,15 +374,17 @@ $.ajax({
$('#policy_PrimaryKey').val(res.data.id);
$('#start_date').val(rearrangeDateFormat(res.data.policy_start_date));
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
if(res.data.policy_type_id == 1){
appendPolicyFormFields(1, res.data);
}else {
}else if(res.data.policy_type_id >= 2) {
appendPolicyFormFields(2, res.data);
}
var policeOptionHTML = '';
$.each(res.policy, function(index, item) {
console.log(item)
policeOptionHTML += '<option data-id="' + item.policy_type_id + '" value="' + item.id + '" ' + (res.data.policy_id === item.id ? 'selected="selected"' : '') + '>' + item.name + '</option>';
});
$('#policy').html(policeOptionHTML);
@ -351,24 +409,6 @@ $.ajax({
html = `
<div id="GMC">
<div class="form-row">
<div class="form-group col-md-3">
<label for="insured">Insured<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.insured : ''}" type="text" class="form-control" placeholder="Enter insured " name="insured" id="insured" required>
</div>
<div class="form-group col-md-3">
<label for="no_of_employees">No of Employees<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_of_employees : ''}" type="text" class="form-control" placeholder="Enter No of Employees" name="no_of_employees" id="no_of_employees" required>
</div>
<div class="form-group col-md-3">
<label for="no_of_lives">No of Lives<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_of_lives : ''}" type="text" class="form-control" placeholder="Enter No of Lives " name="no_of_lives" id="no_of_lives" required>
</div>
<div class="form-group col-md-3">
<label for="no_lives_at_inception">No Lives at Inception<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_lives_at_inception : ''}" type="text" class="form-control" placeholder="Enter No Lives at Inception " name="no_lives_at_inception" id="no_lives_at_inception" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
@ -389,6 +429,21 @@ $.ajax({
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<label for="no_of_employees">No of Employees<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_of_employees : ''}" type="text" class="form-control" placeholder="Enter No of Employees" name="no_of_employees" id="no_of_employees" required>
</div>
<div class="form-group col-md-3">
<label for="no_of_lives">No of Lives<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_of_lives : ''}" type="text" class="form-control" placeholder="Enter No of Lives " name="no_of_lives" id="no_of_lives" required>
</div>
<div class="form-group col-md-3">
<label for="no_lives_at_inception">No Lives at Inception<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_lives_at_inception : ''}" type="text" class="form-control" placeholder="Enter No Lives at Inception " name="no_lives_at_inception" id="no_lives_at_inception" required>
</div>
</div>
<hr>
<div class="form-row">
@ -398,7 +453,7 @@ $.ajax({
</div>
<div class="form-group col-md-4">
<label for="incurred_claims_ratio">Incurred Claims Ratio<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.incurred_claims_ratio : ''}" type="text" class="form-control" placeholder="Enter Claims Ratio" name="incurred_claims_ratio" id="incurred_claims_ratio" required>
<input value="${data !== false && data !== undefined && data !== '' ? data.incurred_claims_ratio : '0'}" type="text" class="form-control" placeholder="Enter Claims Ratio" name="incurred_claims_ratio" id="incurred_claims_ratio" readonly required>
</div>
<div class="form-group col-md-4">
<label for="policy_status">Policy Status<span class="text-danger">*</span></label>
@ -413,19 +468,15 @@ $.ajax({
html = `
<div class="form-row" id="GPA">
<div class="form-group col-md-3">
<label for="insured">Insured<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.insured : ''}" type="text" class="form-control" placeholder="Enter insured " name="insured" id="insured" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="no_of_employees">No of Employees<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.no_of_employees : ''}" type="text" class="form-control" placeholder="Enter No of Employees" name="no_of_employees" id="no_of_employees" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="policy_status">Policy Status<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.policy_status : ''}" type="text" class="form-control" placeholder="Enter Policy Status " name="policy_status" id="policy_status" required>
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-4">
<label for="claims_experience_for_last_3_years">Claims Experience for Last 3 Years<span class="text-danger">*</span></label>
<input value="${data !== false && data !== undefined && data !== '' ? data.claims_experience_for_last_3_years : ''}" type="text" class="form-control" placeholder="Enter Claims Experience for Last 3 Years " name="claims_experience_for_last_3_years" id="claims_experience_for_last_3_years" required>
</div>
@ -450,6 +501,40 @@ $.ajax({
});
}
$('#earned_premium_amount').keyup(function(){
var PA = parseFloat($(this).val());
var CA = parseFloat($('#claims_incurred_amount').val());
// console.log('earned_premium_amount',PA)
// console.log('claims_incurred_amount',CA)
if (!isNaN(PA) && !isNaN(CA) && CA !== 0) {
var incurredClaimRatio = CA / PA;
// console.log(incurredClaimRatio)
$('#incurred_claims_ratio').val(incurredClaimRatio.toFixed(2));
} else {
$('#incurred_claims_ratio').val('0');
}
});
$('#claims_incurred_amount').keyup(function(){
var CA = $(this).val()
var PA = $('#earned_premium_amount').val()
// console.log('earned_premium_amount',PA)
// console.log('claims_incurred_amount',CA)
if (!isNaN(PA) && !isNaN(CA) && CA !== 0) {
var incurredClaimRatio = CA / PA;
// console.log(incurredClaimRatio)
$('#incurred_claims_ratio').val(incurredClaimRatio.toFixed(2));
} else {
$('#incurred_claims_ratio').val('0');
}
})
}
@ -465,4 +550,78 @@ $.ajax({
}
}
function checkDateStatus(inputDate, bg = false) {
var givenDate = new Date(inputDate);
var currentDate = new Date();
if(bg != false){
if (givenDate < currentDate) {
return `<span class="badge badge-danger">Expired</span>`;
} else {
return `<span class="badge badge-success">Active</span>`;
}
}else{
if (givenDate < currentDate) {
return `Expired`;
} else {
return `Active`;
}
}
}
// Function to convert numbers into Indian numbering system
function convertToIndianNumberingSystem(number) {
// Define Indian numbering system
var suffixes = ["", "Thousand", "Lakh", "Crore"];
// Split the number into groups of 3 digits each
var numberChunks = [];
while (number > 0) {
numberChunks.push(number % 1000);
number = Math.floor(number / 1000);
}
// Convert each chunk into words
var result = "";
for (var i = 0; i < numberChunks.length; i++) {
if (numberChunks[i] !== 0) {
result = convertThreeDigitNumberToWords(numberChunks[i]) + " " + suffixes[i] + " " + result;
}
}
return result.trim();
}
// Function to convert a three-digit number into words
function convertThreeDigitNumberToWords(num) {
var ones = ["", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"];
var tens = ["", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"];
var teens = ["", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"];
var words = "";
// Convert hundreds place
if (Math.floor(num / 100) > 0) {
words += ones[Math.floor(num / 100)] + " Hundred ";
num %= 100;
}
// Convert tens and ones place
if (num >= 20) {
words += tens[Math.floor(num / 10)] + " ";
num %= 10;
} else if (num >= 11 && num <= 19) {
words += teens[num - 10] + " ";
num = 0;
}
if (num > 0) {
words += ones[num] + " ";
}
return words.trim();
}
</script>

View File

@ -115,6 +115,9 @@ $(document).ready(function(){
if (isValid) {
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
if(relation_PrimaryKey === ''){
form_action = '<?= base_url("client/relation/create"); ?>';
}else{
@ -132,9 +135,18 @@ $(document).ready(function(){
contentType: false,
success: function(res) {
console.log(res);
var message = (relation_PrimaryKey === '') ? 'Client Relation Created successfully' : 'Client Relation Updated successfully';
toastr.success(message, 'Success');
$('#branch_tab').click();
if(res){
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
var message = (relation_PrimaryKey === '') ? 'Client Relation Created successfully' : 'Client Relation Updated successfully';
toastr.success(message, 'Success');
$('#branch_tab').click();
}, 1000);
}
},
error: function(xhr, status, error) {
console.error(xhr.responseText);

View File

@ -36,7 +36,7 @@ body {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 class="header-title" style="position: relative;">Insurer Onboarding</h4>
<h4 class="header-title" style="position: relative;">Insurer</h4>
</div>
<!-- <div class="col-6" style="text-align: right;">
<a href="<?= base_url("master/insurer/list"); ?>" class="btn btn-primary waves-effect waves-light">Back</a>

View File

@ -36,7 +36,7 @@ body {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 class="header-title" style="position: relative;">KYC Entity Type Onboarding</h4>
<h4 class="header-title" style="position: relative;">KYC Entity Type</h4>
</div>
<!-- <div class="col-6" style="text-align: right;">
<a href="<?= base_url("master/kyc/list"); ?>" class="btn btn-primary waves-effect waves-light">Back</a>

View File

@ -489,9 +489,17 @@
<!-- bootstrap datepicker -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.10.0/js/bootstrap-datepicker.min.js"></script> -->
<script src="<?= base_url()."public"; ?>/assets/js/pages/jquery.xeditable.js"></script>
<script src="<?= base_url()."public"; ?>/assets/js/form-xeditable.init.js"></script>
<script src="<?= base_url()."public"; ?>/assets/js/bootstrap-editable.min.js"></script>
<!-- Jodit Js -->
<script src="<?= base_url()."public"; ?>/assets/js/jodit.min.js"></script>
<script>
toastr.options = {
"timeOut": 2000,
"closeButton": true,
@ -499,5 +507,6 @@ toastr.options = {
</script>
</body>
</html>

View File

@ -31,8 +31,22 @@
<!-- icons -->
<link href="<?= base_url()."public"; ?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<!-- <link href="<?= base_url()."public"; ?>/assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" /> -->
<!-- <link href="<?= base_url()."public"; ?>/assets/css/app-material.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" /> -->
<!-- <link href="<?= base_url()."public"; ?>/assets/css/bootstrap-editable.css" rel="stylesheet" type="text/css" /> -->
<!-- Jodit Css -->
<link href="<?= base_url()."public"; ?>/assets/css/jodit.css" rel="stylesheet" type="text/css" />
<!-- JQuery CDN -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
@ -197,10 +211,11 @@
});
</script>
</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>
<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>
<!-- Preloader -->
<div class="loader-mask">

View File

@ -0,0 +1,659 @@
<!-- Modal content for the Large example -->
<style>
.button-like {
display: inline-block;
padding: 8px 15px;
background-color: #02a8b5;
color: white;
text-decoration: none;
border-radius: 2px;
cursor: pointer;
margin-right: -85px;
}
.radiobuttondiv{
margin-left: 32px;
}
.form-control-client-policy-master{
width:62% !important;
margin-left: 30px;
margin-top: 3px
}
/* .form-group.col-md-6 */
.form-group-client-policy-master{
display:-webkit-box;
max-width: 100% !important;
/* border:1px solid; */
/* background-color: #0001; */
}
.form-group-client-policy-masters{
display:-webkit-box;
max-width: 100% !important;
}
.flex-container {
display: block;
/* flex-wrap: wrap; */
/* align-items: center; Align items vertically center */
}
.flex-container > div {
flex: 1; /* Each div takes equal space */
}
label{
padding-top: 7px;
width: 400px;
/* background-color: #0001; */
height: 36px;
/* text-align: center; */
}
.jodit-status-bar{
display:none;
}
.jodit-container{
width: 821px !important;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 30px;
/* height: 0px !important; */
/* min-height: 100px !important; */
}
.input-group {
width: 64.5% !important;
}
.input-group-append-client-policy-master{
margin-top: 3px;
}
.jodit-wysiwyg{
margin-bottom: 162px;
}
.form-control-client-policy-masters{
margin-left: 30px;
width: 689px;
}
</style>
<div id="policyGMCTerms" style="display:none">
<span id="policyGMCTermsClose" style="float: right;font-size: 26px;color: red;margin-top: -42px;margin-left: 3px;margin-right: 7px;">x</span>
<h5><label for="gmcTerms" style="margin-bottom: 20px;">Policy GMC Terms</label></h5>
<form role="form" class="parsley-examples" method="post" id="policyJsonForm" enctype="multipart/form-data" >
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<input type="hidden" name="client_policy_id" id="client_policy_id" />
<input type="hidden" name="policy_id" id="policy_id"/>
<input type="hidden" id="gmc_emp_count"/>
<div class="form-group">
<div class="form-column">
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Sum Insured</label>
<input type="text" name="sum_insured" id="sum_insured" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class=" " style="width: 400px;">Family Floater</label><br>
<div class="flex-container">
<div class="radiobuttondiv">
<input type="radio" name="family_floater" value="1"> Yes
<input type="radio" name="family_floater" value="0" style="margin-left:10px"> No
</div>
<div style="display:none; margin-top: 27px;margin-bottom: 7px; margin-left: 31px;">
<div>
<input type="checkbox" name="family_floaters[]" value="self" id="self" checked disabled> Self
<input type="checkbox" name="family_floaters[]" value="spouse" id="spouse"> Spouse
<input type="checkbox" name="family_floaters[]" value="child1" id="child1"> Child 1
<input type="checkbox" name="family_floaters[]" value="child2" id="child2"> Child 2
<input type="checkbox" name="family_floaters[]" value="child3" id="child3"> Child 3
<input type="checkbox" name="family_floaters[]" value="child4" id="child4"> Child 4
</div>
<div style="margin-top:10px">
<input type="checkbox" name="family_floaters[]" value="parent1" id="parent1"> Parent 1
<input type="checkbox" name="family_floaters[]" value="parent2" id="parent2"> Parent 2
<input type="checkbox" name="family_floaters[]" value="parent_in_law1" id="parent_in_law1"> Parent-In-Law 1
<input type="checkbox" name="family_floaters[]" value="parent_in_law2" id="parent_in_law2"> Parent-In-Law 2
</div>
</div>
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Corporate Buffer</label>
<div class="radiobuttondiv">
<input type="radio" name="corporatebuffer" value="1"> Yes
<input type="radio" name="corporatebuffer" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="waiverofpreexistingdiseases" style="width: 400px;">Waiver of Pre-existing Diseases</label>
<div class="radiobuttondiv">
<input type="radio" name="waiverofpreexistingdiseases" value="1"> Yes, waived off
<input type="radio" name="waiverofpreexistingdiseases" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="emp_code" class=" " style="width: 400px;">Maternity Coverage</label>
<input type="text" name="maternitycoverage" id="maternitycoverage" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="emp_code" class=" " style="width: 400px; ">Twin Delivery</label>
<input type="text" name="twindelivery" id="twindelivery" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="emp_code" class=" " style="width: 400px; ">Pre and Post natal</label>
<input type="text" name="preandpostnatal" id="preandpostnatal" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="emp_code" class=" " style="width: 400px; ">Baby Day 1 Cover</label>
<input type="text" name="babyday1cover" id="babyday1cover" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="9monthwaitingperiodwaived" style="width: 400px;">9-month waiting Period waived</label>
<div class="radiobuttondiv">
<input type="radio" name="9monthwaitingperiodwaived" value="1"> Yes, waived off
<input type="radio" name="9monthwaitingperiodwaived" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Cover from the date of Joining</label>
<input type="text" name="coverfromthedateofjoining" id="coverfromthedateofjoining" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="waiverof1,2,3&4thyearexclusions" style="width: 400px;">Waiver of 1, 2, 3 & 4th year Exclusions</label>
<div class="radiobuttondiv">
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="1"> Yes, waived off
<input type="radio" name="waiverof1,2,3&4thyearexclusions" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="waiverof30dayswaitingperiod" style="width: 400px;">Waiver of 30 days waiting period</label>
<div class="radiobuttondiv">
<input type="radio" name="waiverof30dayswaitingperiod" value="1"> Yes, waived off
<input type="radio" name="waiverof30dayswaitingperiod" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Pre Hospitalization Cover</label>
<input type="text" name="prehospitalizationcover" id="prehospitalizationcover" class="form-control form-control-client-policy-master">
</div>
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Post Hospitalization Cover</label>
<input type="text" name="posthospitalizationcover" id="posthospitalizationcover" class="form-control form-control-client-policy-master">
</div> -->
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="congenitaldiseasesinternal" style="width: 400px;">Congenital Diseases - Internal</label>
<div class="radiobuttondiv">
<input type="radio" name="congenitaldiseasesinternal" value="internal"> Internal Covered
<input type="radio" name="congenitaldiseasesinternal" value="no" style="margin-left:10px"> No
</div>
</div>
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="congenitaldiseasesexternal" style="width: 400px;">Congenital Diseases - External</label>
<input type="text" name="congenitaldiseasesexternal" id="congenitaldiseasesexternal" class="form-control form-control-client-policy-master">
</div> -->
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="copayzonewisecopay" class=" " style="width: 400px;">Co-Pay/Zone wise Co Pay</label>
<select name="copayzonewisecopay" id="copayzonewisecopay" class="form-control form-control-client-policy-master">
<option value="">Select an option</option>
<option value="5%">5%</option>
<option value="10%">10%</option>
<option value="15%">15%</option>
<option value="20%">20%</option>
<option value="25%">25%</option>
<option value="30%">30%</option>
<option value="35%">35%</option>
<option value="40%">40%</option>
<option value="45%">45%</option>
<option value="50%">50%</option>
</select>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Bio absorbable stent / Toric lens/ Multi Focal lens</label>
<input type="text" name="bioabsorbablestenttoriclensmultifocallens" id="bioabsorbablestenttoriclensmultifocallens" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Room Rent Limit</label>
<input type="text" name="roomrentlimit" id="roomrentlimit" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="proportionatedeductionclause" class=" " style="width: 400px;">Proportionate Deduction Clause</label>
<select name="proportionatedeductionclause" id="proportionatedeductionclause" class="form-control form-control-client-policy-master">
<option value="">Select an option</option>
<option value="NotApplicable/WaivedOff">Not Applicable / Waived Off</option>
<option value="Applicable">Applicable</option>
</select>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Nursing Allowance</label>
<input type="text" name="nursingallowance" id="nursingallowance" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="ailmentcapping" style="width: 400px;">Ailment capping</label>
<div class="radiobuttondiv">
<input type="radio" name="ailmentcapping" value="1"> Yes
<input type="radio" name="ailmentcapping" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Ambulance Charges</label>
<input type="text" name="ambulancecharges" id="ambulancecharges" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Air Ambulance</label>
<input type="text" name="airambulance" id="airambulance" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Family Transportation Benefit</label>
<input type="text" name="familytransportationbenefit" id="familytransportationbenefit" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="reasonableandcustomarycharges" style="width: 400px;">Reasonable and Customary Charges</label>
<div class="radiobuttondiv">
<input type="radio" name="reasonableandcustomarycharges" value="1">Applicable
<input type="radio" name="reasonableandcustomarycharges" value="0" style="margin-left:10px">Not Applicable
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Day Care Treatment</label>
<div class="radiobuttondiv">
<input type="radio" name="daycaretreatment" value="1"> Yes
<input type="radio" name="daycaretreatment" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="ayudhtreatmentcover" style="width: 400px;">AYUSH treatment cover</label>
<div class="radiobuttondiv">
<input type="radio" name="ayudhtreatmentcover" value="1"> Yes
<input type="radio" name="ayudhtreatmentcover" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">ARMD Covered</label>
<input type="text" name="armdcovered" id="armdcovered" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Sum Insured enhancement</label>
<div class="radiobuttondiv">
<input type="radio" name="suminsuredenhancement" value="1"> Yes
<input type="radio" name="suminsuredenhancement" value="0" style="margin-left:10px"> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Automatic Sum Insured reinstatement</label>
<input type="text" name="automaticsuminsuredreinstatement" id="automaticsuminsuredreinstatement" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
<textarea name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master"></textarea>
</div>
<!-- <div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Additional Sickness Benefit</label>
<input type="text" name="additionalsicknessbenefit" id="additionalsicknessbenefit" class="form-control form-control-client-policy-master">
</div> -->
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Lasik Surgery</label>
<input type="text" name="lasiksurgery" id="lasiksurgery" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Mid Term inclusion</label>
<input type="text" name="midterminclusion" id="midterminclusion" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">CAPD</label>
<input type="text" name="capd" id="capd" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Organ donor expenses</label>
<input type="text" name="organdonorexpenses" id="organdonorexpenses" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Modern treatments as per IRDAI</label>
<input type="text" name="moderntreatmentsasperirdai" id="moderntreatmentsasperirdai" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="emp_code" class=" " style="width: 400px;">Wellness</label>
<textarea name="Wellness" id="Wellness" class="form-control form-control-client-policy-master"></textarea>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="days_of_discharge" class=" ">Days of Discharge</label>
<div class="input-group mb-3" style="margin-left: 0px;">
<input type="text" id="days_of_discharge" name="days_of_discharge" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
<div class="input-group-append input-group-append-client-policy-master">
<span class="input-group-text" id="basic-addon2">Days</span>
</div>
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="days_from_dod" class=" ">Days from DOD</label>
<div class="input-group mb-3" style="margin-left: 0px;">
<input type="text" id="days_from_dod" name="days_from_dod" class="form-control form-control-client-policy-master" placeholder="Enter the number of days">
<div class="input-group-append input-group-append-client-policy-master">
<span class="input-group-text" id="basic-addon2">Days</span>
</div>
</div>
</div>
</div>
<!-- <hr> -->
<!-- <div class="form-row" id="grid_content_input">
</div> -->
</div>
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
<a href="#" class="button-like" id="myButtonSpecialCondition" title="Special Condition">Special Condition</a>
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGridSubmit" style="margin-top: 100px;">Submit</button>
</div>
</form>
</div>
<script>
var policy_grid_id = $('#client_id').val();
var grid_html = '';
$('.close').click(function(){
$('#sum_insured').val("");
$('#familyfloater').val("");
$('#waiverofpreexistingdiseases').prop('checked', false);
$('#maternitycoverage').val("");
});
$('input[name="family_floater"]').change(function() {
console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().next()[0];
$(element).css("display", "block");
var element2 = $(this).parent().parent().parent().next()[0];
$(element2).css("display", "");
} else {
var element = $(this).parent().next()[0];
$(element).css("display", "none");
var element2 = $(this).parent().parent().parent().next()[0];
$(element2).css("display", "none");
}
});
$('input[name="waiverofpreexistingdiseases"]').change(function() {
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
var element2 = $(this).parent().parent().next().next()[0];
$(element2).css("display", "");
var element3 = $(this).parent().parent().next().next().next()[0];
$(element3).css("display", "");
var element4 = $(this).parent().parent().next().next().next().next()[0];
$(element4).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
var element2 = $(this).parent().parent().next().next()[0];
$(element2).css("display", "none");
var element3 = $(this).parent().parent().next().next().next()[0];
$(element3).css("display", "none");
var element4 = $(this).parent().parent().next().next().next().next()[0];
$(element4).css("display", "none");
}
});
$("#policyJsonForm").submit(function(event) {
event.preventDefault();
var isValid = $('#policyJsonForm').parsley().validate();
if($('#gmc_emp_count').val() == true){
toastr.warning('Client has active employees', 'Warning');
return;
}
if (!isValid) {
console.log('Form is Empty', 'Warning');
return ;
}
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var formData = new FormData($('#policyJsonForm')[0]);
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
$.ajax({
data: formData,
url: policy_form_action,
type: "POST",
dataType: 'json',
processData: false,
contentType: false,
success: function(res) {
if (res.status === false) {
toastr.error('Policy Dose Not Create', 'Error');
return;
}
document.querySelectorAll('.special_condition_label\\[\\]').forEach(element => {
element.parentNode.remove();
});
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
}
});
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
$('#policyGMCTerms').css('display', 'none');
$('#police-tab').css('display', '');
$('.nav.nav-pills.navtab-bg').css('display','');
$('.nav.nav-pills.navtab-bg').prev().css('display','');
var message = 'Policy Terms Updated successfully';
toastr.success(message, 'Success');
}, 1000);
});
$('body').on('click', '.btnPolicyMaster', function () {
var policy_id = $(this).data('id');
$('#policy_id').val(policy_id);
var client_id = $('#Client_id').val();
$('#client_policy_id').val(policy_id);
var policy_type_id = $(this).attr('id');
console.log('policy_type_id', typeof policy_type_id)
if(policy_type_id >= '2'){
$('#policyGMCTerms').css('display', '');
$('#police-tab').css('display', 'none');
$('.nav.nav-pills.navtab-bg').css('display','none');
$('.nav.nav-pills.navtab-bg').prev().css('display','none');
$.ajax({
url: '<?= base_url("client/policy/getterms") ?>',
method: 'GET',
data: { policy_id : policy_id , client_id: client_id},
success: function(response) {
$('gmc_emp_count').val(response.count)
if(response.count){
$('emp_count').val(response.count)
if(response.count === false){
$("#btnGPATermsSubmit").prop("disabled", true);
}else{
$("#btnGPATermsSubmit").prop("disabled", false);
}
}
if (response) {
let jsonObject = JSON.parse(response.data);
Object.keys(jsonObject).forEach(function(key) {
if (key.includes("special_condition_label") || key.includes("special_condition_input")) {
if (key.includes("special_condition_label")) {
for (let index = 0; index < jsonObject[key].length; index++) {
specialCondition();
}
}
let elements = document.getElementsByName(`${key}[]`);
if (elements) {
elements.forEach((element,index) => {
element.value = jsonObject[key][index];
});
}
}
if (key.includes("family_floaters")) {
let checkboxes = document.querySelectorAll(`input[name="${key}[]"]`);
if (jsonObject[key]) {
jsonObject[key].forEach(element => {
let checkbox = $(`#${element}`);
if (checkbox.is(":checkbox")) {
checkbox.prop("checked", true);
}
});
}
}
let elements = document.getElementsByName(key);
if (elements && elements.length > 0) {
let element = elements[0]; // Assuming you want to update the first element with the name
if (element.tagName === 'INPUT' && (element.type === 'checkbox' || element.type === 'radio')) {
if (element.type === 'checkbox') {
element.checked = jsonObject[key] === '1'; // Assuming jsonObject[key] is '1' or '0' for checkbox
} else if (element.type === 'radio') {
if (element.value === jsonObject[key]) {
element.checked = element.value === jsonObject[key];
if(element.name === "family_floater") {
element.parentElement.nextElementSibling.style.display='';
element.parentElement.parentElement.parentElement.nextElementSibling.style.display='';
}else if(element.name === "waiverofpreexistingdiseases"){
element.parentElement.parentElement.nextElementSibling.style.display='';
element.parentElement.parentElement.nextElementSibling.nextElementSibling.style.display='';
element.parentElement.parentElement.nextElementSibling.nextElementSibling.nextElementSibling.style.display='';
element.parentElement.parentElement.nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling.style.display='';
}
} else {
element.nextElementSibling.checked = element.value ;
}
}
}else if(key === "Wellness" || key === "additionalsicknessbenefit"){
let wysiwygElement = element.previousElementSibling.querySelector('.jodit-wysiwyg');
if (wysiwygElement) {
let pTag = wysiwygElement.querySelector('p'); // Find the <p> tag inside the wysiwyg element
if (pTag) {
// pTag.innerHTML = ''; // Clear the content inside the <p> tag
pTag.innerHTML = jsonObject[key]; // Add your new content inside the <p> tag
}
}
// console.log(jsonObject[key]);
}else {
element.value = jsonObject[key];
}
}
});
}
$('.jodit-wysiwyg').each(function() {
$(this).click();
});
},
error: function(xhr, status, error) {
console.error('Error:', status, error);
}
});
}
});
</script>
<!-- Jodit RTE -->
<script>
$(document).ready(function() {
var editor = new Jodit('#additionalsicknessbenefit', {
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
});
var editor = new Jodit('#Wellness', {
buttons: 'bold,italic,underline,|,align,alignCenter,alignRight,alignJustify',
});
});
</script>
<!-- Policy terms Add Special Condition -->
<script>
document.getElementById('myButtonSpecialCondition').addEventListener('click', function(event) {
event.preventDefault();
specialCondition();
});
function specialCondition(count =0) {
if (count === 0) {
var index =$('.modifyclassinput').length;
var appendElement =`<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 400px;"><input name="special_condition_label[]" id="special_condition_label[]"><span class="specialConditionClose" style="color: red;margin-left: 20px;">X</span></label>
<input type="text" name="special_condition_input[]" id="special_condition_input[]" class="form-control form-control-client-policy-masters special_condition_input[]">
</div>`;
$('.form-column').each(function() {
$(this).append(appendElement);
});
}
else{
}
}
$(document).on('click', '.specialConditionClose', function() {
$(this)[0].parentNode.parentNode.remove();
});
// Close the Policy terms
$(document).on('click', '#policyGMCTermsClose', function() {
$('#policyGMCTerms').css('display', 'none');
$('#police-tab').css('display', '');
$('.nav.nav-pills.navtab-bg').css('display','');
$('.nav.nav-pills.navtab-bg').prev().css('display','');
});
</script>

View File

@ -0,0 +1,511 @@
<style>
.button-like {
display: inline-block;
padding: 8px 15px;
background-color: #02a8b5;
color: white;
text-decoration: none;
border-radius: 2px;
cursor: pointer;
margin-right: -85px;
}
.radiobuttondiv{
margin-left: 32px;
}
.form-control-client-policy-master{
width:62% !important;
margin-left: 30px;
margin-top: 3px
}
/* .form-group.col-md-6 */
.form-group-client-policy-master{
display:-webkit-box;
max-width: 100% !important;
/* border:1px solid; */
/* background-color: #0001; */
}
.form-group-client-policy-masters{
display:-webkit-box;
max-width: 100% !important;
}
.flex-container {
display: block;
/* flex-wrap: wrap; */
/* align-items: center; Align items vertically center */
}
.flex-container > div {
flex: 1; /* Each div takes equal space */
}
label{
padding-top: 7px;
width: 400px;
/* background-color: #0001; */
height: 36px;
/* text-align: center; */
}
.jodit-status-bar{
display:none;
}
.jodit-container{
width: 690px !important;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 30px;
/* height: 0px !important; */
/* min-height: 100px !important; */
}
.input-group {
width: 64.5% !important;
}
.input-group-append-client-policy-master{
margin-top: 3px;
}
.jodit-wysiwyg{
margin-bottom: 162px;
}
.form-control-client-policy-masters{
margin-left: 30px;
width: 689px;
}
</style>
<div id="policyGPATermsForm" style="display:none">
<span id="policyGPATermsClose" style="float: right;font-size: 26px;color: red;margin-top: -42px;margin-left: 3px;margin-right: 7px;">x</span>
<h5><label for="gpaTerms" style="margin-bottom: 20px;">Policy GMC Terms</label></h5>
<form role="form" class="parsley-examples" method="post" id="policyGPATerms" enctype="multipart/form-data">
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<input type="hidden" name="client_policy_id" id="client_policy_id" />
<input type="hidden" name="policy_id" id="gpa_policy_id"/>
<input type="hidden" id="emp_count"/>
<div class="form-group">
<div class="form-column">
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="sumInsured" class=" " style="width: 400px;">Sum Insured</label>
<input type="text" name="sumInsured2" id="sumInsured2" class="form-control form-control-client-policy-master"> <br>
</div>
<div id='numberToWord' class="text-danger"></div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="totalSumInsured" class=" " style="width: 400px;">Total Sum Insured</label>
<input type="text" name="totalSumInsured" id="totalSumInsured" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label class="form-check-label " for="corporatebuffer" style="width: 400px;">Accidental Death Benefit</label>
<div class="radiobuttondiv">
<input type="radio" name="accidentalDeathBenefit" value="1"> Yes
<input type="radio" name="accidentalDeathBenefit" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="permanentTotalDisablement" class=" " style="width: 400px;">Permanent Total Disablement</label>
<input type="text" name="permanentTotalDisablement" id="permanentTotalDisablement" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="permanentPartialDisablement" class=" " style="width: 400px;">Permanent Partial Disablement</label>
<input type="text" name="permanentPartialDisablement" id="permanentPartialDisablement" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="temporaryTotalDisablementBenefit" class=" " style="width: 400px;">Temporary Total Disablement benefit</label>
<input type="text" name="temporaryTotalDisablementBenefit" id="temporaryTotalDisablementBenefit" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="accidentalHospitalizationExpenses" class=" " style="width: 400px;">Accidental Hospitalization Expenses</label>
<select name="accidentalHospitalizationExpenses" id="accidentalHospitalizationExpenses" class="form-control form-control-client-policy-master">
<option value="">Select an option</option>
<option value="No">No</option>
<option value="10%-40%">Covered upto 10% of SI or 40% of actual which ever is less</option>
<option value="20%-50%">Covered upto 20% of SI or 50% of actual which ever is less</option>
<option value="50K-500k">INR 50K, to vary in multiples of 25K till 5 Lacs</option>
</select>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="childrenEducationWelfareFund" class=" " style="width: 400px;">Children Education Welfare Fund</label>
<select name="childrenEducationWelfareFund" id="childrenEducationWelfareFund" class="form-control form-control-client-policy-master">
<option value="">Select an option</option>
<option value="No">No</option>
<option value="10000">Covered upto 10,000/­ per child ( Restricted to 2 children)</option>
<option value="5000">Covered upto 5,000/­ per child ( Restricted to 2 children)</option>
</select>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="compassionateVisitExpenses" style="width: 400px;">Compassionate Visit Expenses</label>
<div class="radiobuttondiv">
<input type="radio" name="compassionateVisitExpenses" value="1"> Yes
<input type="radio" name="compassionateVisitExpenses" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="compassionateVisitExpensesData" class=" " style="width: 400px; ">Compassionate Visit Expenses Data</label>
<input type="text" name="compassionateVisitExpensesData" id="compassionateVisitExpensesData" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="brokenBoneExpenses" style="width: 400px;">Broken Bone Expenses</label>
<div class="radiobuttondiv">
<input type="radio" name="brokenBoneExpenses" value="1"> Yes
<input type="radio" name="brokenBoneExpenses" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="brokenBoneExpensesData" class=" " style="width: 400px; ">Broken Bone Expenses Data</label>
<input type="text" name="brokenBoneExpensesData" id="brokenBoneExpensesData" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="ambulanceCharges" style="width: 400px;">Ambulance charges</label>
<div class="radiobuttondiv">
<input type="radio" name="ambulanceCharges" value="1"> Yes
<input type="radio" name="ambulanceCharges" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="ambulanceChargesData" class=" " style="width: 400px; ">Ambulance charges Data</label>
<input type="text" name="ambulanceChargesData" id="ambulanceChargesData" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="burnExpenses" style="width: 400px;">Burn Expenses</label>
<div class="radiobuttondiv">
<input type="radio" name="burnExpenses" value="1"> Yes
<input type="radio" name="burnExpenses" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="burnExpensesData" class=" " style="width: 400px; ">Burn Expenses Data</label>
<input type="text" name="burnExpensesData" id="burnExpensesData" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="carriageOfDeadBody" style="width: 400px;">Carriage of Dead Body</label>
<div class="radiobuttondiv">
<input type="radio" name="carriageOfDeadBody" value="1"> Yes
<input type="radio" name="carriageOfDeadBody" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master" style="display:none;">
<label for="carriageOfDeadBodyData" class=" " style="width: 400px; ">Carriage of Dead Body Data</label>
<input type="text" name="carriageOfDeadBodyData" id="carriageOfDeadBodyData" class="form-control form-control-client-policy-master">
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label " for="animalSnakeInsectBite" style="width: 400px;">Animal/Snake/Insect bite</label>
<div class="radiobuttondiv">
<input type="radio" name="animalSnakeInsectBite" value="1"> Yes
<input type="radio" name="animalSnakeInsectBite" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label class="form-check-label" for="terrorism" style="width: 400px;">Terrorism</label>
<div class="radiobuttondiv">
<input type="radio" name="terrorism" value="1"> Yes
<input type="radio" name="terrorism" value="0" style="margin-left:10px" checked> No
</div>
</div>
<div class="form-group col-md-6 form-group-client-policy-master">
<label for="worldwideCover" class=" " style="width: 400px;">Worldwide Cover</label>
<div class="radiobuttondiv">
<input type="radio" name="worldwideCover" value="1"> Yes
<input type="radio" name="worldwideCover" value="0" style="margin-left:10px" checked> No
</div>
</div>
</div>
</div>
<div class="form-group text-right m-b-0" style="margin-top: -49px;">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGPATermsSubmit" style="margin-top: 100px;">Submit</button>
</div>
</form>
</div>
<script>
var policy_grid_id = $('#client_id').val();
var grid_html = '';
$('.close').click(function(){
});
$('input[name="burnExpenses"]').change(function() {
console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$('input[name="compassionateVisitExpenses"]').change(function() {
console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$('input[name="carriageOfDeadBody"]').change(function() {
console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$('input[name="ambulanceCharges"]').change(function() {
console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$('input[name="brokenBoneExpenses"]').change(function() {
console.log($(this).val());
if ($(this).val() == '1') {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "");
} else {
var element = $(this).parent().parent().next()[0];
$(element).css("display", "none");
}
});
$("#policyGPATerms").submit(function(event) {
event.preventDefault();
var isValid = $('#policyGPATerms').parsley().validate();
console.log('isvalid', isValid);
if($('#emp_count').val() == true){
toastr.warning('Client has active employees', 'Warning');
return;
}
if (!isValid) {
console.log('Form is Empty', 'Warning');
return ;
}
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var formData = new FormData($('#policyGPATerms')[0]);
var policy_form_action = '<?= base_url("client/terms/gpa_create") ?>';
$.ajax({
data: formData,
url: policy_form_action,
type: "POST",
dataType: 'json',
processData: false,
contentType: false,
success: function(res) {
console.log(res);
if (res.status === false) {
toastr.error('Policy Dose Not Create', 'Error');
return;
}
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
}
});
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
$('#policyGPATermsForm').css('display', 'none');
$('#police-tab').css('display', '');
$('.nav.nav-pills.navtab-bg').css('display','');
$('.nav.nav-pills.navtab-bg').prev().css('display','');
var message = 'Policy Terms Updated successfully';
toastr.success(message, 'Success');
}, 1000);
});
$('body').on('click', '.btnPolicyMaster', function () {
var policy_id = $(this).data('id');
console.log('policy_id :' ,policy_id);
$('#gpa_policy_id').val(policy_id);
var client_id = $('#Client_id').val();
console.log('client_id :' ,client_id);
$('#client_policy_id').val(client_id);
var policy_type_id = $(this).attr('id');
console.log('policy_type_id', policy_type_id)
if(policy_type_id == '1'){
$('#policyGPATermsForm').css('display', '');
$('#police-tab').css('display', 'none');
$('.nav.nav-pills.navtab-bg').css('display','none');
$('.nav.nav-pills.navtab-bg').prev().css('display','none');
$('.removeDom').remove()
$.ajax({
url: '<?= base_url("client/policy/getterms") ?>',
method: 'GET',
data: { policy_id : policy_id , client_id: client_id},
success: function(res) {
if(res.count){
$('emp_count').val(res.count)
if(res.count === false){
$("#btnGPATermsSubmit").prop("disabled", true);
}else{
$("#btnGPATermsSubmit").prop("disabled", false);
}
}
if (res) {
let jsonObject = JSON.parse(res.data);
if(jsonObject.compassionateVisitExpenses == '1'){
var element = $('input[name="compassionateVisitExpenses"]').parent().parent().next()[0];
$(element).css("display", "");
}
if(jsonObject.brokenBoneExpenses == '1'){
var element = $('input[name="brokenBoneExpenses"]').parent().parent().next()[0];
$(element).css("display", "");
}
if(jsonObject.ambulanceCharges == '1'){
var element = $('input[name="ambulanceCharges"]').parent().parent().next()[0];
$(element).css("display", "");
}
if(jsonObject.burnExpenses == '1'){
var element = $('input[name="burnExpenses"]').parent().parent().next()[0];
$(element).css("display", "");
}
if(jsonObject.carriageOfDeadBody == '1'){
var element = $('input[name="carriageOfDeadBody"]').parent().parent().next()[0];
$(element).css("display", "");
}
Object.keys(jsonObject).forEach(function(key) {
let elements = document.getElementsByName(key);
if (elements && elements.length > 0) {
let element = elements[0];
if (element.tagName === 'INPUT' && (element.type === 'checkbox' || element.type === 'radio')) {
if (element.type === 'checkbox') {
element.checked = jsonObject[key] === '1';
} else if (element.type === 'radio') {
element.checked = element.value === jsonObject[key];
}
}else {
element.value = jsonObject[key];
}
}
});
}
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
}
});
}
});
</script>
<script>
$(document).on('click', '#policyGPATermsClose', function() {
$('#policyGPATermsForm').css('display', 'none');
$('#police-tab').css('display', '');
$('.nav.nav-pills.navtab-bg').css('display','');
$('.nav.nav-pills.navtab-bg').prev().css('display','');
});
$("#sumInsured2").on("keyup", function() {
var inputNumber = parseInt($(this).val());
if (!isNaN(inputNumber)) {
var result = convertToIndianNumberingSystem(inputNumber);
$("#numberToWord").text(result);
} else {
$("#numberToWord").text("");
}
});
</script>

View File

@ -11,6 +11,7 @@
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"/>
<input type="hidden" name="client_id" id="Client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<input type="hidden" name="client_policy_id" id="client_policy_id" />
<input type="hidden" id="grid_emp_count"/>
<div class="form-group">
<div class="form-row">
@ -427,6 +428,14 @@ $("#GridForm").submit(function(event) {
event.preventDefault();
console.log($('#grid_emp_count').val());
if($('#grid_emp_count').val() == false){
console.log('test')
toastr.warning('Client has active employees', 'Warning');
return;
}
var isValid = $('#GridForm').parsley().validate();
if (!isValid) {
console.log('Form is Empty', 'Warning');
@ -478,11 +487,14 @@ $('body').on('click', '.btnPolicyModel', function () {
dataType: 'json',
success: function (res) {
console.log('responce :', res);
$('#grid_emp_count').val(res.count);
if (res.status === false) {
toastr.error(res.status);
return;
}
var policy_grid_id_value = '';
if (res.premiumData && res.premiumData.length > 0 && res.premiumData[0].policy_grid_id) {
policy_grid_id_value = res.premiumData[0].policy_grid_id;
@ -497,7 +509,6 @@ $('body').on('click', '.btnPolicyModel', function () {
$('#grid').html(policeGridOptionHTML);
console.log('Length', res.premiumData.length)
if (res.premiumData && res.premiumData.length > 0) {
addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id);

View File

@ -36,7 +36,7 @@ body {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 class="header-title" style="position: relative;">Policy Type Onboarding</h4>
<h4 class="header-title" style="position: relative;">Policy Type</h4>
</div>
<!-- <div class="col-6" style="text-align: right;">
<a href="<?= base_url("master/policy/list"); ?>" class="btn btn-primary waves-effect waves-light">Back</a>

View File

@ -36,7 +36,7 @@ body {
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 class="header-title" style="position: relative;">TPA Onboarding</h4>
<h4 class="header-title" style="position: relative;">TPA</h4>
</div>
<!-- <div class="col-6" style="text-align: right;">
<a href="<?= base_url("master/tpa/list"); ?>" class="btn btn-primary waves-effect waves-light">Back</a>

17
package-lock.json generated Normal file
View File

@ -0,0 +1,17 @@
{
"name": "nhance",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"x-editable": "^1.5.1"
}
},
"node_modules/x-editable": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/x-editable/-/x-editable-1.5.1.tgz",
"integrity": "sha512-eBP10/e6ETIx/TqRmwu6IR/BG0VpFyJzW+eCvAsa8ccJ+UqoYlIPslw7AulpOoym9nv04As8qROtjdU0ij8K2A=="
}
}
}

5
package.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": {
"x-editable": "^1.5.1"
}
}

File diff suppressed because one or more lines are too long

663
public/assets/css/bootstrap-editable.css vendored Normal file
View File

@ -0,0 +1,663 @@
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
.editableform {
margin-bottom: 0; /* overwrites bootstrap margin */
}
.editableform .control-group {
margin-bottom: 0; /* overwrites bootstrap margin */
white-space: nowrap; /* prevent wrapping buttons on new line */
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
}
/*
BS3 width:1005 for inputs breaks editable form in popup
See: https://github.com/vitalets/x-editable/issues/393
*/
.editableform .form-control {
width: auto;
}
.editable-buttons {
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
vertical-align: top;
margin-left: 7px;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons.editable-buttons-bottom {
display: block;
margin-top: 7px;
margin-left: 0;
}
.editable-input {
vertical-align: top;
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
white-space: normal; /* reset white-space decalred in parent*/
/* display-inline emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons .editable-cancel {
margin-left: 7px;
}
/*for jquery-ui buttons need set height to look more pretty*/
.editable-buttons button.ui-button-icon-only {
height: 24px;
width: 30px;
}
.editableform-loading {
background: url('../img/loading.gif') center center no-repeat;
height: 25px;
width: auto;
min-width: 25px;
}
.editable-inline .editableform-loading {
background-position: left 5px;
}
.editable-error-block {
max-width: 300px;
margin: 5px 0 0 0;
width: auto;
white-space: normal;
}
/*add padding for jquery ui*/
.editable-error-block.ui-state-error {
padding: 3px;
}
.editable-error {
color: red;
}
/* ---- For specific types ---- */
.editableform .editable-date {
padding: 0;
margin: 0;
float: left;
}
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
.editable-inline .add-on .icon-th {
margin-top: 3px;
margin-left: 1px;
}
/* checklist vertical alignment */
.editable-checklist label input[type="checkbox"],
.editable-checklist label span {
vertical-align: middle;
margin: 0;
}
.editable-checklist label {
white-space: nowrap;
}
/* set exact width of textarea to fit buttons toolbar */
.editable-wysihtml5 {
width: 566px;
height: 250px;
}
/* clear button shown as link in date inputs */
.editable-clear {
clear: both;
font-size: 0.9em;
text-decoration: none;
text-align: right;
}
/* IOS-style clear button for text inputs */
.editable-clear-x {
background: url('../img/clear.png') center center no-repeat;
display: block;
width: 13px;
height: 13px;
position: absolute;
opacity: 0.6;
z-index: 100;
top: 50%;
right: 6px;
margin-top: -6px;
}
.editable-clear-x:hover {
opacity: 1;
}
.editable-pre-wrapped {
white-space: pre-wrap;
}
.editable-container.editable-popup {
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
}
.editable-container.popover {
width: auto; /* without this rule popover does not stretch */
}
.editable-container.editable-inline {
display: inline-block;
vertical-align: middle;
width: auto;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-container.ui-widget {
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
}
.editable-click,
a.editable-click,
a.editable-click:hover {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
.editable-click.editable-disabled,
a.editable-click.editable-disabled,
a.editable-click.editable-disabled:hover {
color: #585858;
cursor: default;
border-bottom: none;
}
.editable-empty, .editable-empty:hover, .editable-empty:focus{
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
.editable-unsaved {
font-weight: bold;
}
.editable-unsaved:after {
/* content: '*'*/
}
.editable-bg-transition {
-webkit-transition: background-color 1400ms ease-out;
-moz-transition: background-color 1400ms ease-out;
-o-transition: background-color 1400ms ease-out;
-ms-transition: background-color 1400ms ease-out;
transition: background-color 1400ms ease-out;
}
/*see https://github.com/vitalets/x-editable/issues/139 */
.form-horizontal .editable
{
padding-top: 5px;
display:inline-block;
}
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
.datepicker-inline {
width: 220px;
}
.datepicker.datepicker-rtl {
direction: rtl;
}
.datepicker.datepicker-rtl table tr td span {
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker.days div.datepicker-days {
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
}
.datepicker table {
margin: 0;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
}
.datepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker table tr td.old,
.datepicker table tr td.new {
color: #999999;
}
.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
.datepicker table tr td.today:hover,
.datepicker table tr td.today:hover:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today:hover.disabled,
.datepicker table tr td.today.disabled.disabled,
.datepicker table tr td.today.disabled:hover.disabled,
.datepicker table tr td.today[disabled],
.datepicker table tr td.today:hover[disabled],
.datepicker table tr td.today.disabled[disabled],
.datepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active {
background-color: #fbf069 \9;
}
.datepicker table tr td.today:hover:hover {
color: #000;
}
.datepicker table tr td.today.active:hover {
color: #fff;
}
.datepicker table tr td.range,
.datepicker table tr td.range:hover,
.datepicker table tr td.range.disabled,
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today,
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today:hover:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today:hover.disabled,
.datepicker table tr td.range.today.disabled.disabled,
.datepicker table tr td.range.today.disabled:hover.disabled,
.datepicker table tr td.range.today[disabled],
.datepicker table tr td.range.today:hover[disabled],
.datepicker table tr td.range.today.disabled[disabled],
.datepicker table tr td.range.today.disabled:hover[disabled] {
background-color: #f3e97a;
}
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active {
background-color: #efe24b \9;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected:hover:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected:hover.disabled,
.datepicker table tr td.selected.disabled.disabled,
.datepicker table tr td.selected.disabled:hover.disabled,
.datepicker table tr td.selected[disabled],
.datepicker table tr td.selected:hover[disabled],
.datepicker table tr td.selected.disabled[disabled],
.datepicker table tr td.selected.disabled:hover[disabled] {
background-color: #808080;
}
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active {
background-color: #666666 \9;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.active:hover,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active:hover.disabled,
.datepicker table tr td.active.disabled.disabled,
.datepicker table tr td.active.disabled:hover.disabled,
.datepicker table tr td.active[disabled],
.datepicker table tr td.active:hover[disabled],
.datepicker table tr td.active.disabled[disabled],
.datepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker table tr td span:hover {
background: #eeeeee;
}
.datepicker table tr td span.disabled,
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active:hover:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active:hover.disabled,
.datepicker table tr td span.active.disabled.disabled,
.datepicker table tr td span.active.disabled:hover.disabled,
.datepicker table tr td span.active[disabled],
.datepicker table tr td span.active:hover[disabled],
.datepicker table tr td span.active.disabled[disabled],
.datepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span.old,
.datepicker table tr td span.new {
color: #999999;
}
.datepicker th.datepicker-switch {
width: 145px;
}
.datepicker thead tr:first-child th,
.datepicker tfoot tr th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover,
.datepicker tfoot tr th:hover {
background: #eeeeee;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 18px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}

4860
public/assets/css/jodit.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,945 @@
/*!
* Quill Editor v1.3.7
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-container.ql-disabled .ql-tooltip {
visibility: hidden;
}
.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
pointer-events: none;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor > * {
cursor: text;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\2022';
}
.ql-editor ul[data-checked=true],
.ql-editor ul[data-checked=false] {
pointer-events: none;
}
.ql-editor ul[data-checked=true] > li *,
.ql-editor ul[data-checked=false] > li * {
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before,
.ql-editor ul[data-checked=false] > li::before {
color: #777;
cursor: pointer;
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before {
content: '\2611';
}
.ql-editor ul[data-checked=false] > li::before {
content: '\2610';
}
.ql-editor li::before {
display: inline-block;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
margin-right: 0.3em;
text-align: right;
}
.ql-editor li.ql-direction-rtl::before {
margin-left: 0.3em;
margin-right: -1.5em;
}
.ql-editor ol li:not(.ql-direction-rtl),
.ql-editor ul li:not(.ql-direction-rtl) {
padding-left: 1.5em;
}
.ql-editor ol li.ql-direction-rtl,
.ql-editor ul li.ql-direction-rtl {
padding-right: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-0;
}
.ql-editor ol li:before {
content: counter(list-0, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
left: 15px;
pointer-events: none;
position: absolute;
right: 15px;
}
.ql-snow.ql-toolbar:after,
.ql-snow .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-snow.ql-toolbar button,
.ql-snow .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
padding: 3px 5px;
width: 28px;
}
.ql-snow.ql-toolbar button svg,
.ql-snow .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-snow.ql-toolbar button:active:hover,
.ql-snow .ql-toolbar button:active:hover {
outline: none;
}
.ql-snow.ql-toolbar input.ql-image[type=file],
.ql-snow .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
color: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button:focus .ql-fill,
.ql-snow .ql-toolbar button:focus .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:focus .ql-stroke,
.ql-snow .ql-toolbar button:focus .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow.ql-toolbar button:hover .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover .ql-stroke-miter,
.ql-snow.ql-toolbar button:focus .ql-stroke-miter,
.ql-snow .ql-toolbar button:focus .ql-stroke-miter,
.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
stroke: #06c;
}
@media (pointer: coarse) {
.ql-snow.ql-toolbar button:hover:not(.ql-active),
.ql-snow .ql-toolbar button:hover:not(.ql-active) {
color: #444;
}
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {
stroke: #444;
}
}
.ql-snow {
box-sizing: border-box;
}
.ql-snow * {
box-sizing: border-box;
}
.ql-snow .ql-hidden {
display: none;
}
.ql-snow .ql-out-bottom,
.ql-snow .ql-out-top {
visibility: hidden;
}
.ql-snow .ql-tooltip {
position: absolute;
transform: translateY(10px);
}
.ql-snow .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-snow .ql-tooltip.ql-flip {
transform: translateY(-10px);
}
.ql-snow .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-snow .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-snow .ql-stroke {
fill: none;
stroke: #444;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-snow .ql-stroke-miter {
fill: none;
stroke: #444;
stroke-miterlimit: 10;
stroke-width: 2;
}
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow .ql-empty {
fill: none;
}
.ql-snow .ql-even {
fill-rule: evenodd;
}
.ql-snow .ql-thin,
.ql-snow .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-snow .ql-transparent {
opacity: 0.4;
}
.ql-snow .ql-direction svg:last-child {
display: none;
}
.ql-snow .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-snow .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-snow .ql-editor h1 {
font-size: 2em;
}
.ql-snow .ql-editor h2 {
font-size: 1.5em;
}
.ql-snow .ql-editor h3 {
font-size: 1.17em;
}
.ql-snow .ql-editor h4 {
font-size: 1em;
}
.ql-snow .ql-editor h5 {
font-size: 0.83em;
}
.ql-snow .ql-editor h6 {
font-size: 0.67em;
}
.ql-snow .ql-editor a {
text-decoration: underline;
}
.ql-snow .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-snow .ql-editor code,
.ql-snow .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-snow .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-snow .ql-editor code {
font-size: 85%;
padding: 2px 4px;
}
.ql-snow .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-snow .ql-editor img {
max-width: 100%;
}
.ql-snow .ql-picker {
color: #444;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-snow .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-snow .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-snow .ql-picker-options {
background-color: #fff;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-snow .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
color: #ccc;
z-index: 2;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-snow .ql-color-picker,
.ql-snow .ql-icon-picker {
width: 28px;
}
.ql-snow .ql-color-picker .ql-picker-label,
.ql-snow .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-label svg,
.ql-snow .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-snow .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-snow .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-snow .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-snow .ql-picker.ql-header {
width: 98px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-snow .ql-picker.ql-font {
width: 108px;
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-snow .ql-picker.ql-size {
width: 98px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-snow .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-snow .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-toolbar.ql-snow {
border: 1px solid #ccc;
box-sizing: border-box;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
padding: 8px;
}
.ql-toolbar.ql-snow .ql-formats {
margin-right: 15px;
}
.ql-toolbar.ql-snow .ql-picker-label {
border: 1px solid transparent;
}
.ql-toolbar.ql-snow .ql-picker-options {
border: 1px solid transparent;
box-shadow: rgba(0,0,0,0.2) 0 2px 8px;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {
border-color: #000;
}
.ql-toolbar.ql-snow + .ql-container.ql-snow {
border-top: 0px;
}
.ql-snow .ql-tooltip {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0px 0px 5px #ddd;
color: #444;
padding: 5px 12px;
white-space: nowrap;
}
.ql-snow .ql-tooltip::before {
content: "Visit URL:";
line-height: 26px;
margin-right: 8px;
}
.ql-snow .ql-tooltip input[type=text] {
display: none;
border: 1px solid #ccc;
font-size: 13px;
height: 26px;
margin: 0px;
padding: 3px 5px;
width: 170px;
}
.ql-snow .ql-tooltip a.ql-preview {
display: inline-block;
max-width: 200px;
overflow-x: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.ql-snow .ql-tooltip a.ql-action::after {
border-right: 1px solid #ccc;
content: 'Edit';
margin-left: 16px;
padding-right: 8px;
}
.ql-snow .ql-tooltip a.ql-remove::before {
content: 'Remove';
margin-left: 8px;
}
.ql-snow .ql-tooltip a {
line-height: 26px;
}
.ql-snow .ql-tooltip.ql-editing a.ql-preview,
.ql-snow .ql-tooltip.ql-editing a.ql-remove {
display: none;
}
.ql-snow .ql-tooltip.ql-editing input[type=text] {
display: inline-block;
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: 'Save';
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode=link]::before {
content: "Enter link:";
}
.ql-snow .ql-tooltip[data-mode=formula]::before {
content: "Enter formula:";
}
.ql-snow .ql-tooltip[data-mode=video]::before {
content: "Enter video:";
}
.ql-snow a {
color: #06c;
}
.ql-container.ql-snow {
border: 1px solid #ccc;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,11 @@
$(function () { $.fn.editableform.buttons = '<button type="submit" class="btn btn-primary editable-submit btn-sm waves-effect waves-light"><i class="mdi mdi-check"></i></button><button type="button" class="btn btn-danger editable-cancel btn-sm waves-effect"><i class="mdi mdi-close"></i></button>',
$("#inline-username").editable({ type: "text", pk: 1, name: "username", title: "Enter username", mode: "inline", inputclass: "form-control-sm form-control" }),
$("#inline-id").editable({ type: "text", pk: 1, name: "user", title: "Enter username", mode: "inline", inputclass: "form-control-sm form-control" }),
$("#inline-sex").editable({ prepend: "not selected", mode: "inline", inputclass: "form-control-sm form-control", source: [{ value: 1, text: "Male" }, { value: 2, text: "Female" }], display: function (t, e) { var n = $.grep(e, function (e) { return e.value == t }); n.length ? $(this).text(n[0].text).css("color", { "": "gray", 1: "green", 2: "blue" }[t]) : $(this).empty() } }),
$("#inline-group").editable({ showbuttons: !1, mode: "inline", inputclass: "form-control-sm form-control" }),
$("#inline-status").editable({ mode: "inline", inputclass: "form-control-sm form-control" }),
$("#inline-dob").editable({ mode: "inline", inputclass: "form-control-sm form-control" }),
$("#inline-event").editable({ placement: "right", mode: "inline", combodate: { firstItem: "name" }, inputclass: "form-control-sm form-control" }),
$("#inline-comments").editable({ showbuttons: "bottom", mode: "inline", inputclass: "form-control-sm form-control" }),
$("#inline-treatmentcover").editable({ pk: 1, limit: 3, mode: "inline", inputclass: "form-control-sm form-control", source: [{ value: 1, text: "Yes" }] }),
$("#inline-fruits").editable({ pk: 1, limit: 3, mode: "inline", inputclass: "form-control-sm form-control", source: [{ value: 1, text: "Banana" }, { value: 2, text: "Peach" }, { value: 3, text: "Apple" }, { value: 4, text: "Watermelon" }, { value: 5, text: "Orange" }] }) });

10
public/assets/js/jodit.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
$(function(){$.fn.editableform.buttons='<button type="submit" class="btn btn-primary editable-submit btn-sm waves-effect waves-light"><i class="mdi mdi-check"></i></button><button type="button" class="btn btn-danger editable-cancel btn-sm waves-effect"><i class="mdi mdi-close"></i></button>',$("#inline-username").editable({type:"text",pk:1,name:"username",title:"Enter username",mode:"inline",inputclass:"form-control-sm form-control"}),$("#inline-firstname").editable({validate:function(e){if(""==$.trim(e))return"This field is required"},mode:"inline",inputclass:"form-control-sm form-control"}),$("#inline-sex").editable({prepend:"not selected",mode:"inline",inputclass:"form-control-sm form-control",source:[{value:1,text:"Male"},{value:2,text:"Female"}],display:function(t,e){var n=$.grep(e,function(e){return e.value==t});n.length?$(this).text(n[0].text).css("color",{"":"gray",1:"green",2:"blue"}[t]):$(this).empty()}}),$("#inline-group").editable({showbuttons:!1,mode:"inline",inputclass:"form-control-sm form-control"}),$("#inline-status").editable({mode:"inline",inputclass:"form-control-sm form-control"}),$("#inline-dob").editable({mode:"inline",inputclass:"form-control-sm form-control"}),$("#inline-event").editable({placement:"right",mode:"inline",combodate:{firstItem:"name"},inputclass:"form-control-sm form-control"}),$("#inline-comments").editable({showbuttons:"bottom",mode:"inline",inputclass:"form-control-sm form-control"}),$("#inline-fruits").editable({pk:1,limit:3,mode:"inline",inputclass:"form-control-sm form-control",source:[{value:1,text:"Banana"},{value:2,text:"Peach"},{value:3,text:"Apple"},{value:4,text:"Watermelon"},{value:5,text:"Orange"}]})});

2
public/assets/js/pages/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,107 @@
/**
* Theme: Minton Admin Template
* Author: Coderthemes
* Demo: Editable (Inline editing)
*
*/
$(function(){
//modify buttons style
$.fn.editableform.buttons =
'<button type="submit" class="btn btn-primary editable-submit btn-sm waves-effect waves-light"><i class="mdi mdi-check"></i></button>' +
'<button type="button" class="btn btn-light editable-cancel btn-sm waves-effect"><i class="mdi mdi-close"></i></button>';
//Inline editables
$('#inline-username').editable({
type: 'text',
pk: 1,
name: 'username',
title: 'Enter username',
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-id').editable({
type: 'text',
pk: 1,
name: 'username',
title: 'Enter username',
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-firstname').editable({
validate: function(value) {
if($.trim(value) == '') return 'This field is required';
},
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-sex').editable({
prepend: "not selected",
mode: 'inline',
inputclass: 'form-control-sm',
source: [
{value: 1, text: 'Male'},
{value: 2, text: 'Female'}
],
display: function(value, sourceData) {
var colors = {"": "gray", 1: "green", 2: "blue"},
elem = $.grep(sourceData, function(o){return o.value == value;});
if(elem.length) {
$(this).text(elem[0].text).css("color", colors[value]);
} else {
$(this).empty();
}
}
});
$('#inline-group').editable({
showbuttons: false,
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-status').editable({
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-dob').editable({
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-event').editable({
placement: 'right',
mode: 'inline',
combodate: {
firstItem: 'name'
},
inputclass: 'form-control-sm'
});
$('#inline-comments').editable({
showbuttons: 'bottom',
mode: 'inline',
inputclass: 'form-control-sm'
});
$('#inline-fruits').editable({
pk: 1,
limit: 3,
mode: 'inline',
inputclass: 'form-control-sm',
source: [
{value: 1, text: 'Banana'},
{value: 2, text: 'Peach'},
{value: 3, text: 'Apple'},
{value: 4, text: 'Watermelon'},
{value: 5, text: 'Orange'}
]
});
});

8
public/assets/js/quill.min.js vendored Normal file

File diff suppressed because one or more lines are too long