From 25515a71049a7aeeb2e07d12c91cdb2ed3c469d4 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Mon, 9 Dec 2024 10:04:14 +0530 Subject: [PATCH 1/3] employee module changes-1 vadivel J 09-12-2024 --- app/Views/addEmployeenew.php | 27 ++++- app/Views/editEmployeenew.php | 209 +++++++++++++++++----------------- 2 files changed, 127 insertions(+), 109 deletions(-) diff --git a/app/Views/addEmployeenew.php b/app/Views/addEmployeenew.php index 584c36fc..3e6464d8 100755 --- a/app/Views/addEmployeenew.php +++ b/app/Views/addEmployeenew.php @@ -314,10 +314,17 @@ $("#photo").src(""); } + + function capitalizeFirstLetter(word) { + if (!word) return ""; // Handle empty or undefined strings + return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); + } + function ValidatePassport() { - var regsaid = /^[A-Z][1-9]\d\s?\d{4}[1-9]$/; - var passport = $("#passportno").val().trim(); + var regsaid =/^[A-Z][1-9]\d\s?\d{4}[1-9]$/; + + var passport = capitalizeFirstLetter($("#passportno").val().trim()); if (regsaid.test(passport) == false) { alert('You have entered invalid Passport.'); @@ -1042,7 +1049,6 @@ IsActive; - $ProfilePicPath=''; + $ProfilePicPath = ''; if (!empty($Emp->ProfilePic)) { - $ProfilePicPath = base_url().'public/uploads/images/' . $Emp->ProfilePic; + $ProfilePicPath = base_url() . 'public/uploads/images/' . $Emp->ProfilePic; } else { - $ProfilePicPath = base_url().'public/assets/dist/img/avatar.png'; + $ProfilePicPath = base_url() . 'public/assets/dist/img/avatar.png'; } $Reference_Name = $Emp->Reference_Name; $Reference_ContactNumber = $Emp->Reference_ContactNumber; @@ -202,9 +202,8 @@ if (!empty($EmpDetails)) {
-
+
@@ -213,8 +212,8 @@ if (!empty($EmpDetails)) {
your image + src="" alt="your image" + style="width: 139px;" /> @@ -239,8 +238,8 @@ if (!empty($EmpDetails)) { - + readonly> +
@@ -1004,34 +1003,33 @@ if (!empty($EmpDetails)) { maxlength="14" onchange="ValidateAadhar();" class="form-control" onkeypress="return isNumberKey(event)" required - value=""> + value="">
+ maxlength="255" class="form-control" value="Aadhar" + readonly>
+ if (!empty($aadharFile)) { ?>
- - - -
- -
- - + + + +
+ +
+ +
-
- +
+
- +
@@ -1042,33 +1040,32 @@ if (!empty($EmpDetails)) { onchange="validatePAN();" class="form-control" pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}" title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) " - onkeypress="return alpha(event);" - value="" - > + onkeypress="return alpha(event);" value="">
+ maxlength="255" class="form-control" value="PAN" + readonly>
- +
- - - -
- -
- - + + + + + +
+ +

- +
@@ -1077,36 +1074,35 @@ if (!empty($EmpDetails)) { + value="">
+ maxlength="255" class="form-control" value="Passport" + readonly>
- +
- - - -
- -
- - + + + + + +
+ +

- + @@ -1118,23 +1114,23 @@ if (!empty($EmpDetails)) { maxlength="255" class="form-control" value="Bank Passbook" readonly> - +
- - - -
- -
- - + + + + + +
+ +

- +
@@ -1143,25 +1139,25 @@ if (!empty($EmpDetails)) { + value="">
- +
- - - -
- -
- - + + + + + +
+ +

- + @@ -1211,8 +1207,8 @@ if (!empty($EmpDetails)) {
+ The last character should be any number from 1 to 9.">
@@ -1698,17 +1693,16 @@ if (!empty($EmpDetails)) { } function ValidatePassport() { - var regsaid = /^[A-Z][1-9]\d\s?\d{4}[1-9]$/ig; - var passport = $("#passportno").val().trim(); + var regsaid = /^[A-Z][1-9]\d\s?\d{4}[1-9]$/; + + var passport = capitalizeFirstLetter($("#passportno").val().trim()); + if (regsaid.test(passport) == false) { alert('You have entered invalid Passport.'); - alert(` The first character must be an uppercase alphabet. - The next two characters should be numbers, - with the first character ranging from 1 to 9 and the second character from 0 to 9. - It may include zero or one white space character. - The subsequent four characters can be any number from 0 to 9. - The last character should be any number from 1 to 9."`); - return; + alert(`The first character must be an uppercase alphabet. The next two characters should be numbers,with the first character ranging from 1 to 9 and the second character from 0 to 9. It may include zero or one white space character. The subsequent four characters can be any number from 0 to 9. The last character should be any number from 1 to 9."`); + return (false); + } else { + return true; } } @@ -2063,16 +2057,25 @@ if (!empty($EmpDetails)) { + + + + \ No newline at end of file diff --git a/app/Views/editconfig.php b/app/Views/editconfig.php index 17a975de..ac45b72f 100755 --- a/app/Views/editconfig.php +++ b/app/Views/editconfig.php @@ -25,18 +25,19 @@ if (!empty($master)) {
-
-
-

Edit Config Details

- Back -
+
+
+

Edit Config Details

+ Back
+
getFlashdata('error'); if ($error) { - ?> + ?>
getFlashdata('error'); ?> @@ -46,7 +47,7 @@ if (!empty($master)) { getFlashdata('success'); if ($success) { - ?> + ?>
getFlashdata('success'); ?> @@ -93,13 +94,34 @@ if (!empty($master)) { +
+
+
+
+ + +
+ +
+
+ +
- +
@@ -112,17 +134,60 @@ if (!empty($master)) { $index = 0; foreach ($child as $con) { $index++; - ?> - - - + ?> + + + + + " style="isActive == 0) { + echo "display:none"; + } ?>"> + - + - - +
S.NO
ConfigValue; ?>    + isActive == 0) { ?> + + + + + + +     + +    +    + +     + + + + + +
@@ -140,14 +205,14 @@ if (!empty($master)) {
-
-