MERGE_CODE_MERGE : RV

This commit is contained in:
VENKATESHWARAN 2025-09-09 15:52:15 +05:30
commit e0651486ed
13 changed files with 2046 additions and 1487 deletions

View File

@ -87,6 +87,8 @@ class NotificationController extends AdminController
'client_hr_summary_mail_btn' 'client_hr_summary_mail_btn'
]; ];
$data = []; $data = [];
$emptyTemplate = [];
$updatedTemplate = [];
foreach ($checkboxNames as $checkboxName) foreach ($checkboxNames as $checkboxName)
{ {
@ -111,9 +113,31 @@ class NotificationController extends AdminController
$id = $find['id']; $id = $find['id'];
$changeData['enabled']= $value; $changeData['enabled']= $value;
$update = $notificationModel->update($id, $changeData); $update = $notificationModel->update($id, $changeData);
$updatedTemplate [] = $key;
}
if(!$find && $value == 1){
$emptyTemplate [] = $key;
} }
} }
return json_encode("true");
if(count($emptyTemplate) > 0){
return $this->response->setJSON([
'status' => false,
'code' => 400,
'message' => 'Notification settings updation Failed.',
'updated_templates' => $updatedTemplate,
'empty_templates' => $emptyTemplate
]);
}
return $this->response->setJSON([
'status' => true,
'code' => 200,
'message' => 'Notification settings updated successfully.',
'updated_templates' => $updatedTemplate,
'empty_templates' => $emptyTemplate
]);
} }
// This for Load the Template Data for in View Page // This for Load the Template Data for in View Page

View File

@ -15,6 +15,7 @@ use App\Models\UserModel;
use App\Models\ClientPolicyModel; use App\Models\ClientPolicyModel;
use App\Models\ClientModel; use App\Models\ClientModel;
use App\Models\TicketMailTemplateModel; use App\Models\TicketMailTemplateModel;
use App\Models\ClientRMModel;
class ThzController extends BaseController class ThzController extends BaseController
@ -31,6 +32,8 @@ class ThzController extends BaseController
protected $clientModel; protected $clientModel;
protected $ticketMailTemplateModel; protected $ticketMailTemplateModel;
protected $cientRmModel;
protected $myLogger; protected $myLogger;
public function __construct() public function __construct()
@ -43,6 +46,7 @@ class ThzController extends BaseController
$this->userModel = new UserModel(); $this->userModel = new UserModel();
$this->clientPolicyModel = new ClientPolicyModel(); $this->clientPolicyModel = new ClientPolicyModel();
$this->clientModel = new ClientModel(); $this->clientModel = new ClientModel();
$this->cientRmModel = new ClientRMModel();
$this->ticketMailTemplateModel = new TicketMailTemplateModel(); $this->ticketMailTemplateModel = new TicketMailTemplateModel();
$this->myLogger = \Config\Services::mylogger(); $this->myLogger = \Config\Services::mylogger();
} }
@ -52,9 +56,9 @@ class ThzController extends BaseController
// //
} }
public function ticketSave(){ public function ticketSave()
try
{ {
try {
$data = $this->request->getPost(); $data = $this->request->getPost();
$references = ""; $references = "";
if (!empty($data['thz_id'])) { if (!empty($data['thz_id'])) {
@ -90,14 +94,12 @@ class ThzController extends BaseController
} }
$updateID = $data['thz_id']; $updateID = $data['thz_id'];
} else { } else {
$text = "create"; $text = "create";
$insertID = $this->insertTicket($data); $insertID = $this->insertTicket($data);
$result = true; $result = true;
$references = ""; $references = "";
} }
$id = isset($insertID) && !empty($insertID) ? $insertID : $updateID; $id = isset($insertID) && !empty($insertID) ? $insertID : $updateID;
@ -121,7 +123,9 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
@ -164,8 +168,7 @@ class ThzController extends BaseController
'status' => 'success', 'status' => 'success',
'data' => $tickets, 'data' => $tickets,
])->setStatusCode(200); ])->setStatusCode(200);
} } catch (\Throwable $e) {
catch (\Throwable $e) {
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500; $code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException $isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
@ -176,13 +179,16 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
} }
public function ticketConversationSave(){ public function ticketConversationSave()
{
try { try {
$data = $this->request->getPost(); $data = $this->request->getPost();
@ -209,8 +215,7 @@ class ThzController extends BaseController
'message' => $result ? "Ticket Notes created successfully" : "Unable to create ticket notes. Please try again.", 'message' => $result ? "Ticket Notes created successfully" : "Unable to create ticket notes. Please try again.",
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed Or No Need..!!' 'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed Or No Need..!!'
])->setStatusCode($result ? 200 : 400); ])->setStatusCode($result ? 200 : 400);
} } catch (\Throwable $e) {
catch (\Throwable $e) {
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500; $code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException $isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
@ -221,7 +226,9 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
@ -254,9 +261,7 @@ class ThzController extends BaseController
} }
return $this->response->setJSON(['status' => 'success', 'data' => $result])->setStatusCode(200); return $this->response->setJSON(['status' => 'success', 'data' => $result])->setStatusCode(200);
} catch (\Throwable $e) {
}
catch (\Throwable $e) {
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500; $code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException $isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
@ -267,7 +272,9 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
@ -316,7 +323,9 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
@ -346,7 +355,6 @@ class ThzController extends BaseController
$result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll(); $result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
return $this->loadLayout('thz_notes', $result); return $this->loadLayout('thz_notes', $result);
} }
} }
@ -384,8 +392,7 @@ class ThzController extends BaseController
])->setStatusCode($id ? 200 : 400); ])->setStatusCode($id ? 200 : 400);
} }
return $this->response->setJSON(['status' => 'error', 'message' => 'Invalid request method'])->setStatusCode(405); return $this->response->setJSON(['status' => 'error', 'message' => 'Invalid request method'])->setStatusCode(405);
} } catch (\Throwable $e) {
catch (\Throwable $e) {
$code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500; $code = ($e->getCode() && $e->getCode() >= 100 && $e->getCode() < 600) ? $e->getCode() : 500;
$isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException $isDbError = $e instanceof \CodeIgniter\Database\Exceptions\DatabaseException
@ -396,7 +403,9 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
@ -404,8 +413,7 @@ class ThzController extends BaseController
public function ticketHistoryList() public function ticketHistoryList()
{ {
try try {
{
$data = $this->request->getGet(); $data = $this->request->getGet();
$thz_id = $data['thz_id']; $thz_id = $data['thz_id'];
// $details = $this->thzHistoryModal->whereIn('thz_id', $thz_id)->where('is_active', 1)->get()->getResultArray(); // $details = $this->thzHistoryModal->whereIn('thz_id', $thz_id)->where('is_active', 1)->get()->getResultArray();
@ -435,7 +443,9 @@ class ThzController extends BaseController
$this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0); $this->myLogger->logme('error', "Exception: {message} in {file} on line {line}", $context, 0);
return $this->response->setJSON([ 'status' => 'error', 'message' => $isDbError ? 'Data Access Error' : $e->getMessage(), return $this->response->setJSON([
'status' => 'error',
'message' => $isDbError ? 'Data Access Error' : $e->getMessage(),
'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine() 'ref' => $isDbError ? 'database - ' : 'application - ' . $code . ' - ' . $e->getLine()
])->setStatusCode($code); ])->setStatusCode($code);
} }
@ -483,7 +493,8 @@ class ThzController extends BaseController
private function ticketSaveNotification( $data , $insertOrUpdate , $id){ private function ticketSaveNotification($data, $insertOrUpdate, $id)
{
$user_email = $data['email'] ?? null; $user_email = $data['email'] ?? null;
@ -491,6 +502,8 @@ class ThzController extends BaseController
$assignee_email = $this->findAssigneeEmail($assignee_id); $assignee_email = $this->findAssigneeEmail($assignee_id);
$client_id = $data['client_id'] ?? null;
$emailToNotified = [ $emailToNotified = [
'user_email' => $user_email, 'user_email' => $user_email,
'assignee_email' => $assignee_email 'assignee_email' => $assignee_email
@ -498,13 +511,13 @@ class ThzController extends BaseController
$ticketId = $id; $ticketId = $id;
$result = $this->ticketSaveEmailNotificationBasedOnRole($emailToNotified , $insertOrUpdate , $ticketId , $data); $result = $this->ticketSaveEmailNotificationBasedOnRole($emailToNotified, $insertOrUpdate, $ticketId, $data, $client_id);
return $result; return $result;
} }
private function ticketConversationSaveNotification($data){ private function ticketConversationSaveNotification($data)
{
$thz_id = $data['thz_id']; // thz is alias of ticket $thz_id = $data['thz_id']; // thz is alias of ticket
@ -530,37 +543,40 @@ class ThzController extends BaseController
$this->sendEmail($templateName, $data, $to_email, $ticketId, $message); $this->sendEmail($templateName, $data, $to_email, $ticketId, $message);
return true; return true;
} }
private function findAssigneeEmail($assignee_id){ private function findAssigneeEmail($assignee_id)
{
$row = $this->userModel->where('id', $assignee_id)->get()->getRow(); $row = $this->userModel->where('id', $assignee_id)->get()->getRow();
$assigneeEmail = $row ? $row->email : null; $assigneeEmail = $row ? $row->email : null;
return $assigneeEmail ? $assigneeEmail : ""; return $assigneeEmail ? $assigneeEmail : "";
} }
private function findAssigneeId($ticketId){ private function findAssigneeId($ticketId)
{
$row = $this->thzMasterModel->where('thz_id', $ticketId)->get()->getRow(); $row = $this->thzMasterModel->where('thz_id', $ticketId)->get()->getRow();
$assigneeId = $row ? $row->assign_to : null; $assigneeId = $row ? $row->assign_to : null;
return $assigneeId ? $assigneeId : 0; return $assigneeId ? $assigneeId : 0;
} }
private function findUserEmail($ticket_id){ private function findUserEmail($ticket_id)
{
$row = $this->thzMasterModel->where('thz_id', $ticket_id)->get()->getRow(); $row = $this->thzMasterModel->where('thz_id', $ticket_id)->get()->getRow();
$email = $row ? $row->email : null; $email = $row ? $row->email : null;
return $email ? $email : " "; return $email ? $email : " ";
} }
private function findSubject($ticketId){ private function findSubject($ticketId)
{
$row = $this->thzMasterModel->where('thz_id', $ticketId)->get()->getRow(); $row = $this->thzMasterModel->where('thz_id', $ticketId)->get()->getRow();
$subject = $row ? $row->subject : null; $subject = $row ? $row->subject : null;
return $subject ? $subject : " "; return $subject ? $subject : " ";
} }
private function ticketSaveEmailNotificationBasedOnRole($emailToNotified , $insertOrUpdate , $ticketId , $data){ private function ticketSaveEmailNotificationBasedOnRole($emailToNotified, $insertOrUpdate, $ticketId, $data, $client_id)
{
$user_email = $emailToNotified['user_email'] ?? null; $user_email = $emailToNotified['user_email'] ?? null;
$assignee_email = $emailToNotified['assignee_email'] ?? null; $assignee_email = $emailToNotified['assignee_email'] ?? null;
@ -586,7 +602,6 @@ class ThzController extends BaseController
# code... # code...
break; break;
} }
} }
if (!empty($user_email)) { if (!empty($user_email)) {
@ -595,23 +610,34 @@ class ThzController extends BaseController
case 'update': case 'update':
if(empty($assignee_email)){ $data['assigneeAndStatus'] = empty($assignee_email)
$data['assigneeAndStatus'] = "Not Yet Assigned"; ? "Not Yet Assigned"
: "Assigned With {$assignee_email}";
$this->sendEmail('ticket_save_update_user', $data, $user_email, $ticketId); $this->sendEmail('ticket_save_update_user', $data, $user_email, $ticketId);
}else{
$data['assigneeAndStatus'] = "Assigned With {$assignee_email}";
$this->sendEmail( 'ticket_save_update_user', $data ,$user_email , $ticketId ) ;
}
break; break;
case 'create': case 'create':
if(empty($assignee_email)){ $account_manager_email = $this->cientRmModel->findAccountManagerEmail($client_id);
$this->sendEmail( 'ticket_save_create_user_unassigned', $data ,$user_email , $ticketId ) ;
}else{ $cc = getenv(' G_ticketing_system_cc');
$template = empty($assignee_email)
? 'ticket_save_create_user_unassigned'
: 'ticket_save_create_user_assigned';
if (!empty($assignee_email)) {
$data['assignee_email'] = $assignee_email; $data['assignee_email'] = $assignee_email;
$this->sendEmail( 'ticket_save_create_user_assigned', $data , $user_email , $ticketId ) ; }
$this->sendEmail($template, $data, $user_email, $ticketId);
// send to account manager and if it is more than one email also no problem we send to all account managers
if (!empty($account_manager_email)) {
$this->sendEmail($template, $data, $account_manager_email, $ticketId, $cc);
} }
break; break;
@ -620,22 +646,19 @@ class ThzController extends BaseController
# code... # code...
break; break;
} }
} }
return true; return true;
} }
private function updateTicket($data){ private function updateTicket($data)
{
$data['updated_by'] = get_session_userid(); $data['updated_by'] = get_session_userid();
$ticket_id = $data['thz_id']; $ticket_id = $data['thz_id'];
$result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update(); $result = $this->thzMasterModel->where('thz_id', $ticket_id)->set($data)->update();
return $result; return $result;
} }
private function insertTicket($data) private function insertTicket($data)
@ -647,7 +670,8 @@ class ThzController extends BaseController
} }
private function sendEmail( $templateName, $data , $to_email , $ticketId , $message = ""){ private function sendEmail($templateName, $data, $to_email, $ticketId , $cc = "", $message = "", $bcc = "")
{
$mailTemplate = $this->ticketMailTemplateModel->where('template_name', $templateName)->findAll()[0] ?? []; $mailTemplate = $this->ticketMailTemplateModel->where('template_name', $templateName)->findAll()[0] ?? [];
@ -669,15 +693,14 @@ class ThzController extends BaseController
$from_mail = ""; $from_mail = "";
$to_mail = $to_email; $to_mail = $to_email;
$cc_string = ""; $cc_string = $cc;
$subject = $mailTemplate['subject']; $subject = $mailTemplate['subject'];
$message = $mailTemplate['mail_content']; $message = $mailTemplate['mail_content'];
$attachments = ""; $attachments = "";
$reply_to = ""; $reply_to = "";
$bcc_string = ""; $bcc_string = $bcc;
$res = MailHelper::send_email(['from_mail' => $from_mail, 'mail' => $to_mail, 'cc' => $cc_string, 'subject' => $subject, 'message' => $message, 'attachments' => $attachments, 'reply_to' => $reply_to, 'bcc' => $bcc_string]); $res = MailHelper::send_email(['from_mail' => $from_mail, 'mail' => $to_mail, 'cc' => $cc_string, 'subject' => $subject, 'message' => $message, 'attachments' => $attachments, 'reply_to' => $reply_to, 'bcc' => $bcc_string]);
} }
@ -697,7 +720,4 @@ class ThzController extends BaseController
$data['policy_terms'] = $policy_terms; $data['policy_terms'] = $policy_terms;
return view('view_policy_terms', $data); return view('view_policy_terms', $data);
} }
} }

View File

@ -27,7 +27,8 @@ class ClientRMModel extends Model
return ($query > 0) ? true : false; return ($query > 0) ? true : false;
} }
public function getAllClientRM(){ public function getAllClientRM()
{
return $this->db->table('client_rm') return $this->db->table('client_rm')
->select('client_rm.client_id, client_rm.level,') ->select('client_rm.client_id, client_rm.level,')
@ -36,7 +37,22 @@ class ClientRMModel extends Model
->where('level', 3) ->where('level', 3)
->get() ->get()
->getResult(); ->getResult();
} }
public function findAccountManagerEmail($client_id)
{
$builder = $this->db->table('client_rm');
$builder->select('user_profiles.email');
$builder->join('user_profiles', 'user_profiles.id = client_rm.user_id');
$builder->where('client_rm.client_id', $client_id);
$builder->where('client_rm.level', 3); // Assuming level 3 is for account managers
$result = $builder->get()->getResultArray();
if (count($result) > 0) {
// Extract just the email values into a simple string array
return array_column($result, 'email');
} else {
return null; // or []
}
}
} }

View File

@ -64,8 +64,13 @@ input:checked + .slider:before {
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card-body"> <div class="card-body">
<div class="form-row">
<form role="form" class="parsley-examples" method="post" id="general_form" enctype="multipart/form-data">
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
<input type="hidden" name="PrimaryKey" id="general_PrimaryKey" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<input type="hidden" name="client_id" id="client_id" />
<div class="form-group">
<div class="form-row">
<div class="form-group"> <div class="form-group">
<label for="">Upload Your Logo</label> <br> <label for="">Upload Your Logo</label> <br>
<img <img
@ -83,14 +88,6 @@ input:checked + .slider:before {
</div> </div>
</div> </div>
<form role="form" class="parsley-examples" method="post" id="general_form" enctype="multipart/form-data">
<input type="hidden" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
<input type="hidden" name="PrimaryKey" id="general_PrimaryKey" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<input type="hidden" name="client_id" id="client_id" />
<div class="form-group">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="entity_type_id">Entity Type <span <label for="entity_type_id">Entity Type <span
@ -381,7 +378,7 @@ input:checked + .slider:before {
// Check if the file extension is allowed // Check if the file extension is allowed
if (!allowedExtensions.includes(fileExtension)) { if (!allowedExtensions.includes(fileExtension)) {
toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); $("#uploadPreview").attr("src", "<?= base_url()?>/public/assets/images/avatar_2x.png");
input.value = ""; input.value = "";
} }
@ -390,7 +387,7 @@ input:checked + .slider:before {
const fileSize = file.size / 1024; // in KB const fileSize = file.size / 1024; // in KB
if (fileSize > 200) { if (fileSize > 200) {
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.'); toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); $("#uploadPreview").attr("src", "<?= base_url()?>/public/assets/images/avatar_2x.png");
input.value = ""; input.value = "";
} }
@ -399,7 +396,7 @@ input:checked + .slider:before {
img.onload = function() { img.onload = function() {
if (this.width !== 100 || this.height !== 100) { if (this.width !== 100 || this.height !== 100) {
toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.'); toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.');
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); $("#uploadPreview").attr("src", "<?= base_url()?>/public/assets/images/avatar_2x.png");
} }
// If both size and dimensions are valid, you can proceed with your logic here // If both size and dimensions are valid, you can proceed with your logic here
// For example, you can display the image // For example, you can display the image

View File

@ -466,7 +466,12 @@ $("#branch_form").submit(function(event) {
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
console.log('Something Wrong!', 'warning'); console.log('Something Wrong!', 'warning');
}, 300); }, 300);
},
complete: function() {
console.log('Ajax request completed');
window.scrollTo({ top: 0, behavior: 'smooth' });
} }
}); });
} }
contactCount = 1 contactCount = 1
@ -511,7 +516,7 @@ $('body').on('click', '.btnBranchEdit', function() {
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
}, 500); }, 500);
// console.log('branch contact : ',res.contact)
$('#add_branch').show(); $('#add_branch').show();
$('#branch_table').hide(); $('#branch_table').hide();

View File

@ -342,7 +342,7 @@
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>"> <input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>">
<input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id"> <input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id">
<input type="hidden" name="client_id" value="${client_id}"> <input type="hidden" name="client_id" value="${client_id}">
<button class="btn btn-sm btn-primary submit" style="position: relative; right: 80px;">Submit</button> <button class="btn btn-sm btn-primary submit" style="position: relative; right:0px;">Submit</button>
</form> </form>
</td> </td>
<td id="name_${item.id}" style="display:none;"></td> <td id="name_${item.id}" style="display:none;"></td>

View File

@ -1,3 +1,66 @@
<style>
<?php foreach ($hr_access_data as $key => $value) {
$key = $key + 1;
?>
#user<?php echo "$key"; ?>-active {
margin: 0;
}
#user<?= $key ?>-active .checkbox-item {
padding-left: 0;
}
#user<?= $key ?>-active label {
font-size: 11px !important;
height: auto !important;
}
#user<?php echo "$key"; ?>-pre {
margin: 0;
}
#user<?= $key ?>-pre .checkbox-item {
padding-left: 0;
}
#user<?= $key ?>-pre label {
font-size: 11px !important;
height: auto !important;
}
#user<?php echo "$key"; ?>-gmc2 {
margin: 0;
}
#user<?= $key ?>-gmc2 .checkbox-item {
padding-left: 0;
}
#user<?= $key ?>-gmc2 label {
font-size: 11px !important;
height: auto !important;
}
#user<?php echo "$key"; ?>-cd {
margin: 0;
}
#user<?= $key ?>-cd .checkbox-item {
padding-left: 0;
}
#user<?= $key ?>-cd label {
font-size: 11px !important;
height: auto !important;
}
<?php } ?>
</style>
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@ -6,7 +69,8 @@
<form id="insuranceForm" onsubmit="submitForm(event)"> <form id="insuranceForm" onsubmit="submitForm(event)">
<?php foreach ($hr_access_data as $key => $value) { <?php foreach ($hr_access_data as $key => $value) {
$key = $key + 1 ?> $key = $key + 1;
?>
<!-- User 1 Card --> <!-- User 1 Card -->
<div class="user-card" data-user-id="<?= 'user' . $key ?>"> <div class="user-card" data-user-id="<?= 'user' . $key ?>">
@ -68,7 +132,9 @@
<div class="checkbox-item"> <div class="checkbox-item">
<input type="checkbox" class="policy-checkbox <?= $statusClass ?>" name="<?= 'user' . $key ?>_pre_policies" data-user="<?= $key ?>" data-group="pre" value="<?= $policies['client_policy_id'] ?>" <input type="checkbox" class="policy-checkbox <?= $statusClass ?>" name="<?= 'user' . $key ?>_pre_policies" data-user="<?= $key ?>" data-group="pre" value="<?= $policies['client_policy_id'] ?>"
<?= in_array($policies['client_policy_id'], $value['allowed_pre_policies']) ? 'checked' : '' ?>> <?= in_array($policies['client_policy_id'], $value['allowed_pre_policies']) ? 'checked' : '' ?>>
<label style="<?php if($policies['policy_status'] == 0){echo 'color:#ff5757';} ?>"><?= $policies['policy_type'] . ' - ' . $policies['policy_no'] ?></label> <label style="<?php if ($policies['policy_status'] == 0) {
echo 'color:#ff5757';
} ?>"><?= $policies['policy_type'] . ' - ' . $policies['policy_no'] ?></label>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
@ -86,7 +152,11 @@
} ?>> } ?>>
<i class="mdi mdi-check-circle mr-2"></i>Active policies <i class="mdi mdi-check-circle mr-2"></i>Active policies
</div> </div>
<div class="<?php if (in_array(2, $value['allowed_post_modules'])) {echo 'checkbox-group';} else {echo 'checkbox-group hidden';} ?>" id="<?= 'user' . $key ?>-active"> <div class="<?php if (in_array(2, $value['allowed_post_modules'])) {
echo 'checkbox-group';
} else {
echo 'checkbox-group hidden';
} ?>" id="<?= 'user' . $key ?>-active">
<!-- Select All --> <!-- Select All -->
@ -113,8 +183,14 @@
?> ?>
<div class="checkbox-item"> <div class="checkbox-item">
<input type="checkbox" class="policy-checkbox <?= $statusClass ?>" id="<?= 'user' . $key ?>-gmc2" name="<?= 'user' . $key ?>_active_policies" data-user="<?= $key ?>" data-group="post" <input type="checkbox" class="policy-checkbox <?= $statusClass ?>" id="<?= 'user' . $key ?>-gmc2" name="<?= 'user' . $key ?>_active_policies" data-user="<?= $key ?>" data-group="post"
value="<?= $policies['client_policy_id'] ?>" <?php if (in_array($policies['client_policy_id'], $value['allowed_active_policies'])) {echo 'checked';} ?>> value="<?= $policies['client_policy_id'] ?>" <?php if (in_array($policies['client_policy_id'], $value['allowed_active_policies'])) {
<label for="<?= 'user' . $key ?>-gmc2" style="<?php if($policies['policy_status'] == 0){echo 'color:#ff5757';} ?>"><?= $policies['policy_type'] . ' - ' . $policies['policy_no'] ?></label> echo 'checked';
} ?>>
<label for="<?= 'user' . $key ?>-gmc2" style="<?php if ($policies['policy_status'] == 0) {
echo 'color:#ff5757';
} ?>">
<?= $policies['policy_type'] . ' - ' . $policies['policy_no'] ?>
</label>
</div> </div>
<?php } ?> <?php } ?>
@ -127,11 +203,17 @@
<div class="section"> <div class="section">
<div class="section-title"> <div class="section-title">
<input type="checkbox" class="main-checkbox" <input type="checkbox" class="main-checkbox"
onchange="toggleSection(this, '<?= 'user' . $key ?>-cd')" name="<?= 'user' . $key ?>_modules" value="3" <?php if (in_array(3, $value['allowed_post_modules'])) { echo 'checked';} ?>> onchange="toggleSection(this, '<?= 'user' . $key ?>-cd')" name="<?= 'user' . $key ?>_modules" value="3" <?php if (in_array(3, $value['allowed_post_modules'])) {
echo 'checked';
} ?>>
<i class="mdi mdi-file mr-2"></i>CD statement <i class="mdi mdi-file mr-2"></i>CD statement
</div> </div>
<div class="<?php if (in_array(3, $value['allowed_post_modules'])) {echo 'checkbox-group';} else {echo 'checkbox-group hidden';} ?>" id="<?= 'user' . $key ?>-cd"> <div class="<?php if (in_array(3, $value['allowed_post_modules'])) {
echo 'checkbox-group';
} else {
echo 'checkbox-group hidden';
} ?>" id="<?= 'user' . $key ?>-cd">
<!-- Select All --> <!-- Select All -->
<div class="checkbox-item"> <div class="checkbox-item">
@ -141,7 +223,9 @@
<?php foreach ($post_cd_data as $key3 => $cd) { ?> <?php foreach ($post_cd_data as $key3 => $cd) { ?>
<div class="checkbox-item"> <div class="checkbox-item">
<input type="checkbox" class="policy-checkbox" data-user="<?= $key ?>" data-group="cd" id="<?= 'user' . $key ?>-icici1" name="<?= 'user' . $key ?>_cd" value="<?= $cd['cd_master_pk'] ?>" <?php if (in_array($cd['cd_master_pk'], $value['allowed_cd'])) { echo 'checked';} ?>> <input type="checkbox" class="policy-checkbox" data-user="<?= $key ?>" data-group="cd" id="<?= 'user' . $key ?>-icici1" name="<?= 'user' . $key ?>_cd" value="<?= $cd['cd_master_pk'] ?>" <?php if (in_array($cd['cd_master_pk'], $value['allowed_cd'])) {
echo 'checked';
} ?>>
<label for="<?= 'user' . $key ?>-icici1"><?= $cd['insurer_short_name'] ?> - <span class="policy-number"><?= $cd['cd_account_no'] ?></span></label> <label for="<?= 'user' . $key ?>-icici1"><?= $cd['insurer_short_name'] ?> - <span class="policy-number"><?= $cd['cd_account_no'] ?></span></label>
</div> </div>
<?php } ?> <?php } ?>
@ -152,7 +236,9 @@
<div class="col-md-6 col-lg-3"> <div class="col-md-6 col-lg-3">
<div class="section"> <div class="section">
<div class="section-title"> <div class="section-title">
<input type="checkbox" class="main-checkbox" name="<?= 'user' . $key ?>_modules" value="4" <?php if (in_array(4, $value['allowed_post_modules'])) {echo 'checked';} ?>> <input type="checkbox" class="main-checkbox" name="<?= 'user' . $key ?>_modules" value="4" <?php if (in_array(4, $value['allowed_post_modules'])) {
echo 'checked';
} ?>>
<i class="mdi mdi-clipboard-text mr-2"></i>Claims <i class="mdi mdi-clipboard-text mr-2"></i>Claims
</div> </div>
</div> </div>
@ -173,7 +259,9 @@
</form> </form>
<?php } else { ?> <?php } else { ?>
<div class="submit-container"> <p align="center"> <b>There is no HR data</b></p> </div> <div class="submit-container">
<p align="center"> <b>There is no HR data</b></p>
</div>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>

View File

@ -23,7 +23,30 @@ table.dataTable tbody td {
} */ } */
</style> </style>
<div class="row" style="position: relative;left: 250px;top: 55px;"> <style>
/* Put this in your CSS */
#scroll-horizontal-datatable_wrapper .btn-secondary {
cursor: pointer;
width: auto;
display: inline-flex;
align-items: center;
border: 1px solid #F5FFFF;
background-color: #F5FFFF !important;
}
#scroll-horizontal-datatable_wrapper #submitBtn{
background-color: #E26728 !important;
color: white !important;
border: 1px solid #E26728;
padding: 5px 10px !important;
border-radius: 10px !important;
cursor: pointer !important;
box-shadow: 0px 2px 4px 0px #00000024 !important;
}
</style>
<!-- <div class="row" style="position: relative;left: 250px;top: 55px;">
<div class="form-group col-md-3" id="date_div"> <div class="form-group col-md-3" id="date_div">
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"> <div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="mdi mdi-calendar-blank"></i>&nbsp; <i class="mdi mdi-calendar-blank"></i>&nbsp;
@ -35,9 +58,9 @@ table.dataTable tbody td {
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<button type="button" class="btn btn-primary" onclick="appendHrActivityHistoryHtml(this, true)"> submit </button> <button type="button" class="btn btn-primary" onclick="appendHrActivityHistoryHtml(this, true)"> submit </button>
</div> </div>
</div> </div> -->
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap flex-grow">
<thead class="bg-light"> <thead class="bg-light">
<tr> <tr>
<th>S. No</th> <th>S. No</th>
@ -68,9 +91,9 @@ $(document).ready(function () {
var ticketsTable = $('#scroll-horizontal-datatable'); var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) { if (ticketsTable.length) {
ticketsTable.DataTable({ var table = ticketsTable.DataTable({
scrollX: true, scrollX: true,
dom: "<'row'<'col-sm-2'f><'col-sm-2'>>" + // Filter left, buttons right dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // search left, buttons right
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-3'i><'col-sm-2'l><'col-sm-7'p>>", "<'row'<'col-sm-3'i><'col-sm-2'l><'col-sm-7'p>>",
language: { language: {
@ -79,11 +102,28 @@ $(document).ready(function () {
}, },
paging: true, paging: true,
pageLength: 25, pageLength: 25,
ordering: false ordering: false,
}); buttons: [
} else { {
console.error("Table not found."); text: '<div id="reportrange" class="form-control d-inline-block mr-2 custom-daterange" style="background:white; cursor: pointer; width: auto; display:inline-flex; align-items:center;">' +
'<i class="mdi mdi-calendar-blank"></i>&nbsp;<span></span> <i class="mdi mdi-menu-down"></i>' +
'</div>' +
'<input type="hidden" id="startDate">' +
'<input type="hidden" id="endDate">' +
'<button type="button" id="submitBtn" class="btn btn-primary ml-2">Submit</button>',
className: 'btn-group d-inline-block btn-secondary',
style : 'background: white; border: 1px solid #ced4da; padding: 5px 10px; border-radius: 5px;',
action: function () {
appendHrActivityHistoryHtml(this, true);
} }
}
]
});
// Attach submit handler separately so it works
$(document).on("click", "#submitBtn", function () {
appendHrActivityHistoryHtml(this, true);
});
// Daterangepicker setup // Daterangepicker setup
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
@ -99,6 +139,7 @@ $(document).ready(function () {
$('#endDate').val(end.format('DD-MM-YYYY')); $('#endDate').val(end.format('DD-MM-YYYY'));
} }
$(document).ready(function () {
$('#reportrange').daterangepicker({ $('#reportrange').daterangepicker({
startDate: start, startDate: start,
endDate: end, endDate: end,
@ -114,6 +155,10 @@ $(document).ready(function () {
cb(start, end); cb(start, end);
}); });
} else {
console.error("Table not found.");
}
});
</script> </script>

View File

@ -1004,6 +1004,22 @@ $(document).ready(function(){
}); });
}); });
function openModal(modalId) {
var modalEl = document.getElementById(modalId);
if (typeof bootstrap !== "undefined" && bootstrap.Modal) {
// Bootstrap 5
var modal = bootstrap.Modal.getOrCreateInstance(modalEl);
modal.show();
} else if (typeof $ !== "undefined" && typeof $.fn.modal === "function") {
// Bootstrap 4
$('#' + modalId).modal('show');
} else {
console.error("No compatible Bootstrap modal found.");
}
}
</script> </script>

View File

@ -113,7 +113,6 @@
<!-- Global section starts --> <!-- Global section starts -->
<style> <style>
* { * {
font-family: 'Poppins' !important; font-family: 'Poppins' !important;
} }
@ -123,19 +122,19 @@
} }
.tooltip-inner { .tooltip-inner {
color: #fff !important; /* restore white text */ color: #fff !important;
background-color: #000 !important; /* keep background black */ /* restore white text */
background-color: #000 !important;
/* keep background black */
} }
.container-fluid { .container-fluid {
padding: 0px 40px 0px 40px !important; padding: 0px 40px 0px 40px !important;
} }
</style> </style>
<!-- navbar --> <!-- navbar -->
<style> <style>
.ul-flex { .ul-flex {
display: flex; display: flex;
flex-flow: column nowrap; flex-flow: column nowrap;
@ -198,11 +197,12 @@
<!-- Dashboard-tab and header section starts --> <!-- Dashboard-tab and header section starts -->
<style> <style>
.notification-dot { .notification-dot {
position: absolute; position: absolute;
top: 5px; /* adjust depending on icon size */ top: 5px;
right: 8px; /* adjust depending on icon size */ /* adjust depending on icon size */
right: 8px;
/* adjust depending on icon size */
width: 8px; width: 8px;
height: 8px; height: 8px;
background: red; background: red;
@ -215,7 +215,9 @@
} }
#current_tile , #main_tile , #mainMenuTiles{ #current_tile,
#main_tile,
#mainMenuTiles {
font-size: 25px !important; font-size: 25px !important;
font-weight: 600 !important; font-weight: 600 !important;
} }
@ -275,12 +277,10 @@
/* Hide the button on larger screens */ /* Hide the button on larger screens */
} }
} }
</style> </style>
<!-- loader section starts --> <!-- loader section starts -->
<style> <style>
.loader div { .loader div {
background-color: #6ad9cf; background-color: #6ad9cf;
display: inline-block; display: inline-block;
@ -341,7 +341,6 @@
box-shadow: 0px 1px 1px 0px #00000040; box-shadow: 0px 1px 1px 0px #00000040;
} }
*/ */
</style> </style>
<!-- ticket list specific code --> <!-- ticket list specific code -->
@ -365,10 +364,21 @@
} }
.app-title { font-size: 18px; } .app-title {
.app-heading { font-size: 16px; } font-size: 18px;
.app-subtitle { font-size: 14px; } }
.app-text { font-size: 12px; }
.app-heading {
font-size: 16px;
}
.app-subtitle {
font-size: 14px;
}
.app-text {
font-size: 12px;
}
.title-text { .title-text {
@ -379,6 +389,7 @@
letter-spacing: 0; letter-spacing: 0;
color: black; color: black;
} }
.sub-title-text { .sub-title-text {
font-weight: 500; font-weight: 500;
font-style: normal; font-style: normal;
@ -393,158 +404,245 @@
} }
.app-text-left { .app-text-left {
text-align: left !important; } text-align: left !important;
}
.app-text-right { .app-text-right {
text-align: right !important; } text-align: right !important;
}
.app-text-center { .app-text-center {
text-align: center !important; } text-align: center !important;
}
.app-text-white { .app-text-white {
color: #ffffff !important; } color: #ffffff !important;
}
.app-text-black { .app-text-black {
color: #000000 !important; } color: #000000 !important;
}
.app-text-grey { .app-text-grey {
color: #5D5D5D !important; } color: #5D5D5D !important;
}
.app-text-primary { .app-text-primary {
color: #00999E !important; } color: #00999E !important;
}
.app-text-secondary { .app-text-secondary {
color: #E26728 !important; } color: #E26728 !important;
}
.app-text-success { .app-text-success {
color: #1abc9c !important; } color: #1abc9c !important;
}
a.app-text-primary:hover, a.app-text-primary:focus { a.app-text-primary:hover,
color: rgba(0, 153, 158, 0.5) !important; } a.app-text-primary:focus {
color: rgba(0, 153, 158, 0.5) !important;
}
a.app-text-secondary:hover, a.app-text-secondary:focus { a.app-text-secondary:hover,
color: rgba(226, 103, 40, 0.5) !important; } a.app-text-secondary:focus {
color: rgba(226, 103, 40, 0.5) !important;
}
a.app-text-success:hover, a.app-text-success:focus { a.app-text-success:hover,
color: #117964 !important; } a.app-text-success:focus {
color: #117964 !important;
}
.app-btn-primary { .app-btn-primary {
color: #fff !important; color: #fff !important;
background-color: #00999E; background-color: #00999E;
border-color: #00999E; } border-color: #00999E;
}
.app-btn-primary:hover { .app-btn-primary:hover {
color: #fff !important; color: #fff !important;
background-color: #007A7E; background-color: #007A7E;
border-color: #006C70; } border-color: #006C70;
.app-btn-primary:focus, .app-btn-primary.focus { }
.app-btn-primary:focus,
.app-btn-primary.focus {
color: #fff !important; color: #fff !important;
background-color: #007A7E; background-color: #007A7E;
border-color: #006C70; border-color: #006C70;
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); } box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5);
.app-btn-primary.disabled, .app-btn-primary:disabled { }
.app-btn-primary.disabled,
.app-btn-primary:disabled {
color: #fff !important; color: #fff !important;
background-color: #00999E; background-color: #00999E;
border-color: #00999E; } border-color: #00999E;
.app-btn-primary:not(:disabled):not(.disabled):active, .app-btn-primary:not(:disabled):not(.disabled).active, }
.app-btn-primary:not(:disabled):not(.disabled):active,
.app-btn-primary:not(:disabled):not(.disabled).active,
.show>.app-btn-primary.dropdown-toggle { .show>.app-btn-primary.dropdown-toggle {
color: #fff !important; color: #fff !important;
background-color: #006C70; background-color: #006C70;
border-color: #005D61; } border-color: #005D61;
.app-btn-primary:not(:disabled):not(.disabled):active:focus, .app-btn-primary:not(:disabled):not(.disabled).active:focus, }
.app-btn-primary:not(:disabled):not(.disabled):active:focus,
.app-btn-primary:not(:disabled):not(.disabled).active:focus,
.show>.app-btn-primary.dropdown-toggle:focus { .show>.app-btn-primary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); } box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5);
}
.app-btn-secondary { .app-btn-secondary {
color: #fff !important; color: #fff !important;
background-color: #E26728; background-color: #E26728;
border-color: #E26728; } border-color: #E26728;
}
.app-btn-secondary:hover { .app-btn-secondary:hover {
color: #fff !important; color: #fff !important;
background-color: #B8521F; background-color: #B8521F;
border-color: #9C461B; } border-color: #9C461B;
.app-btn-secondary:focus, .app-btn-secondary.focus { }
.app-btn-secondary:focus,
.app-btn-secondary.focus {
color: #fff !important; color: #fff !important;
background-color: #E26728; background-color: #E26728;
border-color: #9C461B; border-color: #9C461B;
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5);
.app-btn-secondary.disabled, .app-btn-secondary:disabled { }
.app-btn-secondary.disabled,
.app-btn-secondary:disabled {
color: #fff !important; color: #fff !important;
background-color: #E26728; background-color: #E26728;
border-color: #E26728; } border-color: #E26728;
.app-btn-secondary:not(:disabled):not(.disabled):active, .app-btn-secondary:not(:disabled):not(.disabled).active, }
.app-btn-secondary:not(:disabled):not(.disabled):active,
.app-btn-secondary:not(:disabled):not(.disabled).active,
.show>.app-btn-secondary.dropdown-toggle { .show>.app-btn-secondary.dropdown-toggle {
color: #fff !important; color: #fff !important;
background-color: #9C461B; background-color: #9C461B;
border-color: #803A16; } border-color: #803A16;
.app-btn-secondary:not(:disabled):not(.disabled):active:focus, .app-btn-secondary:not(:disabled):not(.disabled).active:focus, }
.app-btn-secondary:not(:disabled):not(.disabled):active:focus,
.app-btn-secondary:not(:disabled):not(.disabled).active:focus,
.show>.app-btn-secondary.dropdown-toggle:focus { .show>.app-btn-secondary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5);
}
.app-btn-outline-primary { .app-btn-outline-primary {
color: #000000; color: #000000;
border-color: #00999E; } border-color: #00999E;
}
.app-btn-outline-primary:hover { .app-btn-outline-primary:hover {
color: #ffffff; color: #ffffff;
background-color: #00999E; background-color: #00999E;
border-color: #00999E; } border-color: #00999E;
.app-btn-outline-primary:focus, .app-btn-outline-primary.focus { }
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); }
.app-btn-outline-primary.disabled, .app-btn-outline-primary:disabled { .app-btn-outline-primary:focus,
.app-btn-outline-primary.focus {
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5);
}
.app-btn-outline-primary.disabled,
.app-btn-outline-primary:disabled {
color: #000000; color: #000000;
background-color: transparent; } background-color: transparent;
.app-btn-outline-primary:not(:disabled):not(.disabled):active, .app-btn-outline-primary:not(:disabled):not(.disabled).active, }
.app-btn-outline-primary:not(:disabled):not(.disabled):active,
.app-btn-outline-primary:not(:disabled):not(.disabled).active,
.show>.app-btn-outline-primary.dropdown-toggle { .show>.app-btn-outline-primary.dropdown-toggle {
color: #ffffff; color: #ffffff;
background-color: #00999E; background-color: #00999E;
border-color: #00999E; } border-color: #00999E;
.app-btn-outline-primary:not(:disabled):not(.disabled):active:focus, .app-btn-outline-primary:not(:disabled):not(.disabled).active:focus, }
.app-btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.app-btn-outline-primary:not(:disabled):not(.disabled).active:focus,
.show>.app-btn-outline-primary.dropdown-toggle:focus { .show>.app-btn-outline-primary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); } box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5);
}
.app-btn-outline-secondary { .app-btn-outline-secondary {
color: #000000; color: #000000;
border-color: #E26728; } border-color: #E26728;
}
.app-btn-outline-secondary:hover { .app-btn-outline-secondary:hover {
color: #ffffff; color: #ffffff;
background-color: #E26728; background-color: #E26728;
border-color: #E26728; } border-color: #E26728;
.app-btn-outline-secondary:focus, .app-btn-outline-secondary.focus { }
box-shadow: 0 0 0 0.15rem rgba(206, 222, 239, 0.5); }
.app-btn-outline-secondary.disabled, .app-btn-outline-secondary:disabled { .app-btn-outline-secondary:focus,
.app-btn-outline-secondary.focus {
box-shadow: 0 0 0 0.15rem rgba(206, 222, 239, 0.5);
}
.app-btn-outline-secondary.disabled,
.app-btn-outline-secondary:disabled {
color: #000000; color: #000000;
background-color: transparent; } background-color: transparent;
.app-btn-outline-secondary:not(:disabled):not(.disabled):active, .app-btn-outline-secondary:not(:disabled):not(.disabled).active, }
.app-btn-outline-secondary:not(:disabled):not(.disabled):active,
.app-btn-outline-secondary:not(:disabled):not(.disabled).active,
.show>.btn-outline-secondary.dropdown-toggle { .show>.btn-outline-secondary.dropdown-toggle {
color: #ffffff; color: #ffffff;
background-color: #E26728; background-color: #E26728;
border-color: #E26728; } border-color: #E26728;
.app-btn-outline-secondary:not(:disabled):not(.disabled):active:focus, .app-btn-outline-secondary:not(:disabled):not(.disabled).active:focus, }
.app-btn-outline-secondary:not(:disabled):not(.disabled):active:focus,
.app-btn-outline-secondary:not(:disabled):not(.disabled).active:focus,
.show>.btn-outline-secondary.dropdown-toggle:focus { .show>.btn-outline-secondary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5);
}
.app-badge-primary { .app-badge-primary {
color: #ffffff; color: #ffffff;
background-color: #00999E; } background-color: #00999E;
a.app-badge-primary:hover, a.app-badge-primary:focus { }
a.app-badge-primary:hover,
a.app-badge-primary:focus {
color: #ffffff; color: #ffffff;
background-color: #007A7E; } background-color: #007A7E;
a.app-badge-primary:focus, a.app-badge-primary.focus { }
a.app-badge-primary:focus,
a.app-badge-primary.focus {
outline: 0; outline: 0;
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); } box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5);
}
.app-badge-secondary { .app-badge-secondary {
color: #ffffff; color: #ffffff;
background-color: #E26728; } background-color: #E26728;
a.app-badge-secondary:hover, a.app-badge-secondary:focus { }
a.app-badge-secondary:hover,
a.app-badge-secondary:focus {
color: #ffffff; color: #ffffff;
background-color: #B8521F; } background-color: #B8521F;
a.app-badge-secondary:focus, a.app-badge-secondary.focus { }
a.app-badge-secondary:focus,
a.app-badge-secondary.focus {
outline: 0; outline: 0;
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); } box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5);
}
</style> </style>
<!-- toaster --> <!-- toaster -->
@ -574,7 +672,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
background-color: white; background-color: white;
margin: 10px 12px; margin: 10px 12px;
border-radius: 5px; border-radius: 5px;
border: 4px solid white;padding: 8px !important; border: 4px solid white;
padding: 8px !important;
min-height: 43px !important; min-height: 43px !important;
} }
@ -582,14 +681,14 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
background-color: #B7F0F2; background-color: #B7F0F2;
margin: 10px 12px; margin: 10px 12px;
border-radius: 5px; border-radius: 5px;
border: 4px solid #00999E;padding: 8px !important; border: 4px solid #00999E;
padding: 8px !important;
min-height: 43px !important; min-height: 43px !important;
} }
</style> </style>
<!-- table section starts --> <!-- table section starts -->
<style> <style>
table[data-custom-table-css="table"] thead th { table[data-custom-table-css="table"] thead th {
background-color: #00999E; background-color: #00999E;
color: #fff !important; color: #fff !important;
@ -612,6 +711,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
border-top-left-radius: 15px !important; border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important; border-bottom-left-radius: 15px !important;
} }
table[data-custom-table-css="table"] thead th:last-child { table[data-custom-table-css="table"] thead th:last-child {
border-top-right-radius: 15px !important; border-top-right-radius: 15px !important;
border-bottom-right-radius: 15px !important; border-bottom-right-radius: 15px !important;
@ -621,6 +721,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
border-top-left-radius: 15px !important; border-top-left-radius: 15px !important;
border-bottom-left-radius: 15px !important; border-bottom-left-radius: 15px !important;
} }
table[data-custom-table-css="table"] tbody tr td:last-child { table[data-custom-table-css="table"] tbody tr td:last-child {
border-top-right-radius: 15px !important; border-top-right-radius: 15px !important;
border-bottom-right-radius: 15px !important; border-bottom-right-radius: 15px !important;
@ -639,13 +740,10 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
table[data-custom-table-css="table"].dataTable thead th { table[data-custom-table-css="table"].dataTable thead th {
padding: 15px !important; padding: 15px !important;
} }
</style> </style>
<!-- Datatable section starts --> <!-- Datatable section starts -->
<style> <style>
/* Pagination buttons */ /* Pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button { .dataTables_wrapper .dataTables_paginate .paginate_button {
padding: 2px 6px !important; padding: 2px 6px !important;
@ -662,7 +760,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
background-color: #F5FFFF; background-color: #F5FFFF;
border: none !important; border: none !important;
box-shadow: 0 0 0 0.15rem #F5FFFF; box-shadow: 0 0 0 0.15rem #F5FFFF;
font-size: 0; /* hide default text */ font-size: 0;
/* hide default text */
position: relative; position: relative;
} }
@ -671,6 +770,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
content: ""; content: "";
font-size: 14px; font-size: 14px;
} }
.dataTables_wrapper .dataTables_paginate .page-item.next .page-link::before { .dataTables_wrapper .dataTables_paginate .page-item.next .page-link::before {
content: ""; content: "";
font-size: 14px; font-size: 14px;
@ -684,6 +784,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
color: #fff !important; color: #fff !important;
border-radius: 13px !important; border-radius: 13px !important;
} }
.dataTables_wrapper .dataTables_paginate .page-item:not(.active) .page-link { .dataTables_wrapper .dataTables_paginate .page-item:not(.active) .page-link {
border: 1px solid #fff !important; border: 1px solid #fff !important;
border-radius: 13px !important; border-radius: 13px !important;
@ -707,7 +808,9 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
border-color: #028291; border-color: #028291;
} }
.dataTables_info , .text , #client_logo{ .dataTables_info,
.text,
#client_logo {
font-weight: 500 !important; font-weight: 500 !important;
color: #000 !important; color: #000 !important;
} }
@ -715,10 +818,6 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
.buttons-html5 { .buttons-html5 {
margin-right: 10px !important; margin-right: 10px !important;
} }
</style> </style>
@ -787,7 +886,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
.modal .form-control { .modal .form-control {
background-color: #ECECEC !important; background-color: #ECECEC !important;
border: 1px solid #ccc; /* optional */ border: 1px solid #ccc;
/* optional */
box-shadow: none !important; box-shadow: none !important;
} }
@ -812,7 +912,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
transform: translateY(-50%); transform: translateY(-50%);
font-size: 18px; font-size: 18px;
color: #555; color: #555;
pointer-events: none; /* icon doesnt block input clicks */ pointer-events: none;
/* icon doesnt block input clicks */
} }
@ -856,7 +957,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
background-color: #ECECEC !important; background-color: #ECECEC !important;
border: 1px solid #ccc !important; border: 1px solid #ccc !important;
min-height: 38px !important; min-height: 38px !important;
border-radius: 5px; /* optional */ border-radius: 5px;
/* optional */
} }
@ -883,7 +985,6 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
<!-- specific tag section starts --> <!-- specific tag section starts -->
<style> <style>
label { label {
font-weight: 500 !important; font-weight: 500 !important;
font-size: 0.875rem !important; font-size: 0.875rem !important;
@ -920,22 +1021,37 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
/* Chrome, Edge, Safari */ /* Chrome, Edge, Safari */
input[type="file"]::file-selector-button { input[type="file"]::file-selector-button {
background-color: #00999E; /* button color */ background-color: #00999E;
color:#000 !important; /* text color */ /* button color */
border: none; /* remove border */ color: #000 !important;
border-radius: 10px; /* rounded corners */ /* text color */
padding: 6px 20px; /* space inside */ border: none;
cursor: pointer; /* pointer cursor */ /* remove border */
border-radius: 10px;
/* rounded corners */
padding: 6px 20px;
/* space inside */
cursor: pointer;
/* pointer cursor */
font-size: 14px; font-size: 14px;
} }
/* Cancel Bootstrap's .form-control for file inputs */
input[type="file"].form-control {
height: auto !important; /* remove forced height */
padding: initial !important; /* reset padding */
font-size: inherit !important; /* reset font size */
line-height: normal !important; /* reset line height */
}
/* Apply to Select2 (single select) */ /* Apply to Select2 (single select) */
.select2-container .select2-selection--single { .select2-container .select2-selection--single {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
height: 38px; /* match bootstrap input height */ height: 38px;
/* match bootstrap input height */
display: flex; display: flex;
align-items: center; align-items: center;
border-color: #F5FFFF !important; border-color: #F5FFFF !important;
@ -948,9 +1064,6 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
border-color: #F5FFFF !important; border-color: #F5FFFF !important;
} }
</style> </style>
@ -965,8 +1078,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
button[type="submit"], button[type="submit"],
.buttons-collection, .buttons-collection,
input[type="submit"], input[type="submit"],
#get-emp-list #get-emp-list {
{
color: #fff !important; color: #fff !important;
background-color: #E26728 !important; background-color: #E26728 !important;
border-color: #E26728 !important; border-color: #E26728 !important;
@ -976,21 +1088,17 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
button[type="submit"]:hover, button[type="submit"]:hover,
.buttons-collection, .buttons-collection,
input[type="submit"]:hover, input[type="submit"]:hover,
#get-emp-list #get-emp-list {
{ cursor: pointer;
cursor: pointer; /* optional */ /* optional */
} }
</style> </style>
<!-- accordian --> <!-- accordian -->
<style> <style>
.card #collapseOne .card-body, .card #collapseOne .card-body,
.card #collapseTwo .card-body, .card #collapseTwo .card-body,
.card #collapseThree .card-body .card #collapseThree .card-body {
{
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border: 2px solid #F5FFFF; border: 2px solid #F5FFFF;
border-radius: 10px; border-radius: 10px;
@ -1015,10 +1123,9 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
border-color: #ffff !important; border-color: #ffff !important;
} }
.card #collapseOne .card-body input[type='file'] .card #collapseOne .card-body input[type='file'],
, .card #collapseTwo .card-body input[type='file'] .card #collapseTwo .card-body input[type='file'],
, .card #collapseThree .card-body input[type='file'] .card #collapseThree .card-body input[type='file'] {
{
padding: 10px !important; padding: 10px !important;
background-color: white !important; background-color: white !important;
color: black !important; color: black !important;
@ -1027,33 +1134,30 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
/* Apply to Select2 (single select) */ /* Apply to Select2 (single select) */
.card #collapseOne .card-body .select2-container .select2-selection--single, .card #collapseOne .card-body .select2-container .select2-selection--single,
.card #collapseTwo .card-body .select2-container .select2-selection--single, .card #collapseTwo .card-body .select2-container .select2-selection--single,
.card #collapseThree .card-body .select2-container .select2-selection--single .card #collapseThree .card-body .select2-container .select2-selection--single {
{
background-color: #ffff !important; background-color: #ffff !important;
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
height: 38px; /* match bootstrap input height */ height: 38px;
/* match bootstrap input height */
display: flex; display: flex;
align-items: center; align-items: center;
border-color: #ffff !important; border-color: #ffff !important;
} }
/* Apply to Select2 (multiple select) */ /* Apply to Select2 (multiple select) */
.card #collapseOne .card-body .select2-container .select2-selection--multiple .card #collapseOne .card-body .select2-container .select2-selection--multiple,
,.card #collapseTwo .card-body .select2-container .select2-selection--multiple .card #collapseTwo .card-body .select2-container .select2-selection--multiple,
,.card #collapseThree .card-body .select2-container .select2-selection--multiple .card #collapseThree .card-body .select2-container .select2-selection--multiple {
{
background-color: #ffff !important; background-color: #ffff !important;
border-radius: 10px !important; border-radius: 10px !important;
box-shadow: 0px 2px 4px 0px #00000024 !important; box-shadow: 0px 2px 4px 0px #00000024 !important;
border-color: #ffff !important; border-color: #ffff !important;
} }
</style> </style>
<!-- legacy styles of random style applied --> <!-- legacy styles of random style applied -->
<style> <style>
.card-body { .card-body {
background-color: white; background-color: white;
margin-top: 5px; margin-top: 5px;
@ -1139,8 +1243,6 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
transform: scale(1); transform: scale(1);
} }
} }
</style> </style>
@ -1158,6 +1260,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
} }
</style> </style>
<style> <style>
.custom-form .parsley-examples { .custom-form .parsley-examples {
background-color: transparent !important; background-color: transparent !important;
@ -1165,32 +1269,39 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
border: none !important; border: none !important;
box-shadow: none !important; box-shadow: none !important;
} }
.custom-form .form-control { .custom-form .form-control {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border: none !important; border: none !important;
/* color: #000; keep text readable */ /* color: #000; keep text readable */
box-shadow: 0px 1px 1px 0px #00000040; box-shadow: 0px 1px 1px 0px #00000040;
} }
.custom-form .form-control:focus { .custom-form .form-control:focus {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
box-shadow: none; box-shadow: none;
} }
.custom-form .select2-container--default .select2-selection--multiple { .custom-form .select2-container--default .select2-selection--multiple {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border: none !important; border: none !important;
} }
.custom-form .select2-container .select2-selection--single { .custom-form .select2-container .select2-selection--single {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border: 1px solid #ccc !important; border: 1px solid #ccc !important;
height: 38px !important; height: 38px !important;
box-shadow: none !important; box-shadow: none !important;
} }
.custom-form .select2-container--default .select2-selection--multiple { .custom-form .select2-container--default .select2-selection--multiple {
background-color: #F5FFFF !important; background-color: #F5FFFF !important;
border: 1px solid #ccc !important; border: 1px solid #ccc !important;
min-height: 38px !important; min-height: 38px !important;
border-radius: 5px; /* optional */ border-radius: 5px;
/* optional */
} }
.maincard { .maincard {
margin-top: 0 !important; margin-top: 0 !important;
padding-top: 0 !important; padding-top: 0 !important;
@ -1209,10 +1320,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
letter-spacing: 0; letter-spacing: 0;
text-align: center; text-align: center;
} }
</style> </style>
<style> <style>
/* Common wrapper (works for text/file inputs) */ /* Common wrapper (works for text/file inputs) */
.input-icon { .input-icon {
position: relative; position: relative;
@ -1224,7 +1333,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
.input-icon .form-control { .input-icon .form-control {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-right: 40px; /* always keep space for icon */ padding-right: 40px;
/* always keep space for icon */
cursor: pointer; cursor: pointer;
} }
@ -1234,7 +1344,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
} }
.input-icon input[type="file"].form-control { .input-icon input[type="file"].form-control {
padding-right: 40px; /* space for the icon */ padding-right: 40px;
/* space for the icon */
cursor: pointer; cursor: pointer;
} }
@ -1250,7 +1361,8 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
} }
input[type="radio"] { input[type="radio"] {
accent-color: #40B2B6; /* sets the checked color */ accent-color: #40B2B6;
/* sets the checked color */
} }
</style> </style>
@ -1306,6 +1418,75 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
</li> </li>
<?php } ?> <?php } ?>
<!-- Enrollment process -->
<?php if (in_array(get_role_id(), [1, 2, 3, 5]) || in_array(ENROLLMENT_TEAM_ID, user_team())) { ?>
<li>
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect img-inactive-not-working">
<img style="border-radius: 5px;"
src="<?= base_url() . "public"; ?>/assets/images/action_on_policies_sb.png" alt="Logo" height="20">
<span> Action on Policies </span>
</a>
<div class="collapse" id="sidebarDashboards">
<ul class="nav-second-level">
<li>
<a href="<?= base_url('/employee/upload') ?>">View Inception</a>
</li>
<li>
<a href="<?= base_url('/employee/list') ?>">View Members</a>
</li>
<li>
<a href="<?= base_url('/employee/endorsement-list') ?>">View Endorsement</a>
</li>
<li>
<a href="<?= base_url('/employee/enrollment-list') ?>">View Enrolment</a>
</li>
<li>
<a href="<?= base_url('/employee/test_members_list') ?>">Test Members List</a>
</li>
</ul>
</div>
</li>
<?php } ?>
<!-- Masters -->
<?php if (get_role_id() == 1 || get_role_id() == 5) { ?>
<li>
<a href="#sidebarDashboards" data-toggle="collapse" class=" img-inactive-not-working">
<img
src="<?= base_url() . "public"; ?>/assets/images/masters_sb.png" alt="Logo" height="20">
<span> Masters </span>
</a>
<div class="collapse" id="sidebarDashboards">
<ul class="nav-second-level">
<li>
<a href="<?= base_url('/master/insurer/list') ?>">Insurer</a>
</li>
<li>
<a href="<?= base_url('/master/tpa/list') ?>">TPA</a>
</li>
<li>
<a href="<?= base_url('/master/kyc/list') ?>">KYC</a>
</li>
<li>
<a href="<?= base_url('/master/policy/list') ?>">Policy</a>
</li>
<li>
<a href="<?= base_url('/master/cash_deposite/list') ?>">CD Master</a>
</li>
<li>
<a href="<?= base_url('/master/vehicle/list') ?>">Vehicle Master</a>
</li>
<li>
<a href="<?= base_url('/user/list') ?>"> Users </a>
</li>
</ul>
</div>
</li>
<?php } ?>
<!-- Enrollment process --> <!-- Enrollment process -->
<?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(ENROLLMENT_TEAM_ID, user_team())) { ?> <?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(ENROLLMENT_TEAM_ID, user_team())) { ?>
<li> <li>
@ -1645,8 +1826,7 @@ a.app-badge-secondary:focus, a.app-badge-secondary.focus {
<!-- user pic --> <!-- user pic -->
<div class="dropdown notification-list topbar-dropdown"> <div class="dropdown notification-list topbar-dropdown">
<a class=" dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false" <a class=" dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
>
<?php <?php
$profile = get_userProfile(); $profile = get_userProfile();

View File

@ -2,6 +2,7 @@
#notification_table { #notification_table {
overflow-x: unset; overflow-x: unset;
} }
.preview_button { .preview_button {
display: none; display: none;
} }
@ -9,6 +10,7 @@
.scrollb { .scrollb {
overflow-y: auto !important; overflow-y: auto !important;
} }
#editor-container { #editor-container {
width: 100%; width: 100%;
min-height: 600px; min-height: 600px;
@ -36,8 +38,78 @@
border-radius: 10px; border-radius: 10px;
padding: 5px !important; padding: 5px !important;
} }
</style>
<style>
/* Custom switch (responsive, no inline styles) */
#notification-tab .switch {
position: relative;
display: inline-block;
width: 2.5rem;
height: 1.2rem;
}
#notification-tab .switch input {
opacity: 0;
width: 0;
height: 0;
}
#notification-tab .slider {
position: absolute;
cursor: pointer;
inset: 0;
background-color: #ccc;
transition: 0.3s;
border-radius: 34px;
}
#notification-tab .slider:before {
position: absolute;
content: "";
height: 1rem;
width: 1rem;
left: 0.2rem;
bottom: 0.1rem;
background-color: #fff;
transition: 0.3s;
border-radius: 50%;
}
#notification-tab input:checked+.slider {
background-color: #2196F3;
}
#notification-tab input:checked+.slider:before {
transform: translateX(1.2rem);
}
/* Reusable row styling */
#notification-tab .mail-row {
display: flex;
justify-content: space-between;
align-items: center;
padding-left: .5rem;
padding-right: .5rem;
}
#notification-tab .mail-row .mail-section {
display: flex;
width: 100%;
align-items: center;
}
#notification-tab .mail-row .mail-section .left {
display: flex;
align-items: center;
margin-top: .3rem;
flex: 0 0 70%;
}
#notification-tab .mail-row .mail-section .right {
flex: 0 0 30%;
text-align: right;
}
</style> </style>
<div class="tab-pane fade" id="notification-tab"> <div class="tab-pane fade" id="notification-tab">
<input type="hidden" id="client_id_for_client_branch" value="<?= isset($notification['id']) ? $notification['id'] : '' ?>" /> <input type="hidden" id="client_id_for_client_branch" value="<?= isset($notification['id']) ? $notification['id'] : '' ?>" />
@ -114,66 +186,119 @@
<!-- mail section --> <!-- mail section -->
<!-- Member welcome mail row-->
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6 mail-section">
<label for="branch_name">Member welcome mail</label> <!-- Example: Member welcome mail -->
<div class="form-group col-md-6 mail-row">
<div class="mail-section">
<div class="left">
<label class="switch"> <label class="switch">
<input id="member_welcome_mail_btn" type="checkbox" name="member_welcome_mail_btn" <?= ($member_welcome_mail == 1) ? 'checked' : '' ?>> <input id="member_welcome_mail_btn" type="checkbox" name="member_welcome_mail_btn" <?= ($member_welcome_mail == 1) ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span> <span class="slider"></span>
</label> </label>
&nbsp; &nbsp; <span class="ml-2">Member welcome mail</span>
<a href="" data-toggle="modal" id="member_welcome_mail" onclick="getMailTemplateData(this)" data-target="#member_welcome_mail_modal">Edit</a> </div>
<div class="right">
<a href="#" id="member_welcome_mail" onclick="getMailTemplateData(this)" data-toggle="modal" data-target="#member_welcome_mail_modal">
<i class="mdi mdi-pencil"></i>
</a>
</div> </div>
<div class="form-group col-md-6 mail-section">
<label for="branch_name">Member reminder mail</label>
<label class="switch">
<input id="member_reminder_mail_btn" type="checkbox" name="member_reminder_mail_btn" <?= $member_reminder_mail == 1 ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span>
</label>
&nbsp; &nbsp;
<a href="" data-toggle="modal" id="member_reminder_mail" onclick="getMailTemplateData(this)" data-target="#member_reminder_mail_modal">Edit</a>
</div> </div>
</div> </div>
<!-- Example: Member reminder mail -->
<div class="form-group col-md-6 mail-row">
<div class="mail-section">
<div class="left">
<label class="switch">
<input id="member_reminder_mail_btn" type="checkbox" name="member_reminder_mail_btn" <?= ($member_reminder_mail == 1) ? 'checked' : '' ?>>
<span class="slider"></span>
</label>
<span class="ml-2">Member reminder mail</span>
</div>
<div class="right">
<a href="#" id="member_reminder_mail" onclick="getMailTemplateData(this)" data-toggle="modal" data-target="#member_reminder_mail_modal">
<i class="mdi mdi-pencil"></i>
</a>
</div>
</div>
</div>
</div>
<!-- Member Ecard mail row-->
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6 mail-section"> <div class="form-group col-md-6 mail-row">
<label for="branch_name">Member ECard mail</label> <div class="mail-section">
<div class="left">
<label class="switch"> <label class="switch">
<input id="member_ecard_mail_btn" type="checkbox" name="member_ecard_mail_btn" <?= $member_ecard_mail == 1 ? 'checked' : '' ?>> <input id="member_ecard_mail_btn" type="checkbox" name="member_ecard_mail_btn" <?= $member_ecard_mail == 1 ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span> <span class="slider round"></span>
</label> </label>
&nbsp; &nbsp; <span class="ml-2"> Member ECard mail</span>
<a href="" data-toggle="modal" id="member_ecard_mail" onclick="getMailTemplateData(this)" data-target="#member_ecard_mail_modal">Edit</a>
</div> </div>
<div class="form-group col-md-6 mail-section"> <div class="right">
<label for="branch_name">Member Review and summary mail</label> <a href="" data-toggle="modal" id="member_ecard_mail" onclick="getMailTemplateData(this)" data-target="#member_ecard_mail_modal">
<i class="mdi mdi-pencil"></i>
</a>
</div>
</div>
</div>
<div class="form-group col-md-6 mail-row">
<div class="mail-section">
<div class="left">
<label class="switch"> <label class="switch">
<input id="member_review_and_summary_mail_btn" type="checkbox" name="member_review_and_summary_mail_btn" <?= $member_review_and_summary_mail == 1 ? 'checked' : '' ?>> <input id="member_review_and_summary_mail_btn" type="checkbox" name="member_review_and_summary_mail_btn" <?= $member_review_and_summary_mail == 1 ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span> <span class="slider round"></span>
</label> </label>
&nbsp; &nbsp; <span class="ml-2"> Member Review And Summary Mail</span>
<a href="" data-toggle="modal" id="member_review_and_summary_mail" onclick="getMailTemplateData(this)" data-target="#member_review_and_summary_mail_modal">Edit</a> </div>
<div class="right">
<a href="" data-toggle="modal" id="member_review_and_summary_mail" onclick="getMailTemplateData(this)" data-target="#member_review_and_summary_mail_modal">
<i class="mdi mdi-pencil"></i>
</a>
</div> </div>
</div> </div>
</div>
</div>
<!-- Account Manager Summary Mail row-->
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6 mail-section"> <div class="form-group col-md-6 mail-row">
<label for="branch_name">Account Manager summary mail</label> <div class="mail-section">
<div class="left">
<label class="switch"> <label class="switch">
<input id="account_maneger_summary_mail_btn" type="checkbox" name="account_maneger_summary_mail_btn" <?= $account_maneger_summary_mail ? 'checked' : '' ?>> <input id="account_maneger_summary_mail_btn" type="checkbox" name="account_maneger_summary_mail_btn" <?= $account_maneger_summary_mail ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span> <span class="slider round"></span>
</label> </label>
&nbsp; &nbsp; <span class="ml-2"> Account Manager summary mail</span>
<a href="" data-toggle="modal" id="account_maneger_summary_mail" onclick="getMailTemplateData(this)" data-target="#account_maneger_summary_mail_modal">Edit</a>
</div> </div>
<div class="form-group col-md-6 mail-section"> <div class="right">
<label for="branch_name">Client HR summary mail</label> <a href="" data-toggle="modal" id="account_maneger_summary_mail" onclick="getMailTemplateData(this)" data-target="#account_maneger_summary_mail_modal">
<i class="mdi mdi-pencil"></i>
</a>
</div>
</div>
</div>
<div class="form-group col-md-6 mail-row">
<div class="mail-section">
<div class="left">
<label class="switch"> <label class="switch">
<input id="client_hr_summary_mail_btn" type="checkbox" name="client_hr_summary_mail_btn" <?= $client_hr_summary_mail == 1 ? 'checked' : '' ?>> <input id="client_hr_summary_mail_btn" type="checkbox" name="client_hr_summary_mail_btn" <?= $client_hr_summary_mail == 1 ? 'checked' : '' ?>>
<span class="slider round" style="height: 27px;"></span> <span class="slider round"></span>
</label> </label>
&nbsp; &nbsp; <span class="ml-2">Client HR summary mail</span>
<a href="" data-toggle="modal" id="client_hr_summary_mail" onclick="getMailTemplateData(this)" data-target="#client_hr_summary_mail_modal">Edit</a> </div>
<div class="right">
<a href="" data-toggle="modal" id="client_hr_summary_mail" onclick="getMailTemplateData(this)" data-target="#client_hr_summary_mail_modal">
<i class="mdi mdi-pencil"></i>
</a>
</div>
</div>
</div> </div>
</div> </div>
@ -184,6 +309,8 @@
<a style="float:right;" id="notification_enable_form_submit" class="btn btn-primary waves-effect waves-light mr-1">Submit</a> <a style="float:right;" id="notification_enable_form_submit" class="btn btn-primary waves-effect waves-light mr-1">Submit</a>
</div> </div>
</div> </div>
</div> </div>
<!-- </form> --> <!-- </form> -->
@ -1386,7 +1513,9 @@
enabled: true, enabled: true,
deviceOptions: ['desktop', 'mobile'] deviceOptions: ['desktop', 'mobile']
}, },
preview: { enabled: true }, preview: {
enabled: true
},
imageEditor: { imageEditor: {
enabled: true enabled: true
}, },
@ -1957,17 +2086,50 @@ $(document).on('click', '#notification_enable_form_submit', function() {
var formData = []; var formData = [];
console.log($('#hr_mail_id').val()); console.log($('#hr_mail_id').val());
formData.push({name:'client_id', value: $('#general_PrimaryKey').val()}) formData.push({
formData.push({ name: 'nhance_team_mail_ids', value: $('#nhance_team_mail_ids').val() }); name: 'client_id',
formData.push({ name: 'hr_mail_id', value: $('#hr_mail_id').val() }); value: $('#general_PrimaryKey').val()
formData.push({ name: 'mail_domain', value: $('#mail_domain').val() }); })
formData.push({ name: 'reply_to', value: $('#reply_to').val() }); formData.push({
formData.push({ name: 'member_welcome_mail_btn', value: $('#member_welcome_mail_btn').prop('checked') }); name: 'nhance_team_mail_ids',
formData.push({ name: 'member_reminder_mail_btn', value: $('#member_reminder_mail_btn').prop('checked') }); value: $('#nhance_team_mail_ids').val()
formData.push({ name: 'member_ecard_mail_btn', value: $('#member_ecard_mail_btn').prop('checked') }); });
formData.push({ name: 'member_review_and_summary_mail_btn', value: $('#member_review_and_summary_mail_btn').prop('checked') }); formData.push({
formData.push({ name: 'account_maneger_summary_mail_btn', value: $('#account_maneger_summary_mail_btn').prop('checked') }); name: 'hr_mail_id',
formData.push({ name: 'client_hr_summary_mail_btn', value: $('#client_hr_summary_mail_btn').prop('checked') }); value: $('#hr_mail_id').val()
});
formData.push({
name: 'mail_domain',
value: $('#mail_domain').val()
});
formData.push({
name: 'reply_to',
value: $('#reply_to').val()
});
formData.push({
name: 'member_welcome_mail_btn',
value: $('#member_welcome_mail_btn').prop('checked')
});
formData.push({
name: 'member_reminder_mail_btn',
value: $('#member_reminder_mail_btn').prop('checked')
});
formData.push({
name: 'member_ecard_mail_btn',
value: $('#member_ecard_mail_btn').prop('checked')
});
formData.push({
name: 'member_review_and_summary_mail_btn',
value: $('#member_review_and_summary_mail_btn').prop('checked')
});
formData.push({
name: 'account_maneger_summary_mail_btn',
value: $('#account_maneger_summary_mail_btn').prop('checked')
});
formData.push({
name: 'client_hr_summary_mail_btn',
value: $('#client_hr_summary_mail_btn').prop('checked')
});
var form_action = '<?= base_url("client/notification/update_enable") ?>'; var form_action = '<?= base_url("client/notification/update_enable") ?>';
$('.loader').fadeIn(); $('.loader').fadeIn();
@ -1977,22 +2139,23 @@ $(document).on('click', '#notification_enable_form_submit', function() {
type: "POST", type: "POST",
data: formData, data: formData,
dataType: 'json', dataType: 'json',
success: function(res) success: function(res) {
{ if (res.status == true) {
console.log(res);
if (res)
{
toastr.success('Update Successfully'); toastr.success('Update Successfully');
} }
if (res.status == false) {
let empty_templates = res.empty_templates.join(", ");
toastr.warning(`Updation Failed. The following templates were empty: ${empty_templates}`);
}
$('.loader').fadeOut(); $('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
}, },
error: function (xhr, status, error) error: function(xhr, status, error) {
{
console.error(xhr.responseText); console.error(xhr.responseText);
console.error(status, error); console.error(status, error);
setTimeout(function() setTimeout(function() {
{
$('.loader').fadeOut(); $('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
toastr.warning('Something Wrong!', 'warning'); toastr.warning('Something Wrong!', 'warning');
@ -2000,5 +2163,4 @@ $(document).on('click', '#notification_enable_form_submit', function() {
} }
}); });
}) })
</script> </script>

View File

@ -95,6 +95,21 @@
/* margin-left: 141px; */ /* margin-left: 141px; */
width: 576px; width: 576px;
} }
#policyGMCTerms input ,
#policyGMCTerms select,
#policyGMCTerms .select2-container .select2-selection--single ,
#policyGMCTerms .select2-container .select2-selection--multiple {
background-color: #ECECEC !important;
border:1px solid #ECECEC !important;
box-shadow: none !important;
}
.policy-base-info{
margin-top:10px;
}
</style> </style>
<div id="policyGMCTerms" style="display:none"> <div id="policyGMCTerms" style="display:none">
@ -112,195 +127,172 @@
<div class="form-group"> <div class="form-group">
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-4">
<label for="sumInsured">Sum Insured</label> <div class="col">
</div> <div class="d-flex align-items-center gap-2">
<div class="col-md-4"> <label for="sumInsured" class="form-label" >Sum Insured</label>
<input style="width: 128%;" type="text" name="sum_insured" id="sum_insured" class="form-control" <input class="form-control mr-2" type="text" name="sum_insured" id="sum_insured" style="max-width:200px;"
onkeypress="return onlyNumbers(event)" onkeyup=" formatNumber(this); si_keup_num_to_word(this)"> onkeypress="return onlyNumbers(event)" onkeyup=" formatNumber(this); si_keup_num_to_word(this)">
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGMCSIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;"
>
<i class="mdi mdi-plus"></i>
</button>
<div id='numberToWordGMC' class="text-danger-2 mr-2"></div>
</div> </div>
<div class="col-md-2" style="position: relative;left: 88px;">
<button type="button" class="btn btn-primary si-add-more" onclick="appendGMCSIAddMore()">+</button>
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
<div id='numberToWordGMC' class="text-danger-2"></div>
</div> </div>
</div> </div>
<div id="gmc_si_add_more"></div> <div id="gmc_si_add_more"></div>
<div class="row" style="margin-bottom:10px;"> <div class="row" style="margin-bottom:10px;">
<div class="col">
<label for="totalSumInsured" class="form-label me-3">Family Floater</label>
<div class="col-md-4"> <div class="form-check form-check-inline">
<label for="totalSumInsured">Family Floater</label> <input class="form-check-input" type="radio" id="familyFloaterYes" name="family_floater" value="1">
<label class="form-check-label" for="familyFloaterYes">Yes</label>
</div> </div>
<div class="col-md-6"> <div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="familyFloaterNo" name="family_floater" value="0">
&nbsp;&nbsp; <input type="radio" id="familyFloaterYes" name="family_floater" class="family_floater" value="1"> <label class="form-check-label" for="familyFloaterNo">No</label>
<label for="familyFloaterYes">Yes</label> </div>
</div>
<br>
<input type="radio" id="familyFloaterNo" name="family_floater" class="family_floater" value="0" style="margin-left:10px">
<label for="familyFloaterNo">No</label>
</div> </div>
<div class="col-md-4">
</div>
<div class="col-md-8" style="margin-bottom:10px"> <div class="row" style="margin-bottom: 10px;">
<div class="col"
style="background-color: #F5FFFF;border-radius:10px;box-shadow: 0px 2px 2px 0px #00000040;
padding:20px;">
<table data-custom-table-css="table"> <div class="d-flex align-items-center policy-base-info">
<tbody> <input type="checkbox" style="margin-right: 10px;color:black;"
<tr> name="family_floaters[]" value="self" id="self" checked>
<td style="width: 11%;"><span style="margin-right:20px;color:black;">Self:</span></td>
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;color:black;" <span style="margin-right:150px;color:black;">Self:</span>
name="family_floaters[]" value="self" id="self" checked> </td>
<td style="width: 28%;"> <div class="self-age">
<div class="self-age"><span style="margin-right:20px;color:black;;">Min Age:</span><input <span style="margin-right:10px;color:black;;">Min Age:</span>
<input
class="underline-input min_age" class="underline-input min_age"
value="<?php echo (isset($self_min_age) && $self_min_age > 0) ? $self_min_age : '18'; ?>" value="<?php echo (isset($self_min_age) && $self_min_age > 0) ? $self_min_age : '18'; ?>"
style="width: 35%;;" type="number" name="self_min_age" id="self_min_age" style="width: 35%;;" type="number" name="self_min_age" id="self_min_age"
onchange="lowerIsEighteen(this)"> onchange="lowerIsEighteen(this)">
</div> </div>
</td>
<td style="width: 28%;"> <div class="self-age">
<div class="self-age"><span style="margin-right:20px;color:black;">Max Age:</span><input <span style="margin-right:10px;color:black;">Max Age:</span>
<input
class="underline-input max_age" class="underline-input max_age"
value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>" value="<?php echo isset($self_max_age) ? $self_max_age : '60'; ?>"
style="width: 35%;;" type="number" name="self_max_age" id="self_max_age" style="width: 35%;;" type="number" name="self_max_age" id="self_max_age"
onchange="lowerIsEighteen(this)"></div> onchange="lowerIsEighteen(this)">
</td> </div>
<!-- <td style="width: 11%;"><span class="self-age" </div>
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span></td>
<td style="width: 11%;"><input class="self-age" type="checkbox" <div class="d-flex align-items-center policy-base-info">
style="margin-right: 70px;" name="is_payable_employee_for_self" <input type="checkbox" style="margin-right:10px;"
id="is_payable_employee_for_self"> </td> --> name="family_floaters[]" value="spouse" id="spouse">
</tr>
<tr> <span style="margin-right:125px;color:black;">
<td style="width: 11%;"><span style="margin-right:20px;color:black;">Spouse:</span></td> Spouse:</span>
<td style="width: 11%;"><input type="checkbox" style="margin-right: 70px;"
name="family_floaters[]" value="spouse" id="spouse"></td> <div class="spouse-age"><span style="margin-right:10px;color:black;">Min Age:</span>
<td style="width: 28%;"> <input
<div class="spouse-age"><span style="margin-right:20px;color:black;">Min Age:</span><input
class="underline-input min_age" class="underline-input min_age"
value="<?php echo isset($spouse_min_age) ? $spouse_min_age : '18'; ?>" value="<?php echo isset($spouse_min_age) ? $spouse_min_age : '18'; ?>"
style="width: 35%;;" type="number" name="spouse_min_age" id="spouse_min_age" style="width: 35%;;" type="number" name="spouse_min_age" id="spouse_min_age"
onchange="lowerIsEighteen(this)"></div> onchange="lowerIsEighteen(this)">
</td> </div>
<td style="width: 28%;">
<div class="spouse-age"><span style="margin-right:20px;color:black;">Max Age:</span><input <div class="spouse-age"><span style="margin-right:10px;color:black;">Max Age:</span>
<input
class="underline-input max_age" class="underline-input max_age"
value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>" value="<?php echo isset($spouse_max_age) ? $spouse_max_age : '60'; ?>"
style="width: 35%;;" type="number" name="spouse_max_age" id="spouse_max_age" style="width: 35%;;" type="number" name="spouse_max_age" id="spouse_max_age"
onchange="lowerIsEighteen(this)"></div> onchange="lowerIsEighteen(this)">
</td> </div>
<!-- <td style="width: 11%;"><span class="spouse-age" </div>
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span></td>
<td style="width: 11%;"><input class="spouse-age" type="checkbox" <div class="d-flex align-items-center policy-base-info">
style="margin-right: 70px;" name="is_payable_employee_for_spouse" <span for="children" style="color:black;" class="mr-2">Children:</span>
id="is_payable_employee_for_spouse"> </td> -->
</tr> <select name="family_floaters[]" id="children" style="margin-right:60px;" class="px-1" >
<tr>
<td style="width: 11%;"><span for="children" style="color:black;">Children:</span></td>
<td style="width: 11%;"><select name="family_floaters[]" id="children">
<option value="0">None</option> <option value="0">None</option>
<option value="1">1</option> <option value="1">1</option>
<option value="2">2</option> <option value="2">2</option>
<option value="3">3</option> <option value="3">3</option>
<option value="4">4</option> <option value="4">4</option>
</select> </select>
</td>
<td style="width: 28%;"> <div class="child-age"><span style="margin-right:10px;color:black;">Min Age:</span>
<div class="child-age"><span style="margin-right:20px;color:black;">Min Age:</span><input <input
class="underline-input min_age" class="underline-input min_age"
value="<?php echo isset($child_min_age) ? $child_min_age : '0'; ?>" value="<?php echo isset($child_min_age) ? $child_min_age : '0'; ?>"
style="width: 35%;;" type="number" name="child_min_age" id="child_min_age" style="width: 35%;;" type="number" name="child_min_age" id="child_min_age"
oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div> oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div>
</td>
<td style="width: 28%;"> <div class="child-age"><span style="margin-right:10px;color:black;">Max Age:</span>
<div class="child-age"><span style="margin-right:20px;color:black;">Max Age:</span><input <input
class="underline-input max_age" class="underline-input max_age"
value="<?php echo isset($child_max_age) ? $child_max_age : '25'; ?>" value="<?php echo isset($child_max_age) ? $child_max_age : '25'; ?>"
style="width: 35%;;" type="number" name="child_max_age" id="child_max_age" style="width: 35%;;" type="number" name="child_max_age" id="child_max_age"
oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)"></div> oninput="this.value = this.value.replace(/\D/g, '').substring(0, 2)">
</td> </div>
<!-- <td style="width: 11%;"><span class="child-age" </div>
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span></td>
<td style="width: 11%;"><input class="child-age" type="checkbox"
style="margin-right: 70px;" name="is_payable_employee_for_child"
id="is_payable_employee_for_child"> </td> -->
</tr>
</tbody> <div class="d-flex align-items-center policy-base-info flex-nowrap">
</table>
<div style="margin-top:10px"></div> <!-- Select Other Members -->
<div style="margin-top:10px"></div> <div class="d-flex align-items-center">
<span class="me-2 fw-bold text-dark mr-3">
<div style="margin-top:10px"> <b>Select Other Members:</b>
<span for="family_floaters" style="color:black;"><b>Select Other Members:</b></span> </span>
<select name="family_floaters[]" id="family_floaters" style="margin-left: 10px;"> <select name="family_floaters[]" id="family_floaters" class="form-select mr-3 px-1">
<option value="0">None</option> <option value="0">None</option>
<option value="1P">Only one parent (Either Father / Mother)</option> <option value="1P">Only one parent (Either Father / Mother)</option>
<option value="2P">Only two parents (Father+Mother)</option> <option value="2P">Only two parents (Father+Mother)</option>
<option value="1PIL">Only one parent in law (Either MIL / FIL)</option> <option value="1PIL">Only one parent in law (Either MIL / FIL)</option>
<option value="2PIL">Only two parents in law (FIL + MIL)</option> <option value="2PIL">Only two parents in law (FIL + MIL)</option>
<option value="2EPORPIL">Parents or PIL (Any two of Father, Mother, MIl, FIL)</option> <option value="2EPORPIL">Parents or PIL (Any two of Father, Mother, MIL, FIL)</option>
<option value="EPORPIL">Either Parents or PIL (Parents or Parents In Law)</option> <option value="EPORPIL">Either Parents or PIL (Parents or Parents In Law)</option>
<option value="4EPORPIL">Parents + PIL (Father + Mother + MIL + FIL)</option> <option value="4EPORPIL">Parents + PIL (Father + Mother + MIL + FIL)</option>
</select> </select>
</div> </div>
<div style="margin-top:10px"> <!-- Elders Count -->
<table data-custom-table-css="table"> <div class="d-flex align-items-center">
<tbody> <span class="me-2 text-dark" style="margin-right:10px;color:black;">Elders Count:</span>
<tr> <input class="underline-input" type="number" style="width: 35%;"
<td style="width: 22%;"> name="elder_member_count" id="member_count" readonly>
<div class="other-member-age"><span style="margin-right:20px;color:black;">Elders </div>
Count:</span><input class="underline-input" id="member_count"
style="width: 30%; width: 30%;" type="number" <!-- Min Age -->
name="elder_member_count" id="member_count" readonly></div> <div class="d-flex align-items-center">
</td> <span class="me-2 text-dark" style="margin-right:10px;color:black;">Min Age:</span>
<td style="width: 28%;"> <input class="underline-input" type="number"
<div class="other-member-age" style="margin-left: 32px;"><span name="other_member_min_age" id="other_member_min_age" style="width: 35%;"
style="margin-right:20px;color:black;">Min Age:</span><input
class="underline-input min_age"
value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>" value="<?php echo isset($other_member_min_age) ? $other_member_min_age : '18'; ?>"
style="width: 35%;;" type="number" class="underline-input min_age" onchange="lowerIsEighteen(this)">
name="other_member_min_age" id="other_member_min_age" </div>
onchange="lowerIsEighteen(this)"></div>
</td> <!-- Max Age -->
<td style="width: 28%;"> <div class="d-flex align-items-center">
<div class="other-member-age" style="margin-left: 17px;"><span <span class="me-2 text-dark" style="margin-right:10px;color:black;">Max Age:</span>
style="margin-right:20px;color:black;">Max Age:</span><input <input class="underline-input" type="number"
class="underline-input max_age" name="other_member_max_age" id="other_member_max_age" style="width: 35%;"
value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>" value="<?php echo isset($other_member_max_age) ? $other_member_max_age : '60'; ?>"
style="width: 35%;;" type="number" class="underline-input max_age" onchange="lowerIsEighteen(this)">
name="other_member_max_age" id="other_member_max_age"
onchange="lowerIsEighteen(this)"></div>
</td>
<!-- <td style="width: 11%;"><span class="other-member-age"
style="margin-right:20px;color:black;font-size: 12px;">Is Payable by employee:</span>
</td>
<td style="width: 11%;"><input class="other-member-age" type="checkbox"
style="margin-right: 70px;" name="is_payable_employee_for_elders"
id="is_payable_employee_for_elders"> </td> -->
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
<hr> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-1"> <div class="col-md-1">
@ -1762,22 +1754,28 @@
var html = ` var html = `
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col-md-4"> <div class="col">
<label for="sumInsured">Additional Sum Insured</label> <div class="d-flex align-items-center gap-2">
<label for="sumInsured" class="form-label" >Additional Sum Insured</label>
<input class="form-control mr-2" style="max-width:200px;"
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)"
onkeyup="formatNumber(this); numtowordinkeyup(this)">
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
style="background-color: #BD0707;border:1px solid #BD0707">
<i class="mdi mdi-delete"></i>
</button>
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGMCSIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;"
>
<i class="mdi mdi-plus"></i>
</button>
<div id='numberToWordSumInsured' class="text-danger-2 mr-2"></div>
</div> </div>
<div class="col-md-4">
<input style="width: 128%;" value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]" class="form-control multiple_sum_insured" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
</div> </div>
<div class="col-md-2" style="position: relative;left: 88px;">
<button type="button" class="btn btn-danger si-remove-multi" onclick="removeGMCAdditionalSI(this)">x</button>
<button type="button" class="btn btn-primary si-add-more" onclick="appendGMCSIAddMore()">+</button>
</div> </div>
<div class="col-md-4"> `;
</div>
<div class="col-md-4">
<div class="text-danger-2 numberToWordSumInsured"></div>
</div>
</div>`;
$('#gmc_si_add_more').append(html); $('#gmc_si_add_more').append(html);
} }

View File

@ -74,6 +74,16 @@
width: 689px; width: 689px;
} }
#policyGPATermsForm input ,
#policyGPATermsForm select,
#policyGPATermsForm .select2-container .select2-selection--single ,
#policyGPATermsForm .select2-container .select2-selection--multiple {
background-color: #ECECEC !important;
border:1px solid #ECECEC !important;
box-shadow: none !important;
}
</style> </style>
<div id="policyGPATermsForm" style="display:none"> <div id="policyGPATermsForm" style="display:none">
@ -101,7 +111,11 @@
<label for="sumInsured" class="form-label" >Sum Insured</label> <label for="sumInsured" class="form-label" >Sum Insured</label>
<input class="form-control mr-2" type="text" name="sumInsured2" id="sumInsured2" style="max-width:200px;" <input class="form-control mr-2" type="text" name="sumInsured2" id="sumInsured2" style="max-width:200px;"
onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)"> onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this)">
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()">+</button> <button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;"
>
<i class="mdi mdi-plus"></i>
</button>
<div id='numberToWordSumInsured' class="text-danger-2 mr-2"></div> <div id='numberToWordSumInsured' class="text-danger-2 mr-2"></div>
</div> </div>
@ -123,19 +137,16 @@
</div> </div>
<div class="row" style="margin-bottom: 10px;"> <div class="row" style="margin-bottom: 10px;">
<div class="col"> <div class="col d-flex align-items-center"
<table data-custom-table-css="table"> style="background-color: #F5FFFF;border-radius:10px;box-shadow: 0px 2px 2px 0px #00000040;
<tbody> padding:20px;">
<tr>
<td>
<input disabled type="checkbox" style="color:black;" name="family_floaters[]" <input disabled type="checkbox" style="color:black;" name="family_floaters[]"
value="self" id="self" checked> value="self" id="self" checked>
</td>
<td > <span style="margin-right: 40px;color:black;">Self</span>
<span style="margin-right: 20px;color:black;">Self</span>
</td> <div class="self-age" style="margin-right: 20px;">
<td >
<div class="self-age">
<span style="margin-right: 20px;color:black;">Min Age:</span> <span style="margin-right: 20px;color:black;">Min Age:</span>
<input class="underline-input min_age" <input class="underline-input min_age"
style="background-color: white !important;" style="background-color: white !important;"
@ -143,9 +154,8 @@
type="number" name="self_min_age" id="self_min_age_gpa" type="number" name="self_min_age" id="self_min_age_gpa"
onchange="lowerIsEighteen(this)"> onchange="lowerIsEighteen(this)">
</div> </div>
</td>
<td > <div class="self-age" style="margin-right: 20px;">
<div class="self-age">
<span style="margin-right: 20px;color:black;">Max Age:</span> <span style="margin-right: 20px;color:black;">Max Age:</span>
<input class="underline-input max_age" <input class="underline-input max_age"
style="background-color:white !important" style="background-color:white !important"
@ -153,13 +163,7 @@
type="number" name="self_max_age" id="self_max_age_gpa" type="number" name="self_max_age" id="self_max_age_gpa"
onchange="lowerIsEighteen(this)"> onchange="lowerIsEighteen(this)">
</div> </div>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
@ -403,15 +407,13 @@
</div> </div>
<hr>
<div class="gpa_special_condition"> <div class="gpa_special_condition">
</div> </div>
<br> <br>
<div class="form-group text-right m-b-0" style="margin-top: -49px;"> <div class="form-group text-right m-b-0" style="margin-top: -49px;">
<a href="#" class="button-like" id="gpaButtonSpecialCondition" title="Special Condition">Special Condition</a> <a href="#" class="btn button-like" id="gpaButtonSpecialCondition" title="Special Condition">Special Condition</a>
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGPATermsSubmit" style="margin-top: 100px;">Submit</button> <button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGPATermsSubmit" style="margin-top: 100px;">Submit</button>
</div> </div>
</form> </form>
@ -925,8 +927,14 @@
style="max-width:200px;" style="max-width:200px;"
value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]" value="${data == null || data == undefined || data == "" ? '' : data}" type="text" name="multiple_sum_insured[]"
class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)"> class="form-control multiple_sum_insured mr-2" onkeypress="return onlyNumbers(event)" onkeyup="formatNumber(this); numtowordinkeyup(this)">
<button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)">x</button> <button type="button" class="btn btn-danger si-remove-multi mr-2" onclick="removeGMCAdditionalSI(this)"
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()">+</button> style="background-color: #BD0707;border:1px solid #BD0707">
<i class="mdi mdi-delete"></i>
</button>
<button type="button" class="btn btn-primary si-add-more mr-2" onclick="appendGPASIAddMore()"
style="background-color: #e26728; border:1px solid #e26728;" >
<i class="mdi mdi-plus"></i>
</button>
<div id='numberToWordSumInsured' class="text-danger-2 "></div> <div id='numberToWordSumInsured' class="text-danger-2 "></div>
</div> </div>
</div> </div>