MERGE_UAT_CLAIMS_FEEDBACK_AFTER_FINAL_RELEASE
This commit is contained in:
commit
095d3f357c
@ -31,6 +31,7 @@ $routes->get("sendCroneRemainderMail", "DashboardController::sendCroneRemainderM
|
|||||||
$routes->get("sendextraparam", "ClientController::sendextraparam");
|
$routes->get("sendextraparam", "ClientController::sendextraparam");
|
||||||
$routes->get("updateRenewalData", "ClientController::updateRenewalData");
|
$routes->get("updateRenewalData", "ClientController::updateRenewalData");
|
||||||
$routes->get("updateRenewalDataNotExistingClient", "ClientController::updateRenewalDataNotExistingClient");
|
$routes->get("updateRenewalDataNotExistingClient", "ClientController::updateRenewalDataNotExistingClient");
|
||||||
|
$routes->get("updateRenewalInsurerData", "ClientController::updateRenewalInsurerData");
|
||||||
// $routes->post("iAgreeForAddOn", "EmployeeRestController::iAgreeForAddOn");
|
// $routes->post("iAgreeForAddOn", "EmployeeRestController::iAgreeForAddOn");
|
||||||
// $routes->get("sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
// $routes->get("sendCroneRemainderMail", "DashboardController::sendCroneRemainderMail");
|
||||||
// $routes->post("employeeUpload", "EmployeeRestController::employeeUpload");
|
// $routes->post("employeeUpload", "EmployeeRestController::employeeUpload");
|
||||||
@ -441,13 +442,19 @@ $routes->post("/employeeRest/getVerifiedHrData", "RestAuthenticationController::
|
|||||||
|
|
||||||
// Test initiate Claim
|
// Test initiate Claim
|
||||||
$routes->post('initiateClaim',"EmployeeRestController::initiateClaim");
|
$routes->post('initiateClaim',"EmployeeRestController::initiateClaim");
|
||||||
|
$routes->get('departments',"EmployeeRestController::get_ticket_type");
|
||||||
|
$routes->get('get_ticket_data',"EmployeeRestController::get_ticket_data");
|
||||||
|
|
||||||
|
|
||||||
|
//api
|
||||||
$routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
$routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
||||||
$routes->post("logined", "RestAuthenticationController::logined");
|
$routes->post("logined", "RestAuthenticationController::logined");
|
||||||
$routes->post("getId", "RestAuthenticationController::getUserIdFromToken");
|
$routes->post("getId", "RestAuthenticationController::getUserIdFromToken");
|
||||||
$routes->post('initiateClaim',"EmployeeRestController::initiateClaim");
|
$routes->post('initiateClaim',"EmployeeRestController::initiateClaim");
|
||||||
|
$routes->get('get_ticket_type',"EmployeeRestController::get_ticket_type");
|
||||||
|
$routes->get('get_ticket_data',"EmployeeRestController::get_ticket_data");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->get("getEmployeePolicy", "EmployeeRestController::getEmployeePolicy");
|
$routes->get("getEmployeePolicy", "EmployeeRestController::getEmployeePolicy");
|
||||||
$routes->get("getAddOnPolicy", "EmployeeRestController::getAddOnPolicy");
|
$routes->get("getAddOnPolicy", "EmployeeRestController::getAddOnPolicy");
|
||||||
$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
$routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2539,10 +2539,19 @@ class EmployeeRestController extends AdminController
|
|||||||
if($ClientPolicyValue['policy_type_id'] == 1)
|
if($ClientPolicyValue['policy_type_id'] == 1)
|
||||||
{
|
{
|
||||||
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
||||||
$data['department_id'] = 3;
|
$data['ticket_type_id'] = 2;
|
||||||
}else{
|
}else if($ClientPolicyValue['policy_type_id'] == 6)
|
||||||
|
{
|
||||||
|
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
||||||
|
$data['ticket_type_id'] = 3;
|
||||||
|
}else if($ClientPolicyValue['policy_type_id'] == 7)
|
||||||
|
{
|
||||||
|
$data['policy_terms'] = $this->policyTermsFiter($terms,'gpa');
|
||||||
|
$data['ticket_type_id'] = 4;
|
||||||
|
}else
|
||||||
|
{
|
||||||
$data['policy_terms'] = $this->policyTermsFiter($terms,'gmc');
|
$data['policy_terms'] = $this->policyTermsFiter($terms,'gmc');
|
||||||
$data['department_id'] = 4;
|
$data['ticket_type_id'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['client_id'] = $ClientPolicyValue['client_id'];
|
$data['client_id'] = $ClientPolicyValue['client_id'];
|
||||||
@ -2720,8 +2729,6 @@ class EmployeeRestController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $finalarray;
|
return $finalarray;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3103,16 +3110,20 @@ class EmployeeRestController extends AdminController
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get Data from post for inserting ticket and message
|
//Get Data from post for inserting ticket and message
|
||||||
public function initiateClaim()
|
public function initiateClaim()
|
||||||
{
|
{
|
||||||
|
|
||||||
$received_data = $this->request->getPost();
|
$received_data = $this->request->getPost();
|
||||||
|
// print_r($received_data); die;
|
||||||
$employee_id = $received_data['emp_id'];
|
$employee_id = $received_data['emp_id'];
|
||||||
$client_policy_id = $received_data['client_policy_id'];
|
$client_policy_id = $received_data['client_policy_id'];
|
||||||
$insured_emp_id = $received_data['insured_emp_id'];
|
$insured_emp_id = $received_data['insured_emp_id'];
|
||||||
|
|
||||||
$sql = "select cp.policy_type_id as ticket_type_id,
|
$sql = "
|
||||||
|
select
|
||||||
|
cp.policy_type_id,
|
||||||
cl_rm.user_id as acm_id,
|
cl_rm.user_id as acm_id,
|
||||||
cp.insurer_id as insurer_id,
|
cp.insurer_id as insurer_id,
|
||||||
cp.tpa_id as tpa_id,
|
cp.tpa_id as tpa_id,
|
||||||
@ -3126,9 +3137,15 @@ class EmployeeRestController extends AdminController
|
|||||||
emp.mobile as emp_mobile,
|
emp.mobile as emp_mobile,
|
||||||
empl.id as insured_emp_id,
|
empl.id as insured_emp_id,
|
||||||
empl.name as insured_name,
|
empl.name as insured_name,
|
||||||
empl.relationship
|
empl.relationship,
|
||||||
|
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN cp.policy_type_id IN (2, 3, 4, 5) THEN 1
|
||||||
|
WHEN cp.policy_type_id = 1 THEN 2
|
||||||
|
WHEN cp.policy_type_id = 6 THEN 3
|
||||||
|
WHEN cp.policy_type_id = 7 THEN 4
|
||||||
|
ELSE NULL
|
||||||
|
END AS ticket_type_id
|
||||||
|
|
||||||
from employees emp
|
from employees emp
|
||||||
|
|
||||||
@ -3140,16 +3157,42 @@ class EmployeeRestController extends AdminController
|
|||||||
where emp.id = $employee_id and emp.is_active = 1 and emp.emp_status = 'active'
|
where emp.id = $employee_id and emp.is_active = 1 and emp.emp_status = 'active'
|
||||||
limit 1 ";
|
limit 1 ";
|
||||||
|
|
||||||
$fetchData = $this->employeeModel->query($sql)->getResultArray()[0];
|
$emp_ticket_data = $this->employeeModel->query($sql)->getResultArray();
|
||||||
$fetchData['claim_status_id'] = $this->claimStatusModel->select('id')->where('ticket_type', $fetchData['ticket_type_id'])->first()['id'];
|
// print_r(db_connect()->getLastQuery()); die;
|
||||||
|
|
||||||
|
if(!empty($emp_ticket_data)){
|
||||||
|
|
||||||
|
$fetchData = $emp_ticket_data[0];
|
||||||
|
$fetchData['claim_status_id'] = $this->claimStatusModel
|
||||||
|
->select('id')
|
||||||
|
->where('ticket_type', $fetchData['ticket_type_id'])
|
||||||
|
->orderBy('id', 'asc')
|
||||||
|
->first()['id'];
|
||||||
|
|
||||||
$fetchData['priority'] = 1;
|
$fetchData['priority'] = 1;
|
||||||
$fetchData['mode_of_intimation'] = 1;
|
$fetchData['mode_of_intimation'] = 1;
|
||||||
$fetchData['hospital_name'] = $received_data['hospital_name'];
|
$fetchData = array_merge($fetchData, $received_data);
|
||||||
|
|
||||||
|
// print_r($fetchData); die;
|
||||||
$insert_status = $this->ticketMaster->insert($fetchData);
|
$insert_status = $this->ticketMaster->insert($fetchData);
|
||||||
$ticket_id = $this->ticketMaster->insertID();
|
$ticket_id = $this->ticketMaster->insertID();
|
||||||
|
|
||||||
if ($insert_status && !empty($ticket_id)) {
|
if ($insert_status && !empty($ticket_id)) {
|
||||||
|
|
||||||
|
$messagesData = [
|
||||||
|
'ticket_id' => $ticket_id ?? null,
|
||||||
|
'sender' => 'user',
|
||||||
|
'claim_status' => $fetchData['claim_status_id'] ?? null,
|
||||||
|
'emp_mail' => $fetchData['emp_mail'] ?? null,
|
||||||
|
'mail_subject' => $fetchData['subject'] ?? null,
|
||||||
|
'mail_content' => $fetchData['message'] ?? null,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (!empty($messagesData['ticket_id'])) {
|
||||||
|
$TicketMessageModel = new TicketMessageModel();
|
||||||
|
$TicketMessageModel->insert($messagesData);
|
||||||
|
}
|
||||||
|
|
||||||
$mail_sent_status = ($this->ticketController->sendAutoMailTrigger($ticket_id));
|
$mail_sent_status = ($this->ticketController->sendAutoMailTrigger($ticket_id));
|
||||||
if (gettype($mail_sent_status) == 'array') {
|
if (gettype($mail_sent_status) == 'array') {
|
||||||
$message = 'Claim Iniated Successfully';
|
$message = 'Claim Iniated Successfully';
|
||||||
@ -3186,7 +3229,76 @@ class EmployeeRestController extends AdminController
|
|||||||
$message = 'Something Went Wrong';
|
$message = 'Something Went Wrong';
|
||||||
return $this->respond(['status' => false, 'code' => 400, 'message' => $message], 200);
|
return $this->respond(['status' => false, 'code' => 400, 'message' => $message], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return $this->response->setJSON(['status' => false, 'code' => 200, 'message' => 'The employee is not active.'])->setStatusCode(404);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//department
|
||||||
|
public function get_ticket_type()
|
||||||
|
{
|
||||||
|
$ticket_type = $this->ticketController->ticketType;
|
||||||
|
$ticket_type = array_map(fn($value, $key) => (object) ['id' => $key, 'name' => $value], array_values($ticket_type), array_keys($ticket_type));
|
||||||
|
// print_r($ticket_type); die;
|
||||||
|
return $this->response->setJSON(['ticket_type' => $ticket_type])->setStatusCode(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
//ticket data
|
||||||
|
public function get_ticket_data()
|
||||||
|
{
|
||||||
|
$priorityType = $this->ticketController->priorityType;
|
||||||
|
$modeOFIntimate = $this->ticketController->modeOFIntimate;
|
||||||
|
$claimType = $this->ticketController->claimType;
|
||||||
|
$relationshipType = $this->ticketController->relationshipType;
|
||||||
|
$ticketTypeArray = $this->ticketController->ticketType;
|
||||||
|
|
||||||
|
|
||||||
|
$emp_id = $this->request->getGet('emp_id');
|
||||||
|
$ticket_type = $this->request->getGet('ticket_type') ?? null;
|
||||||
|
$ticket_id = $this->request->getGet('ticket_id') ?? null;
|
||||||
|
// dd($emp_id);
|
||||||
|
|
||||||
|
if (empty($emp_id)) {
|
||||||
|
return $this->response->setJSON(['status' => false, 'code' => 200, 'message' => 'emp_id is required.'])->setStatusCode(404);
|
||||||
|
}
|
||||||
|
|
||||||
|
$TicketMasterModel = new TicketMasterModel();
|
||||||
|
$ticket_data = $TicketMasterModel->get_ticket_data($emp_id, $ticket_type, $ticket_id);
|
||||||
|
|
||||||
|
if (!empty($ticket_data)) {
|
||||||
|
|
||||||
|
$client_claim_status = [
|
||||||
|
'Received' => [1, 2, 3, 4, 15, 16, 17, 18, 25, 26, 27, 28, 35, 36, 37, 38],
|
||||||
|
'Rejected' => [8, 49, 55, 60],
|
||||||
|
'Cancelled' => [13, 47, 53, 58],
|
||||||
|
'Returned' => [14, 48, 54, 59],
|
||||||
|
'Closed' => [12, 22, 32, 42],
|
||||||
|
'Approved' => [9, 20, 30, 40],
|
||||||
|
'Settled' => [11, 24, 34],
|
||||||
|
'Under Process' => [5, 6, 7, 10, 19, 23, 45, 50, 29, 33, 51, 39, 43, 56],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($ticket_data as $key => $value) {
|
||||||
|
foreach ($client_claim_status as $claim_key => $claim_value) {
|
||||||
|
if (in_array($value['claim_status_id'], $claim_value)) { // Corrected argument order
|
||||||
|
$ticket_data[$key]['claim_status'] = $claim_key ?? null; // Assign back to the main array
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ticket_data[$key]['priority_type'] = $priorityType[$value['priority']] ?? null;
|
||||||
|
$ticket_data[$key]['mode_of_intimate_type'] = $modeOFIntimate[$value['mode_of_intimation']] ?? null;
|
||||||
|
$ticket_data[$key]['relationship_type'] = ucfirst($value['relationship']) ?? null;
|
||||||
|
$claimPrimaryTypey = "1";
|
||||||
|
if (in_array($value['claim_type'], [2, 3, 4])) {
|
||||||
|
$claimPrimaryTypey = "2";
|
||||||
|
}
|
||||||
|
$ticket_data[$key]['claim_type_value'] = $claimType[$claimPrimaryTypey][$value['claim_type']] ?? null;
|
||||||
|
$ticket_data[$key]['ticket_policy_type'] = $ticketTypeArray[$value['ticket_type_id']] ?? null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->response->setJSON(['ticket_data' => $ticket_data])->setStatusCode(200);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -287,6 +287,10 @@ class MasterController extends AdminController
|
|||||||
$data['deletion_add_day'] = 1;
|
$data['deletion_add_day'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->request->getPost('is_multi_event')){
|
||||||
|
$data['is_multi_event'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$data['created_by'] = get_session_userid();
|
$data['created_by'] = get_session_userid();
|
||||||
$data['insurer_logo'] = $file_name;
|
$data['insurer_logo'] = $file_name;
|
||||||
|
|
||||||
@ -371,6 +375,12 @@ class MasterController extends AdminController
|
|||||||
$data['deletion_add_day'] = 0;
|
$data['deletion_add_day'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->request->getPost('is_multi_event')){
|
||||||
|
$data['is_multi_event'] = 1;
|
||||||
|
}else{
|
||||||
|
$data['is_multi_event'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$update = $this->insurerModel->update($id,$data);
|
$update = $this->insurerModel->update($id,$data);
|
||||||
if($update){
|
if($update){
|
||||||
echo json_encode(array("status" => true , 'data' => $data));
|
echo json_encode(array("status" => true , 'data' => $data));
|
||||||
@ -1723,7 +1733,8 @@ class MasterController extends AdminController
|
|||||||
'excel' => WRITEPATH . 'uploads/excel/',
|
'excel' => WRITEPATH . 'uploads/excel/',
|
||||||
'statements' => WRITEPATH . 'uploads/statements/',
|
'statements' => WRITEPATH . 'uploads/statements/',
|
||||||
'import_excel' => WRITEPATH . 'uploads/import_excel/',
|
'import_excel' => WRITEPATH . 'uploads/import_excel/',
|
||||||
'logs' => WRITEPATH . 'uploads/logs/',
|
'logs' => WRITEPATH . 'logs',
|
||||||
|
'session' => WRITEPATH . 'session',
|
||||||
'client_kyc_documents' => WRITEPATH . 'uploads/client_kyc_documents/',
|
'client_kyc_documents' => WRITEPATH . 'uploads/client_kyc_documents/',
|
||||||
'tmp' => WRITEPATH . 'tmp/',
|
'tmp' => WRITEPATH . 'tmp/',
|
||||||
'e_card_imgs' => ROOTPATH . 'public/e_card_imgs',
|
'e_card_imgs' => ROOTPATH . 'public/e_card_imgs',
|
||||||
@ -1732,6 +1743,7 @@ class MasterController extends AdminController
|
|||||||
'logo' => ROOTPATH . 'public/uploads/logo/',
|
'logo' => ROOTPATH . 'public/uploads/logo/',
|
||||||
'template_bg' => ROOTPATH . 'public/uploads/template_bg/',
|
'template_bg' => ROOTPATH . 'public/uploads/template_bg/',
|
||||||
'attachments' => WRITEPATH . 'uploads/attachments/',
|
'attachments' => WRITEPATH . 'uploads/attachments/',
|
||||||
|
'cache' => WRITEPATH . 'cache',
|
||||||
'sample_import_excel' => ROOTPATH . 'public/sample_import_excel',
|
'sample_import_excel' => ROOTPATH . 'public/sample_import_excel',
|
||||||
'lead_files' => WRITEPATH . 'uploads/lead_files/',
|
'lead_files' => WRITEPATH . 'uploads/lead_files/',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -274,7 +274,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
// Separate Insurer and TPA Branch IDs and IDs
|
// Separate Insurer and TPA Branch IDs and IDs
|
||||||
if(isset($data['insurer_id']) && !empty($data['insurer_id'])){
|
if(isset($data['insurer_id']) && !empty($data['insurer_id'])){
|
||||||
list($data['insurer_branch_id'], $data['insurer_id']) = explode('-', $data['insurer_id']);
|
list($data['insurer_branch_id'], $data['insurer_id']) = explode('-', $data['insurer_id']);
|
||||||
if (isset($data['tpa'])) {
|
if (isset($data['tpa']) && !empty($data['tpa'])) {
|
||||||
list($data['tpa_branch_id'], $data['tpa_id']) = explode('-', $data['tpa']);
|
list($data['tpa_branch_id'], $data['tpa_id']) = explode('-', $data['tpa']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1117,7 +1117,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
// Separate Insurer and TPA Branch IDs and IDs
|
// Separate Insurer and TPA Branch IDs and IDs
|
||||||
if(isset($data['insurer_id']) && !empty($data['insurer_id'])){
|
if(isset($data['insurer_id']) && !empty($data['insurer_id'])){
|
||||||
list($data['insurer_branch_id'], $data['insurer_id']) = explode('-', $data['insurer_id']);
|
list($data['insurer_branch_id'], $data['insurer_id']) = explode('-', $data['insurer_id']);
|
||||||
if (isset($data['tpa'])) {
|
if (isset($data['tpa']) && !empty($data['tpa'])) {
|
||||||
list($data['tpa_branch_id'], $data['tpa_id']) = explode('-', $data['tpa']);
|
list($data['tpa_branch_id'], $data['tpa_id']) = explode('-', $data['tpa']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2700,7 +2700,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
// Build query
|
// Build query
|
||||||
$db = db_connect();
|
$db = db_connect();
|
||||||
$builder = $db->table("cash_deposit")
|
$builder = $db->table("cash_deposit")
|
||||||
->where('cd_ac_no', $cd_ac_no)
|
->where('cd_ac_pk', $cd_ac_no)
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->orderBy('id', 'desc')
|
->orderBy('id', 'desc')
|
||||||
->limit(1);
|
->limit(1);
|
||||||
@ -2715,6 +2715,8 @@ class PolicyTransactionController extends BaseController
|
|||||||
'status' => true,
|
'status' => true,
|
||||||
'code' => 200,
|
'code' => 200,
|
||||||
'data' => $result,
|
'data' => $result,
|
||||||
|
'base_premium' => $base_premium,
|
||||||
|
'cd_ac_no' => $cd_ac_no,
|
||||||
'base_premium_greater_than_balance' => $base_premium_greater_than_balance,
|
'base_premium_greater_than_balance' => $base_premium_greater_than_balance,
|
||||||
], 200);
|
], 200);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,14 +26,15 @@ class TicketController extends BaseController
|
|||||||
use ResponseTrait;
|
use ResponseTrait;
|
||||||
|
|
||||||
protected $myLogger;
|
protected $myLogger;
|
||||||
protected $ticketType;
|
public $ticketType;
|
||||||
protected $priorityType;
|
public $priorityType;
|
||||||
protected $relationshipType;
|
public $relationshipType;
|
||||||
protected $modeOFIntimate;
|
public $modeOFIntimate;
|
||||||
protected $claimType;
|
public $claimType;
|
||||||
protected $claimStatus;
|
public $claimStatus;
|
||||||
protected $placeHolders;
|
public $placeHolders;
|
||||||
protected $extraFields;
|
public $extraFields;
|
||||||
|
public $nonIDReason;
|
||||||
|
|
||||||
protected $clientModel;
|
protected $clientModel;
|
||||||
protected $ticketMasterModel;
|
protected $ticketMasterModel;
|
||||||
@ -98,7 +99,8 @@ class TicketController extends BaseController
|
|||||||
4 => "Trigger 4",
|
4 => "Trigger 4",
|
||||||
5 => "Trigger 5",
|
5 => "Trigger 5",
|
||||||
6 => "Trigger 6",
|
6 => "Trigger 6",
|
||||||
7 => "Trigger 7"
|
7 => "Trigger 7",
|
||||||
|
8 => "Trigger 8",
|
||||||
];
|
];
|
||||||
$this->placeHolders = [
|
$this->placeHolders = [
|
||||||
|
|
||||||
@ -114,7 +116,8 @@ class TicketController extends BaseController
|
|||||||
'((AUTO_QUERY_CONTENT))' => 'auto_query_content',
|
'((AUTO_QUERY_CONTENT))' => 'auto_query_content',
|
||||||
];
|
];
|
||||||
$this->extraFields = [
|
$this->extraFields = [
|
||||||
|
1 => ['non_id_reason'],
|
||||||
|
10 => ['pay_initiate_date'],
|
||||||
3 => ['raised_date'],
|
3 => ['raised_date'],
|
||||||
4 => ['raised_date'],
|
4 => ['raised_date'],
|
||||||
5 => ['claim_number', 'registration_date'],
|
5 => ['claim_number', 'registration_date'],
|
||||||
@ -137,6 +140,13 @@ class TicketController extends BaseController
|
|||||||
53 => ['cancel_remark'],
|
53 => ['cancel_remark'],
|
||||||
58 => ['cancel_remark'],
|
58 => ['cancel_remark'],
|
||||||
];
|
];
|
||||||
|
$this->nonIDReason = [
|
||||||
|
"Newborn Baby" => "Newborn Baby",
|
||||||
|
"Newly Wedded Spouse" => "Newly Wedded Spouse",
|
||||||
|
"Policy Pending" => "Policy Pending",
|
||||||
|
"New Joinee" => "New Joinee",
|
||||||
|
"Exceptional Case" => "Exceptional Case"
|
||||||
|
];
|
||||||
|
|
||||||
$this->ticketMasterModel = new TicketMasterModel();
|
$this->ticketMasterModel = new TicketMasterModel();
|
||||||
$this->claimStatus = new TicketClaimStatusModel();
|
$this->claimStatus = new TicketClaimStatusModel();
|
||||||
@ -296,7 +306,8 @@ class TicketController extends BaseController
|
|||||||
'ticket_type' => $this->ticketType,
|
'ticket_type' => $this->ticketType,
|
||||||
'priorityType' => $this->priorityType,
|
'priorityType' => $this->priorityType,
|
||||||
'relationshipType' => $this->relationshipType,
|
'relationshipType' => $this->relationshipType,
|
||||||
'modeOFIntimate' => $this->modeOFIntimate
|
'modeOFIntimate' => $this->modeOFIntimate,
|
||||||
|
'nonIDReason' => $this->nonIDReason
|
||||||
];
|
];
|
||||||
|
|
||||||
switch ($ticket_type) {
|
switch ($ticket_type) {
|
||||||
@ -528,6 +539,12 @@ class TicketController extends BaseController
|
|||||||
$ticket_data['settled_date'] = change_date_format($ticket_data['settled_date'], null, $out_put_format);
|
$ticket_data['settled_date'] = change_date_format($ticket_data['settled_date'], null, $out_put_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($ticket_data['pay_initiate_date'])) {
|
||||||
|
$ticket_data['pay_initiate_date'] = null;
|
||||||
|
} else {
|
||||||
|
$ticket_data['pay_initiate_date'] = change_date_format($ticket_data['pay_initiate_date'], null, $out_put_format);
|
||||||
|
}
|
||||||
|
|
||||||
return $ticket_data;
|
return $ticket_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,6 +610,17 @@ class TicketController extends BaseController
|
|||||||
$data['policy_type'] = $this->ticketType;
|
$data['policy_type'] = $this->ticketType;
|
||||||
$data['placeHolders'] = $this->placeHolders;
|
$data['placeHolders'] = $this->placeHolders;
|
||||||
$data['ticket_data'] = $this->ticketMailTemplateModel->where('is_active', 1)->findAll();
|
$data['ticket_data'] = $this->ticketMailTemplateModel->where('is_active', 1)->findAll();
|
||||||
|
|
||||||
|
foreach ($data['ticket_data'] as $key => $ticket_data) {
|
||||||
|
|
||||||
|
$tooltip_array = $this->claimStatus->select('claim_status')->where('ticket_type',$data['ticket_data'][$key]['ticket_type'])->where('trigger_type',$data['ticket_data'][$key]['trigger_type'])->where('is_active',1)->first();
|
||||||
|
if (isset($tooltip_array) && $tooltip_array != null){
|
||||||
|
$data['ticket_data'][$key]['tool_tip'] = $tooltip_array['claim_status'];
|
||||||
|
}else{
|
||||||
|
$data['ticket_data'][$key]['tool_tip'] =$data['ticket_data'][$key]['template_name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// dd($data['ticket_data']);
|
||||||
$data['ticket_type'] = $this->ticketType;
|
$data['ticket_type'] = $this->ticketType;
|
||||||
$data['trigger_type'] = $this->triggerType;
|
$data['trigger_type'] = $this->triggerType;
|
||||||
return $this->loadLayout('ticket_mail_template', $data);
|
return $this->loadLayout('ticket_mail_template', $data);
|
||||||
@ -621,6 +649,21 @@ class TicketController extends BaseController
|
|||||||
} elseif ($action == 2) {
|
} elseif ($action == 2) {
|
||||||
$table_id = (int)$this->request->getPost('id');
|
$table_id = (int)$this->request->getPost('id');
|
||||||
$data = $this->ticketMailTemplateModel->where('id', $table_id)->where('is_active', 1)->first();
|
$data = $this->ticketMailTemplateModel->where('id', $table_id)->where('is_active', 1)->first();
|
||||||
|
if ($data && isset($data['ticket_type']) && isset($data['trigger_type'])) {
|
||||||
|
$tooltip_array = $this->claimStatus->select('claim_status')
|
||||||
|
->where('ticket_type', $data['ticket_type'])
|
||||||
|
->where('trigger_type', $data['trigger_type'])
|
||||||
|
->where('is_active', 1)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$data['tool_tip'] = (isset($tooltip_array['claim_status']))
|
||||||
|
? $tooltip_array['claim_status']
|
||||||
|
: $data['template_name'];
|
||||||
|
} else {
|
||||||
|
// Handle case where $data is null or missing required fields
|
||||||
|
$data = $data ?: []; // Ensure $data is an array if null
|
||||||
|
$data['tool_tip'] = $data['template_name'];
|
||||||
|
}
|
||||||
if ($data) {
|
if ($data) {
|
||||||
return $this->respond(['status' => true, 'data' => $data], 200);
|
return $this->respond(['status' => true, 'data' => $data], 200);
|
||||||
} else {
|
} else {
|
||||||
@ -1382,6 +1425,12 @@ class TicketController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($lastMatchedStatus == 1){
|
||||||
|
if(!empty($incoming_form_values['tpa_no'])){
|
||||||
|
$lastMatchedStatus = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $lastMatchedStatus;
|
return $lastMatchedStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -259,6 +259,7 @@ class ClientPolicyModel extends Model
|
|||||||
->select('SUM(CASE WHEN sub_type = 3 THEN amount ELSE 0 END) AS total_refund')
|
->select('SUM(CASE WHEN sub_type = 3 THEN amount ELSE 0 END) AS total_refund')
|
||||||
->where('client_id', $clientId)
|
->where('client_id', $clientId)
|
||||||
->where('insurer_id', $insurerId)
|
->where('insurer_id', $insurerId)
|
||||||
|
->where('cash_deposit.is_active', 1)
|
||||||
->get()
|
->get()
|
||||||
->getRow();
|
->getRow();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,9 +240,9 @@ class EmployeeModel extends Model
|
|||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmployeeByEmployeeCode($emp_code)
|
public function getEmployeeByEmployeeCode($emp_code, $client_policy_id = null, $client_id = null)
|
||||||
{
|
{
|
||||||
return $this->select("
|
$query = $this->select("
|
||||||
employees.id AS emp_id,
|
employees.id AS emp_id,
|
||||||
employees.name AS emp_name,
|
employees.name AS emp_name,
|
||||||
employees.emp_code,
|
employees.emp_code,
|
||||||
@ -255,9 +255,22 @@ class EmployeeModel extends Model
|
|||||||
->join('employee_polices', 'employees.id = employee_polices.employee_id', 'left')
|
->join('employee_polices', 'employees.id = employee_polices.employee_id', 'left')
|
||||||
->where('employees.is_active', 1)
|
->where('employees.is_active', 1)
|
||||||
->where('employee_polices.is_active', 1)
|
->where('employee_polices.is_active', 1)
|
||||||
->where('employees.emp_code', $emp_code)
|
->where('employees.emp_code', $emp_code);
|
||||||
->groupBy('employees.id')
|
|
||||||
->findAll();
|
if(!empty($client_id)){
|
||||||
|
$query->where('employees.client_id', $client_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($client_policy_id)){
|
||||||
|
$query->where('employee_polices.client_policy_id', $client_policy_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query->groupBy('employees.id');
|
||||||
|
$data = $query->findAll();
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -501,8 +501,8 @@ class PolicyTransactionModel extends Model
|
|||||||
->join('user_profiles', 'policy_transaction.created_by = user_profiles.id', 'left')
|
->join('user_profiles', 'policy_transaction.created_by = user_profiles.id', 'left')
|
||||||
->join('vehicle', 'policy_transaction.vehicle_id = vehicle.id', 'left')
|
->join('vehicle', 'policy_transaction.vehicle_id = vehicle.id', 'left')
|
||||||
->join('policy_type', 'policy_transaction.policy_type_id = policy_type.id', 'left')
|
->join('policy_type', 'policy_transaction.policy_type_id = policy_type.id', 'left')
|
||||||
->join('insurers', 'policy_transaction.insurer_id = insurers.id', 'left')
|
->join('insurers', 'pt_co_share_details.insurer_id = insurers.id', 'left')
|
||||||
->join('insurer_branch', 'policy_transaction.insurer_branch_id = insurer_branch.id', 'left')
|
->join('insurer_branch', 'pt_co_share_details.insurer_branch_id = insurer_branch.id', 'left')
|
||||||
->join('tpa', 'policy_transaction.tpa_id = tpa.id', 'left')
|
->join('tpa', 'policy_transaction.tpa_id = tpa.id', 'left')
|
||||||
->join('tpa_branch', 'policy_transaction.tpa_branch_id = tpa_branch.id', 'left')
|
->join('tpa_branch', 'policy_transaction.tpa_branch_id = tpa_branch.id', 'left')
|
||||||
->join('user_profiles AS sales_user', 'policy_transaction.sales_generated_by = sales_user.id', 'left')
|
->join('user_profiles AS sales_user', 'policy_transaction.sales_generated_by = sales_user.id', 'left')
|
||||||
|
|||||||
@ -69,6 +69,10 @@ class TicketMasterModel extends Model
|
|||||||
'cancel_remark',
|
'cancel_remark',
|
||||||
'awb_no_courier_name',
|
'awb_no_courier_name',
|
||||||
|
|
||||||
|
'non_id_reason',
|
||||||
|
'head_rejection_reason',
|
||||||
|
'pay_initiate_date',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@ -677,4 +681,26 @@ class TicketMasterModel extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//api
|
||||||
|
public function get_ticket_data($emp_id, $ticket_type = null, $ticket_id = null)
|
||||||
|
{
|
||||||
|
$query = $this->select('ticket_master.*, tms.mail_subject as subject')
|
||||||
|
->join('ticket_messages tms', 'ticket_master.id = tms.ticket_id', 'left')
|
||||||
|
->where('ticket_master.is_active', 1)
|
||||||
|
->where('ticket_master.emp_id', $emp_id);
|
||||||
|
|
||||||
|
if (!empty($ticket_id)) {
|
||||||
|
$query->where('ticket_master.id', $ticket_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($ticket_type)) {
|
||||||
|
$query->where('ticket_master.ticket_type_id', $ticket_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $query->findAll();
|
||||||
|
// dd($data, db_connect()->getLastQuery());
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,7 +103,8 @@ input:checked + .slider:before {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
|
||||||
|
<div class="form-group col-md-2">
|
||||||
<label for="html">Insurer Type</label><br>
|
<label for="html">Insurer Type</label><br>
|
||||||
<div style="margin-top: 10px;">
|
<div style="margin-top: 10px;">
|
||||||
<input type="radio" id="html" name="type" value="pvt" <?= isset($insurer['type']) && $insurer['type'] == 'pvt' ? 'checked' : '' ?>>
|
<input type="radio" id="html" name="type" value="pvt" <?= isset($insurer['type']) && $insurer['type'] == 'pvt' ? 'checked' : '' ?>>
|
||||||
@ -112,6 +113,15 @@ input:checked + .slider:before {
|
|||||||
<label for="css">PSU</label>
|
<label for="css">PSU</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label class="switch" style="position: absolute;top: 34px;left: 17px;">
|
||||||
|
<input id="is_multi_event" type="checkbox" name="is_multi_event" <?= (isset($insurer['is_multi_event']) && $insurer['is_multi_event'] == 1) ? 'checked' : '' ?>>
|
||||||
|
<span class="slider round" style="height: 27px;"></span>
|
||||||
|
</label>
|
||||||
|
<label for="deletion_add_day" style="position: relative;top: 30px;left: 82px;">Multievent Export</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -133,7 +143,7 @@ input:checked + .slider:before {
|
|||||||
<input type="file" class="form-control" onchange="PreviewImage();" id="insurer_logo" name="insurer_logo" accept="image/jpeg, image/jpg, image/png">
|
<input type="file" class="form-control" onchange="PreviewImage();" id="insurer_logo" name="insurer_logo" accept="image/jpeg, image/jpg, image/png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-4 float-right" style="position: relative;left: 40px;bottom: 28px;">
|
<div class="form-group col-md-4 float-right" style="position: relative;left: 90px;top: 30px;">
|
||||||
<img src="<?= isset($insurer['insurer_logo']) && !empty($insurer['insurer_logo']) ? base_url() . "public/uploads/logo/" . $insurer['insurer_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar" />
|
<img src="<?= isset($insurer['insurer_logo']) && !empty($insurer['insurer_logo']) ? base_url() . "public/uploads/logo/" . $insurer['insurer_logo'] : base_url() . "public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -804,7 +804,7 @@
|
|||||||
$(`#tpa_${i}`).val(tpa).trigger('change');
|
$(`#tpa_${i}`).val(tpa).trigger('change');
|
||||||
$(`#proposed_insurer_${i}`).val(insurer).trigger('change');
|
$(`#proposed_insurer_${i}`).val(insurer).trigger('change');
|
||||||
$(`#proposed_tpa_${i}`).val(tpa).trigger('change');
|
$(`#proposed_tpa_${i}`).val(tpa).trigger('change');
|
||||||
$('#policy_start_date').val(res.data.policy_end_date);
|
$('#policy_start_date').val(res.new_start_date);
|
||||||
$('#policy_end_date').val(res.end_date);
|
$('#policy_end_date').val(res.end_date);
|
||||||
console.log($(`#policy_type_id_${i}_${random_id}`));
|
console.log($(`#policy_type_id_${i}_${random_id}`));
|
||||||
console.log($(`#insurer_${i}`));
|
console.log($(`#insurer_${i}`));
|
||||||
|
|||||||
@ -1012,11 +1012,29 @@ $("#policyJsonForm").submit(function(event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var specialConditions = [];
|
||||||
|
|
||||||
|
$(".removeDom").each(function () {
|
||||||
|
var isChecked = $(this).find("input[name='special_condition_display[]']").is(":checked");
|
||||||
|
|
||||||
|
if (isChecked) {
|
||||||
|
var label = $(this).find("input[name='special_condition_label[]']").val();
|
||||||
|
var input = $(this).find("input[name='special_condition_input[]']").val();
|
||||||
|
|
||||||
|
specialConditions.push({ [label]: input });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("specialConditions", specialConditions);
|
||||||
|
|
||||||
|
|
||||||
$('.loader').fadeIn();
|
$('.loader').fadeIn();
|
||||||
$('.loader-mask').fadeIn();
|
$('.loader-mask').fadeIn();
|
||||||
|
|
||||||
var formData = new FormData($('#policyJsonForm')[0]);
|
var formData = new FormData($('#policyJsonForm')[0]);
|
||||||
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
|
var policy_form_action = '<?= base_url("client/policy/policyGMCTerms") ?>';
|
||||||
|
formData.append("special_condition_display_value", JSON.stringify(specialConditions));
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: formData,
|
data: formData,
|
||||||
@ -1140,6 +1158,25 @@ $('body').on('click', '.btnPolicyMaster', function() {
|
|||||||
element.value = " ";
|
element.value = " ";
|
||||||
} else {
|
} else {
|
||||||
element.value = jsonObject[key][index];
|
element.value = jsonObject[key][index];
|
||||||
|
|
||||||
|
if (key.includes("special_condition_label")) {
|
||||||
|
let checkbox = $(element).closest('.form-group').find('input[name="special_condition_display[]"]');
|
||||||
|
console.log("First element:", element);
|
||||||
|
|
||||||
|
if (checkbox.length) {
|
||||||
|
console.log("Checkbox found:", checkbox);
|
||||||
|
|
||||||
|
// Correct way to set the 'id' attribute
|
||||||
|
let formattedValue = jsonObject[key][index].replace(/[\s\-\/,&]+/g, '').toLowerCase();
|
||||||
|
console.log('formattedValue', formattedValue);
|
||||||
|
checkbox.attr('id', formattedValue + '_display');
|
||||||
|
|
||||||
|
console.log("Updated Checkbox:", checkbox);
|
||||||
|
} else {
|
||||||
|
console.log("Checkbox not found for:", element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1534,7 +1571,7 @@ function specialCondition(count = 0) {
|
|||||||
var index = $('.modifyclassinput').length;
|
var index = $('.modifyclassinput').length;
|
||||||
var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
|
var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<input type="checkbox" style="margin-top: 12px" name="special_condition_display_input[]" id="special_condition_display_input" class="unchecked" checked>
|
<input type="checkbox" style="margin-top: 12px" name="special_condition_display[]" id="special_condition_display" class="unchecked" checked>
|
||||||
</div>
|
</div>
|
||||||
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
|
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
|
||||||
<input class="form-control" name="special_condition_label[]" id="special_condition_label[]" style="position: relative;right: 5px;">
|
<input class="form-control" name="special_condition_label[]" id="special_condition_label[]" style="position: relative;right: 5px;">
|
||||||
@ -1736,8 +1773,8 @@ function processJsonObject(jsonObject) {
|
|||||||
|
|
||||||
for (let key in jsonObject) {
|
for (let key in jsonObject) {
|
||||||
if (typeof jsonObject[key] === 'object' && !Array.isArray(jsonObject[key])) {
|
if (typeof jsonObject[key] === 'object' && !Array.isArray(jsonObject[key])) {
|
||||||
console.log('enrollment_display_key');
|
// console.log('enrollment_display_key');
|
||||||
console.log(jsonObject[key]);
|
// console.log(jsonObject[key]);
|
||||||
|
|
||||||
for (let innerKey in jsonObject[key]) {
|
for (let innerKey in jsonObject[key]) {
|
||||||
|
|
||||||
@ -1759,13 +1796,13 @@ function processJsonObject(jsonObject) {
|
|||||||
let base_id = innerKey.replace(/[\s\-\/,&]+/g, '').toLowerCase();
|
let base_id = innerKey.replace(/[\s\-\/,&]+/g, '').toLowerCase();
|
||||||
|
|
||||||
if (keysToCheck.includes(innerKey)) {
|
if (keysToCheck.includes(innerKey)) {
|
||||||
console.log("Key found: " + innerKey);
|
// console.log("Key found: " + innerKey);
|
||||||
base_id = innerKey.replace(/[\s\-\/]+/g, '_').toLowerCase();
|
base_id = innerKey.replace(/[\s\-\/]+/g, '_').toLowerCase();
|
||||||
} else if (innerKey == "Claim Intimation Clause") {
|
} else if (innerKey == "Claim Intimation Clause") {
|
||||||
console.log("Key found: " + innerKey);
|
// console.log("Key found: " + innerKey);
|
||||||
base_id = "days_of_discharge";
|
base_id = "days_of_discharge";
|
||||||
} else if (innerKey == "Claim Submission") {
|
} else if (innerKey == "Claim Submission") {
|
||||||
console.log("Key found: " + innerKey);
|
// console.log("Key found: " + innerKey);
|
||||||
base_id = "days_from_dod";
|
base_id = "days_from_dod";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1778,4 +1815,5 @@ function processJsonObject(jsonObject) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -567,11 +567,28 @@ $("#policyGPATerms").submit(function(event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var specialConditions = [];
|
||||||
|
|
||||||
|
$(".removeDom").each(function () {
|
||||||
|
var isChecked = $(this).find("input[name='gpa_special_condition_display[]']").is(":checked");
|
||||||
|
|
||||||
|
if (isChecked) {
|
||||||
|
var label = $(this).find("input[name='gpa_special_condition_label[]']").val();
|
||||||
|
var input = $(this).find("input[name='gpa_special_condition_input[]']").val();
|
||||||
|
|
||||||
|
specialConditions.push({ [label]: input });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("gpa_specialConditions", specialConditions);
|
||||||
|
|
||||||
$('.loader').fadeIn();
|
$('.loader').fadeIn();
|
||||||
$('.loader-mask').fadeIn();
|
$('.loader-mask').fadeIn();
|
||||||
|
|
||||||
var formData = new FormData($('#policyGPATerms')[0]);
|
var formData = new FormData($('#policyGPATerms')[0]);
|
||||||
var policy_form_action = '<?= base_url("client/terms/gpa_create") ?>';
|
var policy_form_action = '<?= base_url("client/terms/gpa_create") ?>';
|
||||||
|
formData.append("gpa_special_condition_display_value", JSON.stringify(specialConditions));
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: formData,
|
data: formData,
|
||||||
@ -691,6 +708,24 @@ $('body').on('click', '.btnPolicyMaster', function() {
|
|||||||
gpaJsonObjectForSpecialCondition[key][
|
gpaJsonObjectForSpecialCondition[key][
|
||||||
index
|
index
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (key.includes("gpa_special_condition_label")) {
|
||||||
|
let checkbox = $(element).closest('.form-group').find('input[name="gpa_special_condition_display[]"]');
|
||||||
|
console.log("First element:", element);
|
||||||
|
|
||||||
|
if (checkbox.length) {
|
||||||
|
console.log("Checkbox found:", checkbox);
|
||||||
|
|
||||||
|
// Correct way to set the 'id' attribute
|
||||||
|
let formattedValue = gpaJsonObjectForSpecialCondition[key][index].replace(/[\s\-\/,&]+/g, '').toLowerCase();
|
||||||
|
console.log('formattedValue', formattedValue);
|
||||||
|
checkbox.attr('id', formattedValue + '_display');
|
||||||
|
|
||||||
|
console.log("Updated Checkbox:", checkbox);
|
||||||
|
} else {
|
||||||
|
console.log("Checkbox not found for:", element);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -713,7 +748,7 @@ $('body').on('click', '.btnPolicyMaster', function() {
|
|||||||
console.log('enrollment_display_key');
|
console.log('enrollment_display_key');
|
||||||
console.log(gpaJsonObjectForSpecialCondition[key]);
|
console.log(gpaJsonObjectForSpecialCondition[key]);
|
||||||
|
|
||||||
processJsonObject(gpaJsonObjectForSpecialCondition);
|
processJsonObject2(gpaJsonObjectForSpecialCondition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -838,7 +873,9 @@ function specialConditionForGPA(count = 0) {
|
|||||||
|
|
||||||
var index = $('.modifyclassinput').length;
|
var index = $('.modifyclassinput').length;
|
||||||
var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
|
var appendElement = `<div class="form-group col-md-6 form-group-client-policy-masters removeDom">
|
||||||
|
<div class="col-md-1">
|
||||||
|
<input type="checkbox" style="margin-top: 12px" name="gpa_special_condition_display[]" id="special_condition_display" class="unchecked" checked>
|
||||||
|
</div>
|
||||||
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
|
<label for="specialconditionlabel" class="special_condition_label[]" style="width: 450px;position: relative;bottom: 6px;">
|
||||||
<input class="form-control" name="gpa_special_condition_label[]" id="gpa_special_condition_label[]" style="position: relative;right: 5px;">
|
<input class="form-control" name="gpa_special_condition_label[]" id="gpa_special_condition_label[]" style="position: relative;right: 5px;">
|
||||||
<span class="specialConditionClose" style="color: red; float: right;position: relative;bottom: 28px;left: 15px;">X</span>
|
<span class="specialConditionClose" style="color: red; float: right;position: relative;bottom: 28px;left: 15px;">X</span>
|
||||||
@ -951,7 +988,7 @@ function inArray(key, array) {
|
|||||||
return array.includes(key);
|
return array.includes(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
function processJsonObject(jsonObject) {
|
function processJsonObject2(jsonObject) {
|
||||||
|
|
||||||
if (typeof jsonObject !== 'object' || Array.isArray(jsonObject)) {
|
if (typeof jsonObject !== 'object' || Array.isArray(jsonObject)) {
|
||||||
console.log("jsonObject Input is not a valid object.");
|
console.log("jsonObject Input is not a valid object.");
|
||||||
@ -962,8 +999,8 @@ function processJsonObject(jsonObject) {
|
|||||||
|
|
||||||
for (let key in jsonObject) {
|
for (let key in jsonObject) {
|
||||||
if (typeof jsonObject[key] === 'object' && !Array.isArray(jsonObject[key])) {
|
if (typeof jsonObject[key] === 'object' && !Array.isArray(jsonObject[key])) {
|
||||||
console.log('enrollment_display_key');
|
// console.log('enrollment_display_key');
|
||||||
console.log(jsonObject[key]);
|
// console.log(jsonObject[key]);
|
||||||
|
|
||||||
for (let innerKey in jsonObject[key]) {
|
for (let innerKey in jsonObject[key]) {
|
||||||
|
|
||||||
@ -983,20 +1020,20 @@ function processJsonObject(jsonObject) {
|
|||||||
base_id = base_id.charAt(0).toLowerCase() + base_id.slice(1);
|
base_id = base_id.charAt(0).toLowerCase() + base_id.slice(1);
|
||||||
|
|
||||||
if (keysToCheck.includes(innerKey)) {
|
if (keysToCheck.includes(innerKey)) {
|
||||||
console.log("Key found: " + innerKey);
|
// console.log("Key found: " + innerKey);
|
||||||
base_id = innerKey.replace(/[\s\-\/]+/g, '_').toLowerCase();
|
base_id = innerKey.replace(/[\s\-\/]+/g, '_').toLowerCase();
|
||||||
} else if (innerKey == "Medical Expenses / Medical Extension (IPD)") {
|
} else if (innerKey == "Medical Expenses / Medical Extension (IPD)") {
|
||||||
console.log("Key found: " + innerKey);
|
// console.log("Key found: " + innerKey);
|
||||||
base_id = "medical_expenses_medical_extension";
|
base_id = "medical_expenses_medical_extension";
|
||||||
} else if (innerKey == "Terrorism") {
|
} else if (innerKey == "Terrorism") {
|
||||||
console.log("Key found: " + innerKey);
|
// console.log("Key found: " + innerKey);
|
||||||
base_id = "gpa_terrorism";
|
base_id = "gpa_terrorism";
|
||||||
}
|
}
|
||||||
|
|
||||||
let display_id = base_id + "_display";
|
let display_id = base_id + "_display";
|
||||||
$('#' + display_id).prop('checked', true);
|
$('#' + display_id).prop('checked', true);
|
||||||
console.log('display_id : ', display_id);
|
// console.log('display_id : ', display_id);
|
||||||
console.log($('#' + display_id))
|
// console.log($('#' + display_id))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(`${key} is not an object.`);
|
console.log(`${key} is not an object.`);
|
||||||
|
|||||||
@ -1314,8 +1314,8 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
$(document).on('change', 'input[type="checkbox"][name="co_share_type[]"]', function() {
|
$(document).on('change', 'input[type="checkbox"][name="co_share_type[]"]', function() {
|
||||||
|
|
||||||
$('[name="base_premium[]"]').val("");
|
// $('[name="base_premium[]"]').val("");
|
||||||
$('[name="co_premium[]"]').val("");
|
// $('[name="co_premium[]"]').val("");
|
||||||
|
|
||||||
let isAnyChecked = $('input[type="checkbox"][name="co_share_type[]"]:checked').length > 1;
|
let isAnyChecked = $('input[type="checkbox"][name="co_share_type[]"]:checked').length > 1;
|
||||||
|
|
||||||
@ -1764,7 +1764,7 @@ function checkAndDistributeTax(input)
|
|||||||
|
|
||||||
function amountCalculation(input) {
|
function amountCalculation(input) {
|
||||||
|
|
||||||
console.log('amountCalculation - ' + input);
|
console.log('amountCalculation : ' + input);
|
||||||
let selectedOption = $('#policy_type_id').find('option:selected');
|
let selectedOption = $('#policy_type_id').find('option:selected');
|
||||||
let bap = selectedOption.data('bap');
|
let bap = selectedOption.data('bap');
|
||||||
|
|
||||||
@ -1816,10 +1816,8 @@ function amountCalculation(input) {
|
|||||||
// Calculate GST percentage
|
// Calculate GST percentage
|
||||||
let gst_per = igst;
|
let gst_per = igst;
|
||||||
if (igst === 0) {
|
if (igst === 0) {
|
||||||
console.log('called' + cgst + sgst);
|
|
||||||
gst_per = parseFloat(cgst) + parseFloat(sgst);
|
gst_per = parseFloat(cgst) + parseFloat(sgst);
|
||||||
// gst_per = (cgst) + (sgst);
|
// gst_per = (cgst) + (sgst);
|
||||||
console.log(gst_per);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('gst_per', gst_per);
|
console.log('gst_per', gst_per);
|
||||||
@ -3543,7 +3541,7 @@ $('#setInsurerCount').on('click', function() {
|
|||||||
|
|
||||||
function addInsurerColumn() {
|
function addInsurerColumn() {
|
||||||
|
|
||||||
insurerCount++;
|
insurerCount = insurerCount + 1;
|
||||||
|
|
||||||
// hidePermiumDetailsBasedOnTheTeam()
|
// hidePermiumDetailsBasedOnTheTeam()
|
||||||
|
|
||||||
@ -4087,6 +4085,7 @@ function populateTable(dataArray, cd_ac_pk) {
|
|||||||
|
|
||||||
// console.log('data.cd_ac_pk', cd_ac_pk)
|
// console.log('data.cd_ac_pk', cd_ac_pk)
|
||||||
if(data.co_share_type == 1){
|
if(data.co_share_type == 1){
|
||||||
|
if(index == 0) { index = 1;}
|
||||||
getCdAmount(cd_ac_pk, index);
|
getCdAmount(cd_ac_pk, index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -4232,7 +4231,7 @@ function checkCDAmountForBasePremium(input) {
|
|||||||
|
|
||||||
function getCdAmount(cd_ac_pk, increment){
|
function getCdAmount(cd_ac_pk, increment){
|
||||||
|
|
||||||
increment = increment + 1
|
// increment = increment + 1
|
||||||
console.log('cd_ac_pk', cd_ac_pk);
|
console.log('cd_ac_pk', cd_ac_pk);
|
||||||
console.log('increment', increment);
|
console.log('increment', increment);
|
||||||
|
|
||||||
@ -4266,4 +4265,34 @@ function getCdAmount(cd_ac_pk, increment){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#bro_payable_by').on('change', function(){
|
||||||
|
|
||||||
|
var columnIndexes = [];
|
||||||
|
$('#insurerTable thead th').each(function(index) {
|
||||||
|
if(index == 0){
|
||||||
|
console.log("columnIndexes is ", index);
|
||||||
|
}else{
|
||||||
|
amountCalculation(index);
|
||||||
|
}
|
||||||
|
columnIndexes.push(index);
|
||||||
|
});
|
||||||
|
console.log("columnIndexes", columnIndexes);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('change', '#insurerTable input, #insurerTable select, #insurerTable textarea', function() {
|
||||||
|
console.log('Changed in table:', $(this).attr('name'), 'Value:', $(this).val());
|
||||||
|
getColumnIndexes()
|
||||||
|
});
|
||||||
|
|
||||||
|
function getColumnIndexes() {
|
||||||
|
$('#insurerTable thead th').each(function(index) {
|
||||||
|
if (index === 0) {
|
||||||
|
console.log("columnIndexes is", index);
|
||||||
|
} else {
|
||||||
|
amountCalculation(index);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -319,7 +319,7 @@ table.dataTable tbody td {
|
|||||||
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" onclick="getPolicyTransactionDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
<a class="dropdown-item btnEdit" data-id="<?= $row['id'];?>" onclick="getPolicyTransactionDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
||||||
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
|
<i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removePolicyTransaction(this, '<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
<a class="dropdown-item delete" data-id="<?= $row['id'];?>" onclick="removePolicyTransaction(this, '<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>')">
|
||||||
<i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete
|
<i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -370,25 +370,25 @@ table.dataTable tbody td {
|
|||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
const table = document.getElementById("tickets-table");
|
const table = document.getElementById("tickets-table");
|
||||||
|
|
||||||
// Create custom dropdown
|
|
||||||
function createCustomDropdown(row) {
|
function createCustomDropdown(row) {
|
||||||
// Get the original dropdown items
|
|
||||||
const originalDropdown = row.querySelector('.dropdown-menu');
|
const originalDropdown = row.querySelector('.dropdown-menu');
|
||||||
if (!originalDropdown) return null;
|
if (!originalDropdown) return null;
|
||||||
|
|
||||||
// Create new dropdown with proper background and spacing
|
|
||||||
const customDropdown = document.createElement('div');
|
const customDropdown = document.createElement('div');
|
||||||
customDropdown.className = 'custom-dropdown-menu';
|
customDropdown.className = 'custom-dropdown-menu';
|
||||||
|
|
||||||
// Copy inner content while maintaining icon alignment
|
const items = originalDropdown.querySelectorAll('.dropdown-item');
|
||||||
customDropdown.innerHTML = originalDropdown.innerHTML;
|
items.forEach(item => {
|
||||||
|
const newItem = item.cloneNode(true);
|
||||||
|
newItem.removeAttribute('onclick');
|
||||||
|
customDropdown.appendChild(newItem);
|
||||||
|
});
|
||||||
|
|
||||||
return customDropdown;
|
return customDropdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
let activeDropdown = null;
|
let activeDropdown = null;
|
||||||
|
|
||||||
// Add click event listener to rows
|
|
||||||
table.querySelectorAll("tbody tr").forEach(row => {
|
table.querySelectorAll("tbody tr").forEach(row => {
|
||||||
const customDropdown = createCustomDropdown(row);
|
const customDropdown = createCustomDropdown(row);
|
||||||
if (!customDropdown) return;
|
if (!customDropdown) return;
|
||||||
@ -401,51 +401,56 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide any active dropdown
|
// Close any existing dropdown
|
||||||
if (activeDropdown) {
|
if (activeDropdown && activeDropdown !== customDropdown) {
|
||||||
activeDropdown.style.display = 'none';
|
activeDropdown.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get click position
|
|
||||||
const rect = event.target.getBoundingClientRect();
|
const rect = event.target.getBoundingClientRect();
|
||||||
|
|
||||||
// Position the dropdown with some offset
|
|
||||||
customDropdown.style.display = 'block';
|
customDropdown.style.display = 'block';
|
||||||
customDropdown.style.position = 'fixed';
|
customDropdown.style.position = 'fixed';
|
||||||
customDropdown.style.left = `${rect.left}px`;
|
customDropdown.style.left = `${rect.left}px`;
|
||||||
customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
|
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||||
|
|
||||||
// Set as active dropdown
|
|
||||||
activeDropdown = customDropdown;
|
activeDropdown = customDropdown;
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Preserve click handlers and add auto-close
|
// Handle clicks on dropdown items
|
||||||
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
customDropdown.querySelectorAll('.dropdown-item').forEach(item => {
|
||||||
item.addEventListener('click', function(e) {
|
item.addEventListener('click', function(e) {
|
||||||
const onclickAttr = this.getAttribute('onclick');
|
e.preventDefault();
|
||||||
if (onclickAttr) {
|
e.stopPropagation();
|
||||||
eval(onclickAttr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const id = this.getAttribute('data-id');
|
||||||
|
|
||||||
|
// Handle edit button
|
||||||
|
if (this.classList.contains('btnEdit') && id) {
|
||||||
|
getPolicyTransactionDataForEdit(id);
|
||||||
|
}
|
||||||
|
// Handle delete button
|
||||||
|
else if (this.classList.contains('delete') && id) {
|
||||||
|
removePolicyTransaction(this, id);
|
||||||
|
}
|
||||||
|
// Handle other links
|
||||||
|
else {
|
||||||
const href = this.getAttribute('href');
|
const href = this.getAttribute('href');
|
||||||
if (href && href !== '#') {
|
if (href && href !== '#' && href !== 'javascript: void(0);') {
|
||||||
window.location.href = href;
|
window.location.href = href;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Close the dropdown after handling the click
|
// Close dropdown
|
||||||
if (activeDropdown) {
|
if (activeDropdown) {
|
||||||
activeDropdown.style.display = 'none';
|
activeDropdown.style.display = 'none';
|
||||||
activeDropdown = null;
|
activeDropdown = null;
|
||||||
}
|
}
|
||||||
|
}, { once: true });
|
||||||
e.stopPropagation();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Close dropdown when clicking outside
|
// Close dropdown on outside click
|
||||||
document.addEventListener("click", function() {
|
document.addEventListener("click", function() {
|
||||||
if (activeDropdown) {
|
if (activeDropdown) {
|
||||||
activeDropdown.style.display = 'none';
|
activeDropdown.style.display = 'none';
|
||||||
@ -1486,7 +1491,7 @@ function onlyNumbers(event)
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
getURLParams()
|
// getURLParams()
|
||||||
$('#client_id_for_search').select2();
|
$('#client_id_for_search').select2();
|
||||||
$('#insurer_id_for_search').select2();
|
$('#insurer_id_for_search').select2();
|
||||||
$('#policy_type_for_search').select2();
|
$('#policy_type_for_search').select2();
|
||||||
@ -1531,50 +1536,50 @@ function objectToQueryString(obj)
|
|||||||
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
|
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getURLParams()
|
// function getURLParams()
|
||||||
{
|
// {
|
||||||
const url = new URL(window.location.href);
|
// const url = new URL(window.location.href);
|
||||||
const params = new URLSearchParams(url.search);
|
// const params = new URLSearchParams(url.search);
|
||||||
|
|
||||||
const startDate = params.get('start_date') || 0; // Default to 0 if not found
|
// const startDate = params.get('start_date') || 0; // Default to 0 if not found
|
||||||
const endDate = params.get('end_date') || 0; // Default to 0 if not found
|
// const endDate = params.get('end_date') || 0; // Default to 0 if not found
|
||||||
const client_id = params.get('client_id') || 0; // Default to 0 if not found
|
// const client_id = params.get('client_id') || 0; // Default to 0 if not found
|
||||||
const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
|
// const insurer_id = params.get('insurer_id') || 0; // Default to 0 if not found
|
||||||
const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
|
// const policy_type_id = params.get('policy_type_id') || 0; // Default to 0 if not found
|
||||||
const date_type = params.get('date_type') || 0; // Default to 0 if not found
|
// const date_type = params.get('date_type') || 0; // Default to 0 if not found
|
||||||
const issuer = params.get('issuer') || 0; // Default to 0 if not found
|
// const issuer = params.get('issuer') || 0; // Default to 0 if not found
|
||||||
const status = params.get('status') || 0; // Default to 0 if not found
|
// const status = params.get('status') || 0; // Default to 0 if not found
|
||||||
|
|
||||||
hideDateField(date_type)
|
// hideDateField(date_type)
|
||||||
|
|
||||||
// console.log('startDate', startDate)
|
// // console.log('startDate', startDate)
|
||||||
// console.log('endDate', endDate)
|
// // console.log('endDate', endDate)
|
||||||
// console.log('client_id', client_id)
|
// // console.log('client_id', client_id)
|
||||||
// console.log('insurer_id', insurer_id)
|
// // console.log('insurer_id', insurer_id)
|
||||||
// console.log('policy_type_id', policy_type_id)
|
// // console.log('policy_type_id', policy_type_id)
|
||||||
// console.log('date_type', date_type)
|
// // console.log('date_type', date_type)
|
||||||
// console.log('issuer', issuer)
|
// // console.log('issuer', issuer)
|
||||||
// console.log('status', status)
|
// // console.log('status', status)
|
||||||
|
|
||||||
// Log the values or use them as needed
|
// // Log the values or use them as needed
|
||||||
// console.log('Start Date:', startDate);
|
// // console.log('Start Date:', startDate);
|
||||||
// console.log('End Date:', endDate);
|
// // console.log('End Date:', endDate);
|
||||||
|
|
||||||
if (startDate != 0 && endDate != 0) {
|
// if (startDate != 0 && endDate != 0) {
|
||||||
setTimeout(function(){
|
// setTimeout(function(){
|
||||||
$('#start_date').val(startDate)
|
// $('#start_date').val(startDate)
|
||||||
$('#end_date').val(endDate)
|
// $('#end_date').val(endDate)
|
||||||
$('#client_id_for_search').val(client_id).change()
|
// $('#client_id_for_search').val(client_id).change()
|
||||||
$('#insurer_id_for_search').val(insurer_id).change()
|
// $('#insurer_id_for_search').val(insurer_id).change()
|
||||||
$('#policy_type_for_search').val(policy_type_id).change()
|
// $('#policy_type_for_search').val(policy_type_id).change()
|
||||||
$('#date_type').val(date_type)
|
// $('#date_type').val(date_type)
|
||||||
$('#issuer_for_search').val(issuer)
|
// $('#issuer_for_search').val(issuer)
|
||||||
$('#policy_status_for_search').val(status)
|
// $('#policy_status_for_search').val(status)
|
||||||
},1000)
|
// },1000)
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
|
|||||||
@ -24,28 +24,28 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#general-tab" data-toggle="tab" class="nav-link px-2 py-1 active" id="general_tab"
|
<a href="#general-tab" data-toggle="tab" class="nav-link px-2 py-1 active" id="general_tab"
|
||||||
aria-expanded="true">
|
aria-expanded="true">
|
||||||
<i class="mdi mdi-contacts mr-1"></i>
|
<i class="mdi mdi-ticket-account"></i>
|
||||||
<span class="d-none d-sm-inline-block">General</span>
|
<span class="d-none d-sm-inline-block">General</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#reply-tab" data-toggle="tab" class="nav-link px-2 py-1" id="reply_tab"
|
<a href="#reply-tab" data-toggle="tab" class="nav-link px-2 py-1" id="reply_tab"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<i class="fa fa-file mr-1"></i>
|
<i class="mdi mdi-message-processing"></i>
|
||||||
<span class="d-none d-sm-inline-block">Reply</span>
|
<span class="d-none d-sm-inline-block">Reply</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#note-tab" data-toggle="tab" class="nav-link px-2 py-1" id="note_tab"
|
<a href="#note-tab" data-toggle="tab" class="nav-link px-2 py-1" id="note_tab"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<i class="mdi mdi-account-switch mr-1"></i>
|
<i class="mdi mdi-note-text"></i>
|
||||||
<span class="d-none d-sm-inline-block">Note</span>
|
<span class="d-none d-sm-inline-block">Notes</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#history-tab" data-toggle="tab" class="nav-link px-2 py-1" id="history_tab"
|
<a href="#history-tab" data-toggle="tab" class="nav-link px-2 py-1" id="history_tab"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<i class="mdi mdi-source-branch mr-1"></i>
|
<i class="mdi mdi-history"></i>
|
||||||
<span class="d-none d-sm-inline-block">History</span>
|
<span class="d-none d-sm-inline-block">History</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -235,9 +235,44 @@ function showConfirmationModal(event) {
|
|||||||
console.log($('#ticket_form_data')[0])
|
console.log($('#ticket_form_data')[0])
|
||||||
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
||||||
} else if (result.isDenied) {
|
} else if (result.isDenied) {
|
||||||
|
// Show second Swal for rejection reason
|
||||||
|
Swal.fire({
|
||||||
|
title: "Rejection Reason",
|
||||||
|
text: "Please provide a reason for rejection",
|
||||||
|
input: "textarea",
|
||||||
|
inputPlaceholder: "Enter your reason here...",
|
||||||
|
icon: "info",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: "#3085d6",
|
||||||
|
cancelButtonColor: "#6c757d",
|
||||||
|
confirmButtonText: "Submit",
|
||||||
|
cancelButtonText: "Back"
|
||||||
|
}).then((reasonResult) => {
|
||||||
|
if (reasonResult.isConfirmed) {
|
||||||
|
// Check if reason is not empty
|
||||||
|
if (reasonResult.value && reasonResult.value.trim() !== "") {
|
||||||
$('#is_head_approved').val(2);
|
$('#is_head_approved').val(2);
|
||||||
console.log($('#ticket_form_data')[0])
|
$('#rejection_reason').val(reasonResult.value.trim());
|
||||||
submitClaimForm(event, $('#ticket_form_data')[0]); // Fixed selector
|
console.log($('#ticket_form_data')[0]);
|
||||||
|
$('#head_rejection_reason').val(reasonResult.value.trim());
|
||||||
|
submitClaimForm(event, $('#ticket_form_data')[0]);
|
||||||
|
} else {
|
||||||
|
// Alert if reason is empty
|
||||||
|
Swal.fire({
|
||||||
|
title: "Error",
|
||||||
|
text: "Rejection reason cannot be empty",
|
||||||
|
icon: "error",
|
||||||
|
confirmButtonColor: "#3085d6"
|
||||||
|
}).then(() => {
|
||||||
|
// Go back to the rejection reason dialog
|
||||||
|
showConfirmationModal(event);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If canceled, go back to first Swal
|
||||||
|
showConfirmationModal(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$('#is_head_approved').val(0);
|
$('#is_head_approved').val(0);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -21,80 +21,16 @@
|
|||||||
<input type="hidden" id="ticket_master_id" name="ticket_master_id" value="<?= isset($ticket_data['id']) ? $ticket_data['id'] : '' ?>">
|
<input type="hidden" id="ticket_master_id" name="ticket_master_id" value="<?= isset($ticket_data['id']) ? $ticket_data['id'] : '' ?>">
|
||||||
<input type="hidden" id="is_head_approved" name="is_head_approved" value="<?= isset($ticket_data['is_head_approved']) ? $ticket_data['is_head_approved'] : '' ?>">
|
<input type="hidden" id="is_head_approved" name="is_head_approved" value="<?= isset($ticket_data['is_head_approved']) ? $ticket_data['is_head_approved'] : '' ?>">
|
||||||
<input type="hidden" id="extra_fields_array_for_validate" name="extra_fields_array_for_validate" value='<?= isset($extra_fields_array_for_validate) && !empty($extra_fields_array_for_validate) ? json_encode($extra_fields_array_for_validate) : "[]" ?>'>
|
<input type="hidden" id="extra_fields_array_for_validate" name="extra_fields_array_for_validate" value='<?= isset($extra_fields_array_for_validate) && !empty($extra_fields_array_for_validate) ? json_encode($extra_fields_array_for_validate) : "[]" ?>'>
|
||||||
|
<input type="hidden" id="head_rejection_reason" name="head_rejection_reason">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
|
<h5>Employee Details</h5>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- first_data_points -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="claim_status">Status<span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
|
||||||
<!-- <option value="0">Select status</option> -->
|
|
||||||
<?php
|
|
||||||
if (isset($claim_status) && count($claim_status)) {
|
|
||||||
foreach ($claim_status as $key => $value) {
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['claim_status_id'] == $value['id']) ? 'selected' : '';
|
|
||||||
echo "<option value=" . $value['id'] . " $selected>" . $value['claim_status'] . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="priority">Priority<span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="priority" name="priority">
|
|
||||||
<!-- <option value="0">Select Priority</option> -->
|
|
||||||
<?php
|
|
||||||
if (isset($priorityType) && count($priorityType)) {
|
|
||||||
foreach ($priorityType as $key => $value) {
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['priority'] == $key) ? 'selected' : '';
|
|
||||||
echo "<option value=" . $key . " $selected>" . $value . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="acm_id" name="acm_id">
|
|
||||||
<!-- <option value="0">Select Account Manager</option> -->
|
|
||||||
<?php
|
|
||||||
if (isset($acms) && count($acms)) {
|
|
||||||
foreach ($acms as $key => $value) {
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['acm_id'] == $value['id']) ? 'selected' : '';
|
|
||||||
echo "<option value=" . $value['id'] . " $selected >" . $value['first_name'] . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
|
||||||
<input type="text" class="form-control" id="policy_no"
|
|
||||||
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
|
||||||
name="policy_no" placeholder="Policy Number" >
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
|
||||||
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
|
||||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="tpa_id">TPA<span class="text-danger"></span></label>
|
|
||||||
<input type=hidden id="tpa_id" name="tpa_id" value="<?= isset($ticket_data['tpa_id']) ? $ticket_data['tpa_id'] : '' ?>">
|
|
||||||
<input type=text class="form-control" id="tpa_name" placeholder="TPA" value="<?= isset($ticket_data['tpa_name']) ? $ticket_data['tpa_name'] : '' ?>" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
|
||||||
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
|
||||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="emp_code">Employee ID <i class="fa fa-search text-danger"
|
<label for="emp_code">Employee ID <i class="fa fa-search text-danger"
|
||||||
aria-hidden="true" onclick="openFetchEmpDataodal(this)"></i> <span
|
aria-hidden="true" onclick="openFetchEmpDataodal(this)"></i> <span
|
||||||
@ -104,13 +40,6 @@
|
|||||||
name="emp_code">
|
name="emp_code">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="tpa_id">TPA ID<span class="text-danger"></span></label>
|
|
||||||
<input type="text" class="form-control" id="tpa_no" placeholder="Enter TPA ID"
|
|
||||||
value="<?= isset($ticket_data['tpa_no']) ? $ticket_data['tpa_no'] : '' ?>"
|
|
||||||
name="tpa_no">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
|
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
|
||||||
<input type=hidden id="emp_id" name="emp_id" value="<?= isset($ticket_data['emp_id']) ? $ticket_data['emp_id'] : '' ?>">
|
<input type=hidden id="emp_id" name="emp_id" value="<?= isset($ticket_data['emp_id']) ? $ticket_data['emp_id'] : '' ?>">
|
||||||
@ -140,6 +69,20 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
||||||
|
<input type="text" class="form-control" id="policy_no"
|
||||||
|
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
||||||
|
name="policy_no" placeholder="Policy Number" >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="tpa_id">TPA ID<span class="text-danger"></span></label>
|
||||||
|
<input type="text" class="form-control" id="tpa_no" placeholder="Enter TPA ID"
|
||||||
|
value="<?= isset($ticket_data['tpa_no']) ? $ticket_data['tpa_no'] : '' ?>"
|
||||||
|
name="tpa_no">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="emp_mobile">Employee Mobile No<span class="text-danger"></span></label>
|
<label for="emp_mobile">Employee Mobile No<span class="text-danger"></span></label>
|
||||||
<input type="text" class="form-control" id="emp_mobile" placeholder="Enter EMP Mobile"
|
<input type="text" class="form-control" id="emp_mobile" placeholder="Enter EMP Mobile"
|
||||||
@ -154,6 +97,78 @@
|
|||||||
name="emp_mail">
|
name="emp_mail">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
||||||
|
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
||||||
|
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||||
|
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
||||||
|
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="tpa_id">TPA<span class="text-danger"></span></label>
|
||||||
|
<input type=hidden id="tpa_id" name="tpa_id" value="<?= isset($ticket_data['tpa_id']) ? $ticket_data['tpa_id'] : '' ?>">
|
||||||
|
<input type=text class="form-control" id="tpa_name" placeholder="TPA" value="<?= isset($ticket_data['tpa_name']) ? $ticket_data['tpa_name'] : '' ?>" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
||||||
|
<select class="form-control" id="acm_id" name="acm_id">
|
||||||
|
<!-- <option value="0">Select Account Manager</option> -->
|
||||||
|
<?php
|
||||||
|
if (isset($acms) && count($acms)) {
|
||||||
|
foreach ($acms as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['acm_id'] == $value['id']) ? 'selected' : '';
|
||||||
|
echo "<option value=" . $value['id'] . " $selected >" . $value['first_name'] . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end first_data_points -->
|
||||||
|
|
||||||
|
<h5>Claim Details</h5>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- second_data_points -->
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="claim_status">Status<span class="text-danger"></span></label>
|
||||||
|
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
||||||
|
<!-- <option value="0">Select status</option> -->
|
||||||
|
<?php
|
||||||
|
if (isset($claim_status) && count($claim_status)) {
|
||||||
|
foreach ($claim_status as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['claim_status_id'] == $value['id']) ? 'selected' : '';
|
||||||
|
echo "<option value=" . $value['id'] . " $selected>" . $value['claim_status'] . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="priority">Priority<span class="text-danger"></span></label>
|
||||||
|
<select class="form-control" id="priority" name="priority">
|
||||||
|
<!-- <option value="0">Select Priority</option> -->
|
||||||
|
<?php
|
||||||
|
if (isset($priorityType) && count($priorityType)) {
|
||||||
|
foreach ($priorityType as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['priority'] == $key) ? 'selected' : '';
|
||||||
|
echo "<option value=" . $key . " $selected>" . $value . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="mode_of_intimation"> Mode of Intimation <span
|
<label for="mode_of_intimation"> Mode of Intimation <span
|
||||||
class="text-danger"></span></label>
|
class="text-danger"></span></label>
|
||||||
@ -215,12 +230,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="pod_no">POD No<span class="text-danger"></span></label>
|
<label id="pod_no_label_1" for="pod_no">POD No<span id="pod_no_label_1_span" class="text-danger"></span></label>
|
||||||
<input type="text" class="form-control" id="pod_no" placeholder="Enter POD NO"
|
<input type="text" class="form-control" id="pod_no" placeholder="Enter POD NO"
|
||||||
value="<?= isset($ticket_data['pod_no']) ? $ticket_data['pod_no'] : '' ?>"
|
value="<?= isset($ticket_data['pod_no']) ? $ticket_data['pod_no'] : '' ?>"
|
||||||
name="pod_no">
|
name="pod_no">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end second_data_points -->
|
||||||
|
|
||||||
|
<h5>Additional Details</h5>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- third_data_points -->
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-3 up_cnu" style="display: none;">
|
<div class="form-group col-md-3 up_cnu" style="display: none;">
|
||||||
<label for="claim_number">Claim Number<span class="text-danger"></span></label>
|
<label for="claim_number">Claim Number<span class="text-danger"></span></label>
|
||||||
<input type="text" class="form-control" id="claim_number" placeholder="Enter Claim NO"
|
<input type="text" class="form-control" id="claim_number" placeholder="Enter Claim NO"
|
||||||
@ -294,16 +318,21 @@
|
|||||||
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3 returned" style="display: none;">
|
<div class="form-group col-md-3 payment" style="display: none;">
|
||||||
<label for="return_remark">Return Remark</label>
|
<label for="pay_initiate_date">Payment Initiate Date</label>
|
||||||
<textarea class="form-control" id="return_remark" placeholder="Enter Return Remark" name="return_remark"><?= isset($ticket_data['return_remark']) ? $ticket_data['return_remark'] : '' ?></textarea>
|
<input type="text" class="form-control datepicker" id="pay_initiate_date" placeholder="Select Payment Initiate Date"
|
||||||
|
value="<?= isset($ticket_data['pay_initiate_date']) ? $ticket_data['pay_initiate_date'] : '' ?>" name="pay_initiate_date">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3 canceled" style="display: none;">
|
<div class="form-group col-md-3 canceled" style="display: none;">
|
||||||
<label for="cancel_remark">Cancel Remark</label>
|
<label for="cancel_remark">Cancel Remark</label>
|
||||||
<textarea class="form-control" id="cancel_remark" placeholder="Enter Cancel Remark" name="cancel_remark"><?= isset($ticket_data['cancel_remark']) ? $ticket_data['cancel_remark'] : '' ?></textarea>
|
<textarea class="form-control" id="cancel_remark" rows="1" placeholder="Enter Cancel Remark" name="cancel_remark"><?= isset($ticket_data['cancel_remark']) ? $ticket_data['cancel_remark'] : '' ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3 returned" style="display: none;">
|
||||||
|
<label for="return_remark">Return Remark</label>
|
||||||
|
<textarea class="form-control" id="return_remark" rows="1" placeholder="Enter Return Remark" name="return_remark"><?= isset($ticket_data['return_remark']) ? $ticket_data['return_remark'] : '' ?></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-6 returned" style="display: none;">
|
<div class="form-group col-md-6 returned" style="display: none;">
|
||||||
<label for="awb_no_courier_name">AWB No with Courier Name</label>
|
<label for="awb_no_courier_name">AWB No with Courier Name</label>
|
||||||
@ -311,7 +340,24 @@
|
|||||||
value="<?= isset($ticket_data['awb_no_courier_name']) ? $ticket_data['awb_no_courier_name'] : '' ?>" name="awb_no_courier_name">
|
value="<?= isset($ticket_data['awb_no_courier_name']) ? $ticket_data['awb_no_courier_name'] : '' ?>" name="awb_no_courier_name">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3 non_id" style="display: none;">
|
||||||
|
<label for="non_id_reason">Non ID Reason</label>
|
||||||
|
<select class="form-control" id="non_id_reason" name="non_id_reason">
|
||||||
|
<option value="">Select Reason</option>
|
||||||
|
<?php
|
||||||
|
if (isset($nonIDReason) && count($nonIDReason)) {
|
||||||
|
foreach ($nonIDReason as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['non_id_reason'] == $key) ? 'selected' : '';
|
||||||
|
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end third_data_points -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
||||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
|
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
|
||||||
@ -337,12 +383,9 @@
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
let GlobelExtraFields = [];
|
let GlobelExtraFields = [];
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@ -357,12 +400,34 @@ $(document).ready(function() {
|
|||||||
allowInput: false
|
allowInput: false
|
||||||
});
|
});
|
||||||
|
|
||||||
flatpickr("#raised_date", { dateFormat: "d/m/Y", allowInput: false });
|
flatpickr("#raised_date", {
|
||||||
flatpickr("#registration_date", { dateFormat: "d/m/Y", allowInput: false });
|
dateFormat: "d/m/Y",
|
||||||
flatpickr("#query_received_date", { dateFormat: "d/m/Y", allowInput: false });
|
allowInput: false
|
||||||
flatpickr("#denial_date", { dateFormat: "d/m/Y", allowInput: false });
|
});
|
||||||
flatpickr("#approved_date", { dateFormat: "d/m/Y", allowInput: false });
|
flatpickr("#registration_date", {
|
||||||
flatpickr("#settled_date", { dateFormat: "d/m/Y", allowInput: false });
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
flatpickr("#query_received_date", {
|
||||||
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
flatpickr("#denial_date", {
|
||||||
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
flatpickr("#approved_date", {
|
||||||
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
flatpickr("#settled_date", {
|
||||||
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
flatpickr("#pay_initiate_date", {
|
||||||
|
dateFormat: "d/m/Y",
|
||||||
|
allowInput: false
|
||||||
|
});
|
||||||
|
|
||||||
// updateClaimStatusDisplay("<?= isset($ticket_data['claim_status_id']) ? $ticket_data['claim_status_id'] : 0 ?>")
|
// updateClaimStatusDisplay("<?= isset($ticket_data['claim_status_id']) ? $ticket_data['claim_status_id'] : 0 ?>")
|
||||||
var extraFields = <?= json_encode(isset($extra_fields) ? $extra_fields : []); ?>;
|
var extraFields = <?= json_encode(isset($extra_fields) ? $extra_fields : []); ?>;
|
||||||
@ -408,7 +473,7 @@ $(document).ready(function() {
|
|||||||
function updateClaimStatusDisplay(value) {
|
function updateClaimStatusDisplay(value) {
|
||||||
|
|
||||||
// Hide all sections and remove required attribute from their inputs and textareas
|
// Hide all sections and remove required attribute from their inputs and textareas
|
||||||
let sections = $('.cda_ir, .settled, .approved, .rejected, .up_qdr, .up_cnu, .canceled, .returned');
|
let sections = $('.cda_ir, .settled, .approved, .rejected, .up_qdr, .up_cnu, .canceled, .returned, .payment, .non_id');
|
||||||
sections.hide().find('input, textarea').removeAttr('required');
|
sections.hide().find('input, textarea').removeAttr('required');
|
||||||
|
|
||||||
// Determine which section to show
|
// Determine which section to show
|
||||||
@ -429,11 +494,22 @@ function updateClaimStatusDisplay(value) {
|
|||||||
showClass = '.canceled';
|
showClass = '.canceled';
|
||||||
} else if (value == 14) { // RETURNED
|
} else if (value == 14) { // RETURNED
|
||||||
showClass = '.returned';
|
showClass = '.returned';
|
||||||
|
} else if (value == 1) { // NON ID
|
||||||
|
showClass = '.non_id';
|
||||||
|
} else if (value == 10) { // PAYMENT INITIATED
|
||||||
|
showClass = '.payment';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the relevant section and enable required attributes
|
// Show the relevant section and enable required attributes
|
||||||
if (showClass) {
|
if (showClass) {
|
||||||
$(showClass).show().find('input, textarea').attr('required', true);
|
// $(showClass).show().find('input, textarea').attr('required', true);
|
||||||
|
$(showClass).show().find('input, textarea').attr('required', true).each(function() {
|
||||||
|
var $label = $("label[for='" + $(this).attr('id') + "']");
|
||||||
|
if ($label.length && !$label.find('.text-danger').length) {
|
||||||
|
$label.append(' <span class="text-danger">*</span>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,14 +524,14 @@ function claimStatusFieldChanges(fields) {
|
|||||||
var $field = $("#" + fieldId);
|
var $field = $("#" + fieldId);
|
||||||
|
|
||||||
if ($field.length) {
|
if ($field.length) {
|
||||||
$field.prop('required', true);
|
// $field.prop('required', true);
|
||||||
|
|
||||||
var $parentDiv = $field.closest("div");
|
var $parentDiv = $field.closest("div");
|
||||||
$parentDiv.show();
|
$parentDiv.show();
|
||||||
|
|
||||||
var $label = $parentDiv.find("label[for='" + fieldId + "']");
|
var $label = $parentDiv.find("label[for='" + fieldId + "']");
|
||||||
if ($label.length && !$label.find(".text-danger").length) {
|
if ($label.length && !$label.find(".text-danger").length) {
|
||||||
$label.append(' <span class="text-danger">*</span>');
|
// $label.append(' <span class="text-danger">*</span>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -477,7 +553,7 @@ function claimStatusFieldRemoveREquired(fields, remove_or_add, thirdClass) {
|
|||||||
var $label = $parentDiv.find("label[for='" + fieldId + "']");
|
var $label = $parentDiv.find("label[for='" + fieldId + "']");
|
||||||
// if(remove_or_add == false){
|
// if(remove_or_add == false){
|
||||||
// $parentDiv.find("label[for='" + fieldId + "'] .text-danger").remove();
|
// $parentDiv.find("label[for='" + fieldId + "'] .text-danger").remove();
|
||||||
// console.log('one', remove_or_add);
|
// // console.log('one', remove_or_add);
|
||||||
// }else{
|
// }else{
|
||||||
// if ($label.length && !$label.find(".text-danger").length) {
|
// if ($label.length && !$label.find(".text-danger").length) {
|
||||||
// $label.append(' <span class="text-danger">*</span>');
|
// $label.append(' <span class="text-danger">*</span>');
|
||||||
@ -509,18 +585,97 @@ $(document).on("input", function (event) {
|
|||||||
if ($parentDiv.length) {
|
if ($parentDiv.length) {
|
||||||
let thirdClass = $parentDiv.attr("class").split(" ")[2] || "";
|
let thirdClass = $parentDiv.attr("class").split(" ")[2] || "";
|
||||||
console.log('thirdClass', thirdClass);
|
console.log('thirdClass', thirdClass);
|
||||||
|
addRequiredFieldSymbolByClass(thirdClass);
|
||||||
|
// addRequiredFieldSymbol(targetId);
|
||||||
if (thirdClass) {
|
if (thirdClass) {
|
||||||
|
// console.log("fields",fields);
|
||||||
claimStatusFieldRemoveREquired(fields, false, thirdClass);
|
claimStatusFieldRemoveREquired(fields, false, thirdClass);
|
||||||
let $label = $(thirdClass).find("label");
|
$(thirdClass).each(function() {
|
||||||
if ($label.length && !$label.find(".text-danger").length) {
|
let $label = $(this).find("label");
|
||||||
$label.append(' <span class="text-danger">*</span>');
|
$label.each(function() {
|
||||||
|
if (!$(this).find(".text-danger").length) {
|
||||||
|
$(this).append(' <span class="text-danger">*</span>');
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
claimStatusFieldRemoveREquired($field, false, '');
|
claimStatusFieldRemoveREquired($field, false, '');
|
||||||
|
console.log("In Else Condition");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function addRequiredFieldSymbol(field_name) {
|
||||||
|
// Find the field with the given name
|
||||||
|
var $field = $(`[name="${field_name}"]`);
|
||||||
|
|
||||||
|
if ($field.length) {
|
||||||
|
// Find the parent div of this field
|
||||||
|
var $parentDiv = $field.closest('div');
|
||||||
|
|
||||||
|
if ($parentDiv.length) {
|
||||||
|
// Get the classes as an array
|
||||||
|
var classes = $parentDiv.attr('class') ? $parentDiv.attr('class').split(/\s+/) : [];
|
||||||
|
|
||||||
|
if (classes.length > 0) {
|
||||||
|
// Get the last class in the array
|
||||||
|
var lastClass = classes[classes.length - 1];
|
||||||
|
|
||||||
|
// Find all divs with this last class
|
||||||
|
var $allDivsWithClass = $(`.${lastClass}`);
|
||||||
|
|
||||||
|
// Add asterisk to all labels within these divs
|
||||||
|
$allDivsWithClass.each(function() {
|
||||||
|
var $label = $(this).find('label');
|
||||||
|
if ($label.length && !$label.find('.text-danger').length) {
|
||||||
|
$label.append(' <span class="text-danger">*</span>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`Added required symbol to ${$allDivsWithClass.length} labels with class "${lastClass}"`);
|
||||||
|
} else {
|
||||||
|
console.warn(`Parent div for field "${field_name}" has no classes`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.warn(`No parent div found for field name="${field_name}"`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.warn(`No field found with name="${field_name}"`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addRequiredFieldSymbolByClass(className) {
|
||||||
|
// Find all divs with the specified class
|
||||||
|
var $divsWithClass = $(`.${className}`);
|
||||||
|
|
||||||
|
if ($divsWithClass.length) {
|
||||||
|
// Add asterisk to all labels within these divs
|
||||||
|
$divsWithClass.each(function() {
|
||||||
|
var $label = $(this).find('label');
|
||||||
|
if ($label.length && !$label.find('.text-danger').length) {
|
||||||
|
$label.append(' <span class="text-danger">*</span>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`Added required symbol to ${$divsWithClass.length} labels with class "${className}"`);
|
||||||
|
} else {
|
||||||
|
console.warn(`No divs found with class="${className}"`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#mode_of_intimation').change(function(){
|
||||||
|
console.log("function called");
|
||||||
|
var mode_of_intimation = $('#mode_of_intimation').val();
|
||||||
|
console.log('mode of ',mode_of_intimation);
|
||||||
|
|
||||||
|
if (mode_of_intimation == 2){
|
||||||
|
$('#pod_no').attr('required', 'required');
|
||||||
|
$('#pod_no_label_1_span').text("*");
|
||||||
|
}else{
|
||||||
|
$('#pod_no').removeAttr('required', false);
|
||||||
|
$('#pod_no_label_1_span').text("");
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -25,92 +25,18 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)"
|
<form role="form" class="parsley-examples" method="post" id="ticket_form_data" onsubmit="submitClaimForm(event, this)"
|
||||||
enctype="multipart/form-data">
|
enctype="multipart/form-data">
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-row">
|
|
||||||
|
|
||||||
<input type="hidden" id="ticket_master_id" name="ticket_master_id" value="<?= isset($ticket_data['id']) ? $ticket_data['id'] : '' ?>">
|
<input type="hidden" id="ticket_master_id" name="ticket_master_id" value="<?= isset($ticket_data['id']) ? $ticket_data['id'] : '' ?>">
|
||||||
<input type="hidden" id="is_head_approved" name="is_head_approved" value="<?= isset($ticket_data['is_head_approved']) ? $ticket_data['is_head_approved'] : '' ?>">
|
<input type="hidden" id="is_head_approved" name="is_head_approved" value="<?= isset($ticket_data['is_head_approved']) ? $ticket_data['is_head_approved'] : '' ?>">
|
||||||
<input type="hidden" id="extra_fields_array_for_validate" name="extra_fields_array_for_validate" value='<?= isset($extra_fields_array_for_validate) && !empty($extra_fields_array_for_validate) ? json_encode($extra_fields_array_for_validate) : "[]" ?>'>
|
<input type="hidden" id="extra_fields_array_for_validate" name="extra_fields_array_for_validate" value='<?= isset($extra_fields_array_for_validate) && !empty($extra_fields_array_for_validate) ? json_encode($extra_fields_array_for_validate) : "[]" ?>'>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group">
|
||||||
<label for="claim_status">Status<span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
|
||||||
<!-- <option value="0">Select status</option> -->
|
|
||||||
<?php
|
|
||||||
if (isset($claim_status) && count($claim_status)) {
|
|
||||||
foreach ($claim_status as $key => $value) {
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['claim_status_id'] == $value['id']) ? 'selected' : '';
|
|
||||||
echo "<option value=" . $value['id'] . " $selected>" . $value['claim_status'] . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<h5>Employee Details</h5>
|
||||||
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
<hr>
|
||||||
<select class="form-control" id="acm_id" name="acm_id">
|
|
||||||
<!-- <option value="0">Select Account Manager</option> -->
|
|
||||||
<?php
|
|
||||||
if (isset($acms) && count($acms)) {
|
|
||||||
foreach ($acms as $key => $value) {
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['acm_id'] == $value['id']) ? 'selected' : '';
|
|
||||||
echo "<option value=" . $value['id'] . " $selected>" . $value['first_name'] . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<!-- first_data_points -->
|
||||||
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
<div class="form-row">
|
||||||
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
|
||||||
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
|
||||||
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
|
||||||
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
|
||||||
<input type="text" class="form-control" id="policy_no"
|
|
||||||
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
|
||||||
name="policy_no">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="ticket_type_id"> Policy Type <span class="text-danger"></span></label>
|
|
||||||
<select class="form-control readonly-select" id="ticket_type_id" name="ticket_type_id" readonly>
|
|
||||||
<?php
|
|
||||||
if (isset($ticket_type) && count($ticket_type)) {
|
|
||||||
foreach ($ticket_type as $key => $value) {
|
|
||||||
if($key != 1){
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['ticket_type_id'] == $key) ? 'selected' : ((isset($selected_ticket_type) && $selected_ticket_type == $key) ? 'selected' : '');
|
|
||||||
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
|
|
||||||
<select class="form-control" id="claim_type" name="claim_type">
|
|
||||||
<!-- <option value="0">Select claim Type</option> -->
|
|
||||||
<?php
|
|
||||||
if (isset($claim_type) && count($claim_type)) {
|
|
||||||
foreach ($claim_type as $key => $value) {
|
|
||||||
$selected = (isset($ticket_data) && $ticket_data['claim_type'] == $key) ? 'selected' : '';
|
|
||||||
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="emp_code">Employee ID <i class="fa fa-search text-danger"
|
<label for="emp_code">Employee ID <i class="fa fa-search text-danger"
|
||||||
@ -120,7 +46,6 @@
|
|||||||
name="emp_code">
|
name="emp_code">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
|
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
|
||||||
<input type=hidden id="emp_id" name="emp_id" value="<?= isset($ticket_data['emp_id']) ? $ticket_data['emp_id'] : '' ?>">
|
<input type=hidden id="emp_id" name="emp_id" value="<?= isset($ticket_data['emp_id']) ? $ticket_data['emp_id'] : '' ?>">
|
||||||
@ -143,6 +68,94 @@
|
|||||||
name="emp_mail">
|
name="emp_mail">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="policy_no">Policy No<span class="text-danger"></span></label>
|
||||||
|
<input type="text" class="form-control" id="policy_no"
|
||||||
|
value="<?= isset($ticket_data['policy_no']) ? $ticket_data['policy_no'] : '' ?>"
|
||||||
|
name="policy_no">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
|
||||||
|
<input type="hidden" id="client_id" name="client_id" value="<?= isset($ticket_data['client_id']) ? $ticket_data['client_id'] : '' ?>">
|
||||||
|
<input type="text" class="form-control" id="client_name" placeholder="Client" value="<?= isset($ticket_data['client_name']) ? $ticket_data['client_name'] : '' ?>" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="insurer_id">Insurer<span class="text-danger"></span></label>
|
||||||
|
<input type=hidden id="insurer_id" name="insurer_id" value="<?= isset($ticket_data['insurer_id']) ? $ticket_data['insurer_id'] : '' ?>">
|
||||||
|
<input type=text class="form-control" id="insurer_name" placeholder="Insurer" value="<?= isset($ticket_data['insurer_name']) ? $ticket_data['insurer_name'] : '' ?>" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
|
||||||
|
<select class="form-control" id="acm_id" name="acm_id">
|
||||||
|
<!-- <option value="0">Select Account Manager</option> -->
|
||||||
|
<?php
|
||||||
|
if (isset($acms) && count($acms)) {
|
||||||
|
foreach ($acms as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['acm_id'] == $value['id']) ? 'selected' : '';
|
||||||
|
echo "<option value=" . $value['id'] . " $selected>" . $value['first_name'] . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end first_data_points -->
|
||||||
|
|
||||||
|
<h5>Claim Details</h5>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- second_data_points -->
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="ticket_type_id"> Policy Type <span class="text-danger"></span></label>
|
||||||
|
<select class="form-control readonly-select" id="ticket_type_id" name="ticket_type_id" readonly>
|
||||||
|
<?php
|
||||||
|
if (isset($ticket_type) && count($ticket_type)) {
|
||||||
|
foreach ($ticket_type as $key => $value) {
|
||||||
|
if($key != 1){
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['ticket_type_id'] == $key) ? 'selected' : ((isset($selected_ticket_type) && $selected_ticket_type == $key) ? 'selected' : '');
|
||||||
|
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="claim_status">Status<span class="text-danger"></span></label>
|
||||||
|
<select class="form-control" id="claim_status_id" name="claim_status_id">
|
||||||
|
<!-- <option value="0">Select status</option> -->
|
||||||
|
<?php
|
||||||
|
if (isset($claim_status) && count($claim_status)) {
|
||||||
|
foreach ($claim_status as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['claim_status_id'] == $value['id']) ? 'selected' : '';
|
||||||
|
echo "<option value=" . $value['id'] . " $selected>" . $value['claim_status'] . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
|
||||||
|
<select class="form-control" id="claim_type" name="claim_type">
|
||||||
|
<!-- <option value="0">Select claim Type</option> -->
|
||||||
|
<?php
|
||||||
|
if (isset($claim_type) && count($claim_type)) {
|
||||||
|
foreach ($claim_type as $key => $value) {
|
||||||
|
$selected = (isset($ticket_data) && $ticket_data['claim_type'] == $key) ? 'selected' : '';
|
||||||
|
echo "<option value='" . $key . "' $selected>" . $value . "</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="date_of_join">Date of joining<span class="text-danger"></span></label>
|
<label for="date_of_join">Date of joining<span class="text-danger"></span></label>
|
||||||
@ -196,6 +209,14 @@
|
|||||||
value="<?= isset($ticket_data['si_amt']) ? $ticket_data['si_amt'] : '' ?>"
|
value="<?= isset($ticket_data['si_amt']) ? $ticket_data['si_amt'] : '' ?>"
|
||||||
name="si_amt">
|
name="si_amt">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end second_data_points -->
|
||||||
|
|
||||||
|
<h5>Additional Details</h5>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- third_data_points -->
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-3 approved" style="display: none;">
|
<div class="form-group col-md-3 approved" style="display: none;">
|
||||||
<label for="approved_amount">Approved Amount</label>
|
<label for="approved_amount">Approved Amount</label>
|
||||||
@ -233,16 +254,15 @@
|
|||||||
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
value="<?= isset($ticket_data['settle_letter']) ? $ticket_data['settle_letter'] : '' ?>" name="settle_letter">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3 returned" style="display: none;">
|
|
||||||
<label for="return_remark">Return Remark</label>
|
|
||||||
<textarea class="form-control" id="return_remark" placeholder="Enter Return Remark" name="return_remark"><?= isset($ticket_data['return_remark']) ? $ticket_data['return_remark'] : '' ?></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3 canceled" style="display: none;">
|
<div class="form-group col-md-3 canceled" style="display: none;">
|
||||||
<label for="cancel_remark">Cancel Remark</label>
|
<label for="cancel_remark">Cancel Remark</label>
|
||||||
<textarea class="form-control" id="cancel_remark" placeholder="Enter Cancel Remark" name="cancel_remark"><?= isset($ticket_data['cancel_remark']) ? $ticket_data['cancel_remark'] : '' ?></textarea>
|
<textarea class="form-control" id="cancel_remark" rows="1" placeholder="Enter Cancel Remark" name="cancel_remark"><?= isset($ticket_data['cancel_remark']) ? $ticket_data['cancel_remark'] : '' ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-3 returned" style="display: none;">
|
||||||
|
<label for="return_remark">Return Remark</label>
|
||||||
|
<textarea class="form-control" id="return_remark" rows="1" placeholder="Enter Return Remark" name="return_remark"><?= isset($ticket_data['return_remark']) ? $ticket_data['return_remark'] : '' ?></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-6 returned" style="display: none;">
|
<div class="form-group col-md-6 returned" style="display: none;">
|
||||||
<label for="awb_no_courier_name">AWB No with Courier Name</label>
|
<label for="awb_no_courier_name">AWB No with Courier Name</label>
|
||||||
@ -250,7 +270,10 @@
|
|||||||
value="<?= isset($ticket_data['awb_no_courier_name']) ? $ticket_data['awb_no_courier_name'] : '' ?>" name="awb_no_courier_name">
|
value="<?= isset($ticket_data['awb_no_courier_name']) ? $ticket_data['awb_no_courier_name'] : '' ?>" name="awb_no_courier_name">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- end third_data_points -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
|
||||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
|
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
|
||||||
@ -342,7 +365,7 @@ function claimStatusFieldChanges(fields) {
|
|||||||
var $field = $("#" + fieldId);
|
var $field = $("#" + fieldId);
|
||||||
|
|
||||||
if ($field.length) {
|
if ($field.length) {
|
||||||
$field.prop('required', true);
|
// $field.prop('required', true);
|
||||||
|
|
||||||
var $parentDiv = $field.closest("div");
|
var $parentDiv = $field.closest("div");
|
||||||
$parentDiv.show();
|
$parentDiv.show();
|
||||||
@ -399,9 +422,10 @@ console.log('fields', fields);
|
|||||||
console.log('$field id', $field);
|
console.log('$field id', $field);
|
||||||
let $parentDiv = $field.closest("div");
|
let $parentDiv = $field.closest("div");
|
||||||
console.log('$parentDiv', $parentDiv);
|
console.log('$parentDiv', $parentDiv);
|
||||||
|
// addRequiredFieldSymbol(targetId);
|
||||||
if ($parentDiv.length) {
|
if ($parentDiv.length) {
|
||||||
let thirdClass = $parentDiv.attr("class").split(" ")[2] || "";
|
let thirdClass = $parentDiv.attr("class").split(" ")[2] || "";
|
||||||
|
addRequiredFieldSymbolByClass(thirdClass);
|
||||||
console.log('thirdClass', thirdClass);
|
console.log('thirdClass', thirdClass);
|
||||||
|
|
||||||
if (thirdClass) {
|
if (thirdClass) {
|
||||||
@ -416,5 +440,61 @@ console.log('fields', fields);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// function addRequiredFieldSymbol(field_name) {
|
||||||
|
// // Find the field with the given name
|
||||||
|
// var $field = $(`[name="${field_name}"]`);
|
||||||
|
|
||||||
|
// if ($field.length) {
|
||||||
|
// // Find the parent div of this field
|
||||||
|
// var $parentDiv = $field.closest('div');
|
||||||
|
|
||||||
|
// if ($parentDiv.length) {
|
||||||
|
// // Get the classes as an array
|
||||||
|
// var classes = $parentDiv.attr('class') ? $parentDiv.attr('class').split(/\s+/) : [];
|
||||||
|
|
||||||
|
// if (classes.length > 0) {
|
||||||
|
// // Get the last class in the array
|
||||||
|
// var lastClass = classes[classes.length - 1];
|
||||||
|
|
||||||
|
// // Find all divs with this last class
|
||||||
|
// var $allDivsWithClass = $(`.${lastClass}`);
|
||||||
|
|
||||||
|
// // Add asterisk to all labels within these divs
|
||||||
|
// $allDivsWithClass.each(function() {
|
||||||
|
// var $label = $(this).find('label');
|
||||||
|
// if ($label.length && !$label.find('.text-danger').length) {
|
||||||
|
// $label.append(' <span class="text-danger">*</span>');
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// console.log(`Added required symbol to ${$allDivsWithClass.length} labels with class "${lastClass}"`);
|
||||||
|
// } else {
|
||||||
|
// console.warn(`Parent div for field "${field_name}" has no classes`);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// console.warn(`No parent div found for field name="${field_name}"`);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// console.warn(`No field found with name="${field_name}"`);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
function addRequiredFieldSymbolByClass(className) {
|
||||||
|
// Find all divs with the specified class
|
||||||
|
var $divsWithClass = $(`.${className}`);
|
||||||
|
|
||||||
|
if ($divsWithClass.length) {
|
||||||
|
// Add asterisk to all labels within these divs
|
||||||
|
$divsWithClass.each(function() {
|
||||||
|
var $label = $(this).find('label');
|
||||||
|
if ($label.length && !$label.find('.text-danger').length) {
|
||||||
|
$label.append(' <span class="text-danger">*</span>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`Added required symbol to ${$divsWithClass.length} labels with class "${className}"`);
|
||||||
|
} else {
|
||||||
|
console.warn(`No divs found with class="${className}"`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -76,48 +76,37 @@ if(!isset($view_ticket_page)){
|
|||||||
<div id="mobileSearch" class="search-method">
|
<div id="mobileSearch" class="search-method">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-5" style="display:true;">
|
<div class="col-md-3" style="display:true;">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Employee Data Points</label>
|
<label>Employee Data Points</label>
|
||||||
<select name="employee_data_points" id="employee_data_points"
|
<select name="employee_data_points" id="employee_data_points"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
<option value="mobile">Employee Mobile Number</option>
|
<option value="mobile">Mobile Number</option>
|
||||||
<option value="emp_code">Employee ID</option>
|
<option value="emp_code">Employee ID</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label id="employee_data_points_label">Employee Mobile Number</label>
|
<label>Client</label>
|
||||||
|
<select id="mobile_emp_client_data_list" name="client"
|
||||||
|
class="form-control custom-select">
|
||||||
|
<option value="0">Select Client</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label id="employee_data_points_label">Mobile Number</label>
|
||||||
<input class="form-control" type="text" id="emp_mobile_number_for_claim"
|
<input class="form-control" type="text" id="emp_mobile_number_for_claim"
|
||||||
name="mobile_numbers" onkeypress="return onlyNumbers(event)"
|
name="mobile_numbers" onkeypress="return onlyNumbers(event)"
|
||||||
maxlength="10">
|
maxlength="10">
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger" id="error_dis"></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="form-group" style="margin-top: 9px;">
|
|
||||||
<br>
|
|
||||||
<button class="btn btn-primary"
|
|
||||||
onclick="getTheEmpDataForClaimSearchByMobile(this)">Search</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="emp_member_policy_div" style="display:true;">
|
<div class="col-md-6">
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-5" style="display:none;">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Employee</label>
|
|
||||||
<select name="employee_by_number" id="employee_by_number"
|
|
||||||
class="form-control SelExample">
|
|
||||||
<option value="0">Select Employee</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Insured List</label>
|
<label>Insured List</label>
|
||||||
<select name="employee_by_number" id="member_by_number"
|
<select name="employee_by_number" id="member_by_number"
|
||||||
@ -126,6 +115,18 @@ if(!isset($view_ticket_page)){
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="form-group" style="margin-top: 9px; float:right;">
|
||||||
|
<br>
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
onclick="getTheEmpDataForClaimSearchByMobile(this)">Search</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -296,6 +297,7 @@ function getClientAndBranchAndPolicy() {
|
|||||||
branch_list = res.branch_data;
|
branch_list = res.branch_data;
|
||||||
policy_list = res.policy_data;
|
policy_list = res.policy_data;
|
||||||
appendClients(res.client_data);
|
appendClients(res.client_data);
|
||||||
|
appendClientsForMobileSearch(res.client_data);
|
||||||
} else {
|
} else {
|
||||||
console.log('No data found');
|
console.log('No data found');
|
||||||
}
|
}
|
||||||
@ -329,6 +331,26 @@ function appendClients(data) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//append the clients data for mobile search to the modal
|
||||||
|
function appendClientsForMobileSearch(data) {
|
||||||
|
$('#mobile_emp_client_data_list').empty();
|
||||||
|
|
||||||
|
$('#mobile_emp_client_data_list').append($('<option>', {
|
||||||
|
value: '0',
|
||||||
|
text: 'Select Client'
|
||||||
|
}));
|
||||||
|
|
||||||
|
$.each(data, function(index, item) {
|
||||||
|
var option = $('<option>', {
|
||||||
|
value: item.id,
|
||||||
|
text: item.short_name,
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#mobile_emp_client_data_list').append(option).select2();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//append the clients branch data to the modal
|
//append the clients branch data to the modal
|
||||||
function appendBranch(data) {
|
function appendBranch(data) {
|
||||||
$('#emp_client_branch_data_list').empty();
|
$('#emp_client_branch_data_list').empty();
|
||||||
@ -365,7 +387,8 @@ function appendPolicy(data) {
|
|||||||
|
|
||||||
if (ticket_type == 1) {
|
if (ticket_type == 1) {
|
||||||
|
|
||||||
if(item.policy_type_id == 2 || item.policy_type_id == 3 || item.policy_type_id == 4 ||item.policy_type_id == 5) {
|
if (item.policy_type_id == 2 || item.policy_type_id == 3 || item.policy_type_id == 4 || item
|
||||||
|
.policy_type_id == 5) {
|
||||||
var option = $('<option>', {
|
var option = $('<option>', {
|
||||||
value: item.id,
|
value: item.id,
|
||||||
text: item.policy_type + '-' + item.policy_no,
|
text: item.policy_type + '-' + item.policy_no,
|
||||||
@ -512,17 +535,23 @@ function getTheEmpDataForClaimSearchByMobile(input, searchType = null) {
|
|||||||
console.log(input)
|
console.log(input)
|
||||||
let type = $('#employee_data_points').val()
|
let type = $('#employee_data_points').val()
|
||||||
let param = $('#emp_mobile_number_for_claim').val()
|
let param = $('#emp_mobile_number_for_claim').val()
|
||||||
|
let client_policy_id = $('#emp_client_policy_data_list').val()
|
||||||
|
let client_id = $('#mobile_emp_client_data_list').val()
|
||||||
|
|
||||||
if (searchType == 'client') {
|
if (searchType == 'client') {
|
||||||
type = 'emp_code';
|
type = 'emp_code';
|
||||||
param = $(input).val();
|
param = $(input).val();
|
||||||
|
client_id = $('#emp_client_data_list').val()
|
||||||
}
|
}
|
||||||
let url = '<?= base_url('util/getTheEmpDataForClaimSearchByMobile/') ?>' + param + '/' + type;
|
let url = '<?= base_url('util/getTheEmpDataForClaimSearchByMobile/') ?>' + param + '/' + type + '/' +
|
||||||
|
client_policy_id + '/' + client_id;
|
||||||
|
|
||||||
// Data to send in the AJAX request
|
// Data to send in the AJAX request
|
||||||
let requestData = {
|
let requestData = {
|
||||||
param: param,
|
param: param,
|
||||||
type: type,
|
type: type,
|
||||||
|
client_policy_id: client_policy_id,
|
||||||
|
client_id: client_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Show loader
|
// Show loader
|
||||||
@ -534,7 +563,7 @@ function getTheEmpDataForClaimSearchByMobile(input, searchType = null) {
|
|||||||
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
sendAjaxRequestForGlobal(url, 'GET', requestData, function(response) {
|
||||||
console.log('Data fetched successfully:', response);
|
console.log('Data fetched successfully:', response);
|
||||||
|
|
||||||
if (response.status) {
|
if (response.status == true) {
|
||||||
console.log(response.message, 'SUCCESS');
|
console.log(response.message, 'SUCCESS');
|
||||||
if (searchType == 'client') {
|
if (searchType == 'client') {
|
||||||
appendMember(response.memberData, 'search_by_client_member');
|
appendMember(response.memberData, 'search_by_client_member');
|
||||||
@ -714,20 +743,43 @@ function setMemberData(input) {
|
|||||||
|
|
||||||
if (tpaNo == "") {
|
if (tpaNo == "") {
|
||||||
$('#claim_status_id').val(1)
|
$('#claim_status_id').val(1)
|
||||||
|
$('#non_id_reason').attr('required', true);
|
||||||
|
var $label = $("label[for='non_id_reason']");
|
||||||
|
if ($label.length && !$label.find('.text-danger').length) {
|
||||||
|
$label.append(' <span class="text-danger">*</span>');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$('#claim_status_id').val(2)
|
$('#claim_status_id').val(2)
|
||||||
|
$('#non_id_reason').attr('required', false);
|
||||||
|
var $label = $("label[for='non_id_reason']");
|
||||||
|
$label.text("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $('#employee_data_points').on('change', function() {
|
||||||
|
|
||||||
|
// let value = $(this).val()
|
||||||
|
// if (value == "mobile") {
|
||||||
|
// $('#employee_data_points_label').text('Employee Mobile Number')
|
||||||
|
// } else {
|
||||||
|
// $('#employee_data_points_label').text('Employee ID')
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
$('#employee_data_points').on('change', function() {
|
$('#employee_data_points').on('change', function() {
|
||||||
|
let value = $(this).val();
|
||||||
|
let $label = $('#employee_data_points_label');
|
||||||
|
let $input = $('#emp_mobile_number_for_claim');
|
||||||
|
|
||||||
let value = $(this).val()
|
|
||||||
if (value == "mobile") {
|
if (value == "mobile") {
|
||||||
$('#employee_data_points_label').text('Employee Mobile Number')
|
$label.text('Employee Mobile Number');
|
||||||
|
$input.attr('onkeypress', 'return onlyNumbers(event)').attr('maxlength', '10');
|
||||||
} else {
|
} else {
|
||||||
$('#employee_data_points_label').text('Employee ID')
|
$label.text('Employee ID');
|
||||||
|
$input.removeAttr('onkeypress maxlength');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
function toResetTheModelFields() {
|
function toResetTheModelFields() {
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<table id="scroll-horizontal-datatable" class="table w-100">
|
<table id="scroll-horizontal-datatable" class="table w-100">
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Field</th>
|
<th>Label</th>
|
||||||
<!-- <th>Old Value</th>
|
<!-- <th>Old Value</th>
|
||||||
<th>New Value</th> -->
|
<th>New Value</th> -->
|
||||||
<th>Change</th>
|
<th>Change</th>
|
||||||
|
|||||||
@ -74,11 +74,11 @@ table.dataTable tbody td {
|
|||||||
title=" <?php
|
title=" <?php
|
||||||
if ($row['claim_status_id'] == 8) {
|
if ($row['claim_status_id'] == 8) {
|
||||||
if ($row['is_head_approved'] == 0) {
|
if ($row['is_head_approved'] == 0) {
|
||||||
echo 'Waiting For Head Approvel';
|
echo 'Waiting for approvel';
|
||||||
} elseif ($row['is_head_approved'] == 1) {
|
} elseif ($row['is_head_approved'] == 1) {
|
||||||
echo 'Head Approved';
|
echo 'Rejection approved';
|
||||||
} elseif ($row['is_head_approved'] == 2) {
|
} elseif ($row['is_head_approved'] == 2) {
|
||||||
echo 'Head Rejected';
|
echo 'Rejection not approved';
|
||||||
} else {
|
} else {
|
||||||
echo $row['status'];
|
echo $row['status'];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,16 @@ table.dataTable tbody td {
|
|||||||
<?php if (isset($ticket_data)) { ?>
|
<?php if (isset($ticket_data)) { ?>
|
||||||
<?php foreach ($ticket_data as $index => $row) { ?>
|
<?php foreach ($ticket_data as $index => $row) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $row['template_name'] ?? ""; ?></td>
|
<td> <?php echo $row['template_name'] ?? ""; ?>
|
||||||
|
<i class="fe-alert-circle"
|
||||||
|
style="color: #000;"
|
||||||
|
aria-hidden="true"
|
||||||
|
data-toggle="tooltip"
|
||||||
|
data-placement="top"
|
||||||
|
title="<?php echo "Status : ". ($row['tool_tip'] ?? ''); ?>"></i>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
<td><?php echo $ticket_type[$row['ticket_type']] ?? ""; ?></td>
|
<td><?php echo $ticket_type[$row['ticket_type']] ?? ""; ?></td>
|
||||||
<td><?php echo $trigger_type[$row['trigger_type']] ?? ""; ?></td>
|
<td><?php echo $trigger_type[$row['trigger_type']] ?? ""; ?></td>
|
||||||
<td><?= $row['is_auto_mail'] == 1 ? 'Auto' : "Manual" ?></td>
|
<td><?= $row['is_auto_mail'] == 1 ? 'Auto' : "Manual" ?></td>
|
||||||
@ -171,6 +180,12 @@ table.dataTable tbody td {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label for="claim_status_for_template">Claim Status</label>
|
||||||
|
<input type="text" readonly id="claim_status_for_template" class="form-control" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -192,11 +207,14 @@ table.dataTable tbody td {
|
|||||||
style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
|
||||||
<option value="">PlaceHolders</option>
|
<option value="">PlaceHolders</option>
|
||||||
<?php foreach ($placeHolders as $key => $value): ?>
|
<?php foreach ($placeHolders as $key => $value): ?>
|
||||||
<?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile
|
<?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){
|
||||||
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
|
?>member_mobile
|
||||||
|
<?php $valueChange = str_replace('_', ' ', $value);
|
||||||
|
$valueChange = ucwords($valueChange); ?>
|
||||||
<option value="<?php echo $key; ?>"><?php echo $valueChange; ?></option>
|
<option value="<?php echo $key; ?>"><?php echo $valueChange; ?></option>
|
||||||
</option>
|
</option>
|
||||||
<?php //} ?>
|
<?php //}
|
||||||
|
?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -216,7 +234,11 @@ table.dataTable tbody td {
|
|||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
<!-------------------------------------------------------------------------------------------------->
|
<!-------------------------------------------------------------------------------------------------->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<script>
|
<script>
|
||||||
// Datatable document ready
|
// Datatable document ready
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@ -481,6 +503,7 @@ function getMailTemplateData(id) {
|
|||||||
$('#primaryKey').val(res.data.id);
|
$('#primaryKey').val(res.data.id);
|
||||||
$('#policy_type').val(res.data.ticket_type).change();
|
$('#policy_type').val(res.data.ticket_type).change();
|
||||||
$('#trigger_type').val(res.data.trigger_type).change();
|
$('#trigger_type').val(res.data.trigger_type).change();
|
||||||
|
$('#claim_status_for_template').val(res.data.tool_tip);
|
||||||
$('.jodit-wysiwyg').html(res.data.mail_content);
|
$('.jodit-wysiwyg').html(res.data.mail_content);
|
||||||
|
|
||||||
// Set the auto mail switch
|
// Set the auto mail switch
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" onclick="submitToRedirectTicketNewUrl(this)">submit</button>
|
<button type="button" class="btn btn-primary" onclick="submitToRedirectTicketNewUrl(this)">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user