CHANGE_UI_FIX - VADIVEL J 2025-09-09
This commit is contained in:
parent
d34f3290e4
commit
a0a0a696ac
@ -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
|
||||||
|
|||||||
@ -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'])) {
|
||||||
@ -81,32 +85,30 @@ class ThzController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hist_id = $this->thzHistoryModel->insert($history);
|
$hist_id = $this->thzHistoryModel->insert($history);
|
||||||
$references = $old['status']." - ".$data['status']." - ".$hist_id;
|
$references = $old['status'] . " - " . $data['status'] . " - " . $hist_id;
|
||||||
}else{
|
} else {
|
||||||
$references = $old['status']." - ".$data['status'];
|
$references = $old['status'] . " - " . $data['status'];
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$references = "No Details";
|
$references = "No Details";
|
||||||
}
|
}
|
||||||
|
|
||||||
$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;
|
||||||
|
|
||||||
$emailNotificationResult = $this->ticketSaveNotification($data , $insertOrUpdate = $text , $id);
|
$emailNotificationResult = $this->ticketSaveNotification($data, $insertOrUpdate = $text, $id);
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'status' => $result ? 'success' : 'error',
|
'status' => $result ? 'success' : 'error',
|
||||||
'message' => $result ? "Ticket {$text}d successfully " : "Unable to {$text} ticket. Please try again." ,
|
'message' => $result ? "Ticket {$text}d successfully " : "Unable to {$text} ticket. Please try again.",
|
||||||
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed..!!',
|
'notification' => $emailNotificationResult ? 'Email Notification Success..!!' : 'Email Notification Failed..!!',
|
||||||
'ref' => $references
|
'ref' => $references
|
||||||
])->setStatusCode($result ? 200 : 400);
|
])->setStatusCode($result ? 200 : 400);
|
||||||
@ -117,11 +119,13 @@ class ThzController extends BaseController
|
|||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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);
|
||||||
}
|
}
|
||||||
@ -130,12 +134,12 @@ class ThzController extends BaseController
|
|||||||
public function ticketList()
|
public function ticketList()
|
||||||
{
|
{
|
||||||
|
|
||||||
try{
|
try {
|
||||||
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
||||||
|
|
||||||
|
|
||||||
$data = $this->request->getGet();
|
$data = $this->request->getGet();
|
||||||
if ($returnType === 'web' && in_array(get_role_id(), [2,3,4])) {
|
if ($returnType === 'web' && in_array(get_role_id(), [2, 3, 4])) {
|
||||||
$data['assign_to'] = $data['assign_to'] ?? get_session_userid();
|
$data['assign_to'] = $data['assign_to'] ?? get_session_userid();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,11 +151,11 @@ class ThzController extends BaseController
|
|||||||
// return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found'])->setStatusCode(404);
|
// return $this->response->setJSON([ 'status' => 'error','message' => 'No tickets found'])->setStatusCode(404);
|
||||||
throw new \RuntimeException('No tickets found', 400);
|
throw new \RuntimeException('No tickets found', 400);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
$data['page_name'] = "Tickets";
|
$data['page_name'] = "Tickets";
|
||||||
$data['ticket_data'] = $tickets;
|
$data['ticket_data'] = $tickets;
|
||||||
$data['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
$data['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3', '4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||||
// 2,3,4 remain person varannum.
|
// 2,3,4 remain person varannum.
|
||||||
$data['client_list'] = $this->clientModel->getCreatedByUserName();
|
$data['client_list'] = $this->clientModel->getCreatedByUserName();
|
||||||
$data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
|
$data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
|
||||||
@ -164,64 +168,67 @@ 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
|
||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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();
|
||||||
|
|
||||||
$data['notes_type'] = $data['notes_type'] ?? 'External' ;
|
$data['notes_type'] = $data['notes_type'] ?? 'External';
|
||||||
|
|
||||||
$result = $this->thzMasterNotesModel->insert($data);
|
$result = $this->thzMasterNotesModel->insert($data);
|
||||||
|
|
||||||
if(empty($result)){
|
if (empty($result)) {
|
||||||
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
||||||
throw new \RuntimeException('No tickets found', 404);
|
throw new \RuntimeException('No tickets found', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($data['notes_type'] == "External"){
|
if ($data['notes_type'] == "External") {
|
||||||
$emailNotificationResult = $this->ticketConversationSaveNotification($data);
|
$emailNotificationResult = $this->ticketConversationSaveNotification($data);
|
||||||
}else{
|
} else {
|
||||||
$emailNotificationResult = false ;
|
$emailNotificationResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this->response->setJSON([
|
return $this->response->setJSON([
|
||||||
'status' => $result ? 'success' : 'error',
|
'status' => $result ? 'success' : 'error',
|
||||||
'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
|
||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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,20 +261,20 @@ 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
|
||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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);
|
||||||
}
|
}
|
||||||
@ -281,23 +288,23 @@ class ThzController extends BaseController
|
|||||||
|
|
||||||
$thz_id = $data['thz_id'] ?? null;
|
$thz_id = $data['thz_id'] ?? null;
|
||||||
|
|
||||||
$ticketType = $data['notes_type'] ?? 'External' ;
|
$ticketType = $data['notes_type'] ?? 'External';
|
||||||
|
|
||||||
if($thz_id){
|
if ($thz_id) {
|
||||||
$result['master'] = $this->thzMasterModel
|
$result['master'] = $this->thzMasterModel
|
||||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||||
->where('thz_master.thz_id', $thz_id)
|
->where('thz_master.thz_id', $thz_id)
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
if(!empty($result['master'])){
|
if (!empty($result['master'])) {
|
||||||
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType );
|
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType);
|
||||||
$result['notes'] = !empty($notes) ? $notes : [];
|
$result['notes'] = !empty($notes) ? $notes : [];
|
||||||
}else{
|
} else {
|
||||||
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
||||||
throw new \RuntimeException('No tickets found', 400);
|
throw new \RuntimeException('No tickets found', 400);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
// return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(404);
|
||||||
throw new \RuntimeException('No tickets found', 404);
|
throw new \RuntimeException('No tickets found', 404);
|
||||||
}
|
}
|
||||||
@ -312,15 +319,17 @@ class ThzController extends BaseController
|
|||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
$assign_to = $result['master'][0]['assign_to'];
|
$assign_to = $result['master'][0]['assign_to'];
|
||||||
$mobile = $result['master'][0]['mobile'];
|
$mobile = $result['master'][0]['mobile'];
|
||||||
@ -333,33 +342,32 @@ class ThzController extends BaseController
|
|||||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||||
->where('thz_master.assign_to', $assign_to)
|
->where('thz_master.assign_to', $assign_to)
|
||||||
->where('thz_master.mobile',$mobile)
|
->where('thz_master.mobile', $mobile)
|
||||||
->where('thz_master.thz_id !=',$thz_id)
|
->where('thz_master.thz_id !=', $thz_id)
|
||||||
->where('thz_master.status !=','Closed')
|
->where('thz_master.status !=', 'Closed')
|
||||||
->where('thz_master.status !=','Resolved')
|
->where('thz_master.status !=', 'Resolved')
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
$result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
$result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3', '4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||||
// 2,3,4 remain person varannum.
|
// 2,3,4 remain person varannum.
|
||||||
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
||||||
|
|
||||||
$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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketType()
|
public function ticketType()
|
||||||
{
|
{
|
||||||
$method = $this->request->getMethod(); // get, post
|
$method = $this->request->getMethod(); // get, post
|
||||||
try{
|
try {
|
||||||
if ($method === 'get') {
|
if ($method === 'get') {
|
||||||
$types = $this->thzTypeModel->select('id,name,is_active')->where('is_active', 1)->findAll();
|
$types = $this->thzTypeModel->select('id,name,is_active')->where('is_active', 1)->findAll();
|
||||||
if (empty($types)) {
|
if (empty($types)) {
|
||||||
return $this->response->setJSON(['status' => 'error','message' => 'No ticket types found'])->setStatusCode(404);
|
return $this->response->setJSON(['status' => 'error', 'message' => 'No ticket types found'])->setStatusCode(404);
|
||||||
}
|
}
|
||||||
return $this->response->setJSON(['status' => 'success','data' => $types])->setStatusCode(200);
|
return $this->response->setJSON(['status' => 'success', 'data' => $types])->setStatusCode(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($method === 'post') {
|
if ($method === 'post') {
|
||||||
@ -383,20 +391,21 @@ class ThzController extends BaseController
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
])->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
|
||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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();
|
||||||
@ -423,7 +431,7 @@ class ThzController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this->response->setJSON(['status' => 'success','data' => $details])->setStatusCode(200);
|
return $this->response->setJSON(['status' => 'success', 'data' => $details])->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;
|
||||||
|
|
||||||
@ -431,11 +439,13 @@ class ThzController extends BaseController
|
|||||||
|| $e instanceof \mysqli_sql_exception
|
|| $e instanceof \mysqli_sql_exception
|
||||||
|| $e instanceof \PDOException;
|
|| $e instanceof \PDOException;
|
||||||
|
|
||||||
$context = ['title' => get_class($e),'type' => get_class($e),'code' => $code,'message' => $e->getMessage(),'file' => $e->getFile(),'line' => $e->getLine()];
|
$context = ['title' => get_class($e), 'type' => get_class($e), 'code' => $code, 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()];
|
||||||
|
|
||||||
$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);
|
||||||
}
|
}
|
||||||
@ -457,7 +467,7 @@ class ThzController extends BaseController
|
|||||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||||
->where('thz_master.assign_to', $assign_to)
|
->where('thz_master.assign_to', $assign_to)
|
||||||
->orderBy('thz_master.created_at','desc')
|
->orderBy('thz_master.created_at', 'desc')
|
||||||
->findAll();
|
->findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,7 +479,7 @@ class ThzController extends BaseController
|
|||||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||||
// ->where('thz_id', $id)
|
// ->where('thz_id', $id)
|
||||||
->where('thz_master.mobile', $mobile)
|
->where('thz_master.mobile', $mobile)
|
||||||
->orderBy('thz_master.created_at','desc')
|
->orderBy('thz_master.created_at', 'desc')
|
||||||
->findAll();
|
->findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,13 +487,14 @@ class ThzController extends BaseController
|
|||||||
return $this->thzMasterModel
|
return $this->thzMasterModel
|
||||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||||
->orderBy('thz_master.created_at','desc')
|
->orderBy('thz_master.created_at', 'desc')
|
||||||
->findAll();
|
->findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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,26 +511,26 @@ 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
|
||||||
|
|
||||||
$data['subject'] = $this->findSubject($data['thz_id']);
|
$data['subject'] = $this->findSubject($data['thz_id']);
|
||||||
|
|
||||||
$assignee_id = $this->findAssigneeId($data['thz_id']) ;
|
$assignee_id = $this->findAssigneeId($data['thz_id']);
|
||||||
|
|
||||||
$user_email = $this->findUserEmail($data['thz_id']) ;
|
$user_email = $this->findUserEmail($data['thz_id']);
|
||||||
|
|
||||||
$assignee_email = $this->findAssigneeEmail($assignee_id) ?? '';
|
$assignee_email = $this->findAssigneeEmail($assignee_id) ?? '';
|
||||||
|
|
||||||
$sender_mail = $data['notes_by'] == "User" ? $user_email : $assignee_email ;
|
$sender_mail = $data['notes_by'] == "User" ? $user_email : $assignee_email;
|
||||||
$receiver_mail = $data['notes_by'] == "User" ? $assignee_email : $user_email ;
|
$receiver_mail = $data['notes_by'] == "User" ? $assignee_email : $user_email;
|
||||||
|
|
||||||
$templateName = "ticket_conversation_save_notification";
|
$templateName = "ticket_conversation_save_notification";
|
||||||
|
|
||||||
@ -527,40 +540,43 @@ class ThzController extends BaseController
|
|||||||
|
|
||||||
$message = $data['notes'] ?? '';
|
$message = $data['notes'] ?? '';
|
||||||
|
|
||||||
$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;
|
||||||
@ -572,13 +588,13 @@ class ThzController extends BaseController
|
|||||||
|
|
||||||
case 'update':
|
case 'update':
|
||||||
|
|
||||||
$this->sendEmail( 'ticket_save_update_assignee', $data ,$assignee_email , $ticketId ) ;
|
$this->sendEmail('ticket_save_update_assignee', $data, $assignee_email, $ticketId);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'create':
|
case 'create':
|
||||||
|
|
||||||
$this->sendEmail( 'ticket_save_create_assignee', $data ,$assignee_email , $ticketId ) ;
|
$this->sendEmail('ticket_save_create_assignee', $data, $assignee_email, $ticketId);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -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"
|
||||||
$this->sendEmail( 'ticket_save_update_user', $data ,$user_email , $ticketId ) ;
|
: "Assigned With {$assignee_email}";
|
||||||
}else{
|
|
||||||
$data['assigneeAndStatus'] = "Assigned With {$assignee_email}";
|
$this->sendEmail('ticket_save_update_user', $data, $user_email, $ticketId);
|
||||||
$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');
|
||||||
$data['assignee_email'] = $assignee_email ;
|
|
||||||
$this->sendEmail( 'ticket_save_create_user_assigned', $data , $user_email , $ticketId ) ;
|
$template = empty($assignee_email)
|
||||||
|
? 'ticket_save_create_user_unassigned'
|
||||||
|
: 'ticket_save_create_user_assigned';
|
||||||
|
|
||||||
|
if (!empty($assignee_email)) {
|
||||||
|
$data['assignee_email'] = $assignee_email;
|
||||||
|
}
|
||||||
|
|
||||||
|
$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,12 +670,13 @@ 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] ?? [];
|
||||||
|
|
||||||
if(empty($mailTemplate)){
|
if (empty($mailTemplate)) {
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mailTemplate['subject'] = str_replace('%subject%', $data['subject'] ?? '', $mailTemplate['subject']);
|
$mailTemplate['subject'] = str_replace('%subject%', $data['subject'] ?? '', $mailTemplate['subject']);
|
||||||
@ -665,19 +689,18 @@ class ThzController extends BaseController
|
|||||||
|
|
||||||
$mailTemplate['mail_content'] = str_replace('%assignee_email%', $data['assignee_email'] ?? '', $mailTemplate['mail_content']);
|
$mailTemplate['mail_content'] = str_replace('%assignee_email%', $data['assignee_email'] ?? '', $mailTemplate['mail_content']);
|
||||||
|
|
||||||
$mailTemplate['mail_content'] = str_replace('%assigneeAndStatus%',$data['assigneeAndStatus'] ?? '' ,$mailTemplate['mail_content']);
|
$mailTemplate['mail_content'] = str_replace('%assigneeAndStatus%', $data['assigneeAndStatus'] ?? '', $mailTemplate['mail_content']);
|
||||||
|
|
||||||
$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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -686,9 +709,9 @@ class ThzController extends BaseController
|
|||||||
$policy_data = $this->clientPolicyModel->where('is_active', 1)->where('id', $client_policy_id)->first();
|
$policy_data = $this->clientPolicyModel->where('is_active', 1)->where('id', $client_policy_id)->first();
|
||||||
|
|
||||||
$policy_terms = [];
|
$policy_terms = [];
|
||||||
if(isset($policy_data['policy_terms']) && !empty($policy_data['policy_terms'])){
|
if (isset($policy_data['policy_terms']) && !empty($policy_data['policy_terms'])) {
|
||||||
|
|
||||||
$raw_terms = json_decode($policy_data['policy_terms'] ?? [] , true) ?? [];
|
$raw_terms = json_decode($policy_data['policy_terms'] ?? [], true) ?? [];
|
||||||
|
|
||||||
$ticketController = new TicketController();
|
$ticketController = new TicketController();
|
||||||
$policy_terms = $ticketController->convertTermsToDisplay($raw_terms);
|
$policy_terms = $ticketController->convertTermsToDisplay($raw_terms);
|
||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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 []
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
kycPrimaryKey = $('#kyc_PrimaryKey').val();
|
kycPrimaryKey = $('#kyc_PrimaryKey').val();
|
||||||
|
|
||||||
$('#others').hide()
|
$('#others').show()
|
||||||
$('#other_docs_table').hide();
|
$('#other_docs_table').hide();
|
||||||
|
|
||||||
$(document).on('click', '.submit', function(e) {
|
$(document).on('click', '.submit', function(e) {
|
||||||
@ -454,7 +454,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>
|
||||||
|
|||||||
@ -1,12 +1,76 @@
|
|||||||
|
<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">
|
||||||
|
|
||||||
<?php if(isset($hr_access_data) && !empty($hr_access_data)) { ?>
|
<?php if (isset($hr_access_data) && !empty($hr_access_data)) { ?>
|
||||||
<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>
|
||||||
|
|||||||
@ -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>
|
<i class="mdi mdi-calendar-blank"></i>
|
||||||
@ -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> <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,
|
||||||
@ -113,6 +154,10 @@ $(document).ready(function () {
|
|||||||
}, cb);
|
}, cb);
|
||||||
|
|
||||||
cb(start, end);
|
cb(start, end);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error("Table not found.");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,43 +1,115 @@
|
|||||||
<style>
|
<style>
|
||||||
#notification_table{
|
#notification_table {
|
||||||
overflow-x : unset;
|
overflow-x: unset;
|
||||||
}
|
}
|
||||||
.preview_button{
|
|
||||||
display:none;
|
.preview_button {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollb {
|
.scrollb {
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#editor-container {
|
#editor-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 600px;
|
min-height: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-dialog {
|
.modal-dialog {
|
||||||
max-width: 90% !important;
|
max-width: 90% !important;
|
||||||
width: 90% !important;
|
width: 90% !important;
|
||||||
}
|
|
||||||
|
|
||||||
/* Also ensure the modal body has proper height */
|
|
||||||
|
|
||||||
.modal-body {
|
|
||||||
min-height: 600px;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If you're using Bootstrap's modal, you might also want to ensure proper positioning */
|
|
||||||
.modal-dialog {
|
|
||||||
margin: 1.75rem auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mail-section{
|
|
||||||
border: 1px solid #00999E;
|
|
||||||
border-radius:10px;
|
|
||||||
padding:5px !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Also ensure the modal body has proper height */
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
min-height: 600px;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If you're using Bootstrap's modal, you might also want to ensure proper positioning */
|
||||||
|
.modal-dialog {
|
||||||
|
margin: 1.75rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mail-section {
|
||||||
|
border: 1px solid #00999E;
|
||||||
|
border-radius: 10px;
|
||||||
|
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>
|
||||||
|
<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>
|
|
||||||
|
|
||||||
<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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<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> -->
|
||||||
@ -704,7 +831,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.modal-content -->
|
</div><!-- /.modal-content -->
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
<!-- /.modal -->
|
<!-- /.modal -->
|
||||||
|
|
||||||
|
|
||||||
@ -1376,7 +1503,7 @@
|
|||||||
console.log("Creating new editor instance...");
|
console.log("Creating new editor instance...");
|
||||||
editor = unlayer.createEditor({
|
editor = unlayer.createEditor({
|
||||||
id: `${template_name}_editor_container`,
|
id: `${template_name}_editor_container`,
|
||||||
projectId: <?=getenv('unlayer.projectID') ?>,
|
projectId: <?= getenv('unlayer.projectID') ?>,
|
||||||
displayMode: "email",
|
displayMode: "email",
|
||||||
features: {
|
features: {
|
||||||
textEditor: {
|
textEditor: {
|
||||||
@ -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
|
||||||
},
|
},
|
||||||
@ -1434,7 +1563,7 @@
|
|||||||
function getMailTemplateData(element) {
|
function getMailTemplateData(element) {
|
||||||
template_name = element.id;
|
template_name = element.id;
|
||||||
const validTemplates = [
|
const validTemplates = [
|
||||||
"account_maneger_summary_mail", "member_reminder_mail", "member_ecard_mail", "member_welcome_mail","member_review_and_summary_mail","client_hr_summary_mail"
|
"account_maneger_summary_mail", "member_reminder_mail", "member_ecard_mail", "member_welcome_mail", "member_review_and_summary_mail", "client_hr_summary_mail"
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!validTemplates.includes(template_name)) {
|
if (!validTemplates.includes(template_name)) {
|
||||||
@ -1953,21 +2082,54 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(document).on('click', '#notification_enable_form_submit', function() {
|
$(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,28 +2139,28 @@ $(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');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -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="col">
|
||||||
|
<label for="totalSumInsured" class="form-label me-3">Family Floater</label>
|
||||||
|
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<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 class="form-check form-check-inline">
|
||||||
|
<input class="form-check-input" type="radio" id="familyFloaterNo" name="family_floater" value="0">
|
||||||
|
<label class="form-check-label" for="familyFloaterNo">No</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" 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;">
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="d-flex align-items-center policy-base-info">
|
||||||
<label for="totalSumInsured">Family Floater</label>
|
<input type="checkbox" style="margin-right: 10px;color:black;"
|
||||||
</div>
|
name="family_floaters[]" value="self" id="self" checked>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<span style="margin-right:150px;color:black;">Self:</span>
|
||||||
|
|
||||||
<input type="radio" id="familyFloaterYes" name="family_floater" class="family_floater" value="1">
|
<div class="self-age">
|
||||||
<label for="familyFloaterYes">Yes</label>
|
<span style="margin-right:10px;color:black;;">Min Age:</span>
|
||||||
|
<input
|
||||||
<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 class="col-md-4">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-8" style="margin-bottom:10px">
|
|
||||||
|
|
||||||
<table data-custom-table-css="table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<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;"
|
|
||||||
name="family_floaters[]" value="self" id="self" checked> </td>
|
|
||||||
<td style="width: 28%;">
|
|
||||||
<div class="self-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($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">
|
||||||
@ -1763,22 +1755,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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user