diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index ecbba2f7..83015c20 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -54,6 +54,7 @@ use Illuminate\Http\Request; use App\Controllers\EmployeeServiceController; use App\Models\ClaimFilesModel; use App\Models\TicketMailTemplateModel; +use Composer\Pcre\Preg; use Kreait\Firebase\Factory; use Kreait\Firebase\Messaging\CloudMessage; use Kreait\Firebase\Messaging\Notification; @@ -4179,7 +4180,7 @@ class EmployeeRestController extends AdminController // Save into DB $result = $this->hrFileUploadModel->insert($data); - if($result && $data['file_action'] == "addition"){ + if($result){ $this->giveNotificationToClientsAccountManager($data); } @@ -4196,24 +4197,12 @@ class EmployeeRestController extends AdminController } private function giveNotificationToClientsAccountManager($data){ - - // $data = [ - // 'client_id' => $this->request->getPost('client_id'), - // 'client_branch_id' => $this->request->getPost('client_branch_id'), - // 'policy_id' => $this->request->getPost('policy_id'), - // 'policy_no' => $this->request->getPost('policy_no'), - // 'file_name' => $newFileName, - // 'file_action' => $this->request->getPost('file_action'), - // 'status' => 'Yet to start', - // 'created_by' => $this->request->getPost('created_by'), - // 'updated_by' => $this->request->getPost('created_by'), - // ]; $client_name = $this->clientModel->where('id',$data['client_id'])->findAll()[0]['client_name'] ?? [] ; $account_manager_email = $this->clientRMModel->findAccountManagerEmail($data['client_id']); - $templateName = "inception_addition"; + $templateName = "hr_endorsement_template"; $mailTemplate = $this->ticketMailTemplateModel->where('template_name', $templateName)->findAll()[0] ?? []; @@ -4222,10 +4211,16 @@ class EmployeeRestController extends AdminController log_message("error","Empty mail template for inception_addition please update the template in database or create one..!!"); return ; } + + $data['file_action'] = ucwords(preg_replace("/_/", " ", $data['file_action'])); + $mailTemplate['mail_content'] = str_replace('%file_action%', $data['file_action'] ?? '', $mailTemplate['mail_content']); $mailTemplate['mail_content'] = str_replace('%client_name%', $client_name ?? '', $mailTemplate['mail_content']); $mailTemplate['mail_content'] = str_replace('%policy_no%', $data['policy_no'] ?? '', $mailTemplate['mail_content']); + $mailTemplate['subject'] = str_replace('%subject%',$data['file_action']??'',$mailTemplate['subject']); + $mailTemplate['subject'] = str_replace('%client_name%',$client_name??'',$mailTemplate['subject']); + $from_mail = ""; $to_mail = $account_manager_email; $subject = $mailTemplate['subject']; diff --git a/app/Views/UserList.php b/app/Views/UserList.php index f7b7098a..82441b22 100755 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -521,12 +521,13 @@ table.dataTable tbody td { diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 4d2e70e9..080c1e87 100755 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -46,33 +46,40 @@ height: 0; } -.slider { - position: relative; - width: 50px; - height: 25px; - background-color: #fff; - border-radius: 25px; - box-shadow: 0 0 5px rgba(0,0,0,0.2); - transition: 0.3s; +.slider, +.slider_blue { +position: relative; +width: 50px; +height: 25px; +background-color: #fff; +border-radius: 25px; +box-shadow: 0 0 5px rgba(0,0,0,0.2); +transition: 0.3s; } -.slider::before { - content: ""; - position: absolute; - height: 19px; - width: 19px; - left: 3px; - top: 3px; - background-color: #ccc; - border-radius: 50%; - transition: 0.3s; +.slider::before , +.slider_blue::before { +content: ""; +position: absolute; +height: 19px; +width: 19px; +left: 3px; +top: 3px; +background-color: #ccc; +border-radius: 50%; +transition: 0.3s; } input:checked + .slider { background-color: #ff4d4d; /* red when ON */ } -input:checked + .slider::before { +input:checked + .slider_blue { + background-color: #268ef5ff; /* blue when ON */ +} + +input:checked + .slider::before , +input:checked + .slider_blue::before { transform: translateX(25px); background-color: #fff; } @@ -269,23 +276,18 @@ input:checked + .slider::before { -
-
diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index cca6f05d..6f22e162 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -958,21 +958,7 @@ /* aligns text properly */ } - -