diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 5ed7d6d8..007d80c1 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -16,7 +16,7 @@ $routes->get('/login', 'LoginController::index');///auth/google $routes->get('/logout', 'LoginController::logout'); $routes->get('/oauth2callback', 'LoginController::receiveGoogleOAuthResponse'); $routes->get('/auth/google', 'LoginController::initiateGoogleOAuth'); -$routes->get('/update-policy', 'ClientController::checkPolicyEndDateUpdateClientPolicyStatusExpired'); +$routes->get('/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus'); $routes->group("/user", ["filter" => "authMVC"], function($routes){ diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 7fe814d8..7a2b274e 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -109,7 +109,7 @@ class ClientController extends AdminController } - public function checkPolicyEndDateUpdateClientPolicyStatusExpired(){ + public function updateEmpAndPolicyStatus(){ $return = $this->clientPolicyModel->updateStatus(); $this->myLogger->logme('error', 'Client Policy Status Update Count: {data}', ['data' => $return['client']]); diff --git a/app/Helpers/excel_import_export_helper.php b/app/Helpers/excel_import_export_helper.php index 0c415da5..ffb72f4c 100644 --- a/app/Helpers/excel_import_export_helper.php +++ b/app/Helpers/excel_import_export_helper.php @@ -419,6 +419,19 @@ if (!function_exists('remove_underscore_capitalize_first_letter')) { } if (!function_exists('formatDateOrReturn')) { + + /** + * Formats a given value as a date or returns the original value if it's not a valid date. + * + * This function checks if the provided value is a valid date. If it is, it formats + * the date as 'd-M-Y' (day-month-year) format and returns it. If the value is not + * a valid date, it returns the original value unchanged. + * + * @param mixed $value The value to be formatted as a date or returned unchanged. + * @return string|mixed The formatted date if the value is a valid date, otherwise the original value. + */ + + function formatDateOrReturn($value) { // Check if the value is a valid date diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 7a1c92aa..27da989b 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -244,7 +244,7 @@ $(document).ready(function() { diff --git a/app/Views/employee_upload.php b/app/Views/employee_upload.php index 16e5d66d..f068f4cc 100644 --- a/app/Views/employee_upload.php +++ b/app/Views/employee_upload.php @@ -297,8 +297,8 @@ function fetchFileError(file_id) { var file_error_html = ""; for (var key in file_error_data['error_summary']) { - console.log(key); - var err_id = key; + // console.log(key); + var err_id = parseInt(key); var err_count = file_error_data['error_summary'][key]; switch (err_id) { case 1: @@ -345,21 +345,26 @@ function fetchFileError(file_id) { file_error_html += ""; break; } - file_error_html += (err_id == 1 ? - "Mandatory values missing " + - err_count + "" : (err_id == 2 ? - "Values not in expected format " + - err_count + "" : (err_id == 3 ? - "Field contains not allowed values " + - err_count + "" : (err_id == 4 ? - "Rule Conflict " + - err_count + "" : (err_id == 5 ? "" + - file_error_data['error_data'] + "" : (err_id == - 6 ? - "" + file_error_data['error_data'] + - "" : "")))))); + + // console.log('file_error_html_1', file_error_html) + + // file_error_html += (err_id == 1 ? + // "Mandatory values missing " + + // err_count + "" : (err_id == 2 ? + // "Values not in expected format " + + // err_count + "" : (err_id == 3 ? + // "Field contains not allowed values " + + // err_count + "" : (err_id == 4 ? + // "Rule Conflict " + + // err_count + "" : (err_id == 5 ? "" + + // file_error_data['error_data'] + "" : (err_id == + // 6 ? + // "" + file_error_data['error_data'] + + // "" : "")))))); file_error_html += '
'; - // } + // // } + + // console.log('file_error_html_2', file_error_html) } if (err_id != 5 && err_id != 6) { @@ -369,7 +374,7 @@ function fetchFileError(file_id) { "' target=_blank>click here to more details..." : ""); } - console.log(file_error_html); + // console.log(file_error_html); $('#file-err-modal').find(".modal-body").html(file_error_html); return file_error_html; } catch (error) { diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index e3998fbe..80132a74 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -6,12 +6,12 @@ <?= isset($page_name) ? $page_name : 'NHance'; ?> - - + + - /assets/images/favicon.ico"> + /assets/images/Nhance_Favi.svg"> /assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" /> @@ -451,18 +451,18 @@
-
diff --git a/app/Views/login.php b/app/Views/login.php index a16a0206..e6519f06 100644 --- a/app/Views/login.php +++ b/app/Views/login.php @@ -3,13 +3,14 @@ - nHANCE + NHANCE + - /assets/images/favicon.ico"> + /assets/images/Nhance_Favi.svg"> /assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css" diff --git a/public/assets/images/Nhance_Favi.png b/public/assets/images/Nhance_Favi.png new file mode 100644 index 00000000..f3607983 Binary files /dev/null and b/public/assets/images/Nhance_Favi.png differ diff --git a/public/assets/images/Nhance_Favi.svg b/public/assets/images/Nhance_Favi.svg new file mode 100644 index 00000000..a281e4b7 --- /dev/null +++ b/public/assets/images/Nhance_Favi.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/assets/images/Nhance_Favi_white.png b/public/assets/images/Nhance_Favi_white.png new file mode 100644 index 00000000..017226c1 Binary files /dev/null and b/public/assets/images/Nhance_Favi_white.png differ diff --git a/public/assets/images/Nhance_Favi_white_2.png b/public/assets/images/Nhance_Favi_white_2.png new file mode 100644 index 00000000..2c4dcb4b Binary files /dev/null and b/public/assets/images/Nhance_Favi_white_2.png differ diff --git a/public/assets/images/nhance-loader.gif b/public/assets/images/nhance-loader.gif new file mode 100644 index 00000000..ed96c651 Binary files /dev/null and b/public/assets/images/nhance-loader.gif differ diff --git a/public/assets/images/nhance_white_logo.svg b/public/assets/images/nhance_white_logo.svg new file mode 100644 index 00000000..fa63c18d --- /dev/null +++ b/public/assets/images/nhance_white_logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + +