employee module bug fix for date realted - vadivel j
This commit is contained in:
parent
430b601382
commit
22cee5127c
@ -691,6 +691,9 @@ class Employeedetails extends BaseController
|
|||||||
$LastName = $this->request->getPost('LastName');
|
$LastName = $this->request->getPost('LastName');
|
||||||
$FatherName = $this->request->getPost('FatherName');
|
$FatherName = $this->request->getPost('FatherName');
|
||||||
$DateofBirth = $this->request->getPost('DateofBirth');
|
$DateofBirth = $this->request->getPost('DateofBirth');
|
||||||
|
|
||||||
|
// dd($DateofBirth);
|
||||||
|
|
||||||
$ContactNumber = $this->request->getPost('ContactNumber');
|
$ContactNumber = $this->request->getPost('ContactNumber');
|
||||||
$EmailId = $this->request->getPost('emailid');
|
$EmailId = $this->request->getPost('emailid');
|
||||||
$comEmailId = $this->request->getPost('comemailid');
|
$comEmailId = $this->request->getPost('comemailid');
|
||||||
@ -704,6 +707,9 @@ class Employeedetails extends BaseController
|
|||||||
$desigination = $this->request->getPost('desigination');
|
$desigination = $this->request->getPost('desigination');
|
||||||
$departmentCode = $this->request->getPost('departmentname');
|
$departmentCode = $this->request->getPost('departmentname');
|
||||||
$dateofjoining = $this->request->getPost('dateofjoining');
|
$dateofjoining = $this->request->getPost('dateofjoining');
|
||||||
|
|
||||||
|
// dd($dateofjoining);
|
||||||
|
|
||||||
//$Previousexperience = $this->request->getPost('Previousexperience');
|
//$Previousexperience = $this->request->getPost('Previousexperience');
|
||||||
$pre_experience = $this->request->getPost('Previousexperience');
|
$pre_experience = $this->request->getPost('Previousexperience');
|
||||||
|
|
||||||
@ -728,9 +734,18 @@ class Employeedetails extends BaseController
|
|||||||
$ValidTill = $this->request->getPost('ValidTill');
|
$ValidTill = $this->request->getPost('ValidTill');
|
||||||
$addinfo = $this->request->getPost('addinfo');
|
$addinfo = $this->request->getPost('addinfo');
|
||||||
$driverlicense = $this->request->getPost('driverlicense');
|
$driverlicense = $this->request->getPost('driverlicense');
|
||||||
|
|
||||||
|
|
||||||
|
// dd($driverlicense);
|
||||||
|
|
||||||
$driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null;
|
$driverlicense = $driverlicense !== null && is_string($driverlicense) ? strtoupper($driverlicense) : null;
|
||||||
$licenseExpiryDate = $this->request->getPost('LicenseExpiryDate');
|
$licenseExpiryDate = $this->request->getPost('LicenseExpiryDate');
|
||||||
$VoterID = $this->request->getPost('voterID');
|
$VoterID = $this->request->getPost('voterID');
|
||||||
|
|
||||||
|
|
||||||
|
//dd($VoterID);
|
||||||
|
|
||||||
|
|
||||||
$VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null;
|
$VoterID = $VoterID !== null && is_string($VoterID) ? strtoupper($VoterID) : null;
|
||||||
$pfno = $this->request->getPost('pfno');
|
$pfno = $this->request->getPost('pfno');
|
||||||
$pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null;
|
$pfno = $pfno !== null && is_string($pfno) ? strtoupper($pfno) : null;
|
||||||
@ -752,16 +767,21 @@ class Employeedetails extends BaseController
|
|||||||
$UpdatedBY = $this->session->get('userId');
|
$UpdatedBY = $this->session->get('userId');
|
||||||
|
|
||||||
//$licenseExpiryDate = get_date_time_format($licenseExpiryDate);
|
//$licenseExpiryDate = get_date_time_format($licenseExpiryDate);
|
||||||
$DOB = get_date_format($DateofBirth);
|
|
||||||
$DOJ = get_date_format($dateofjoining);
|
|
||||||
|
|
||||||
|
$DOB = get_date_time_format($DateofBirth);
|
||||||
|
|
||||||
|
$DOJ = get_date_time_format($dateofjoining);
|
||||||
|
|
||||||
if ($ValidTill != '') {
|
if ($ValidTill != '') {
|
||||||
$Valid = get_date_format($ValidTill);
|
$Valid = get_date_time_format($ValidTill);
|
||||||
} else {
|
} else {
|
||||||
$Valid = null;
|
$Valid = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($licenseExpiryDate != '') {
|
if ($licenseExpiryDate != '') {
|
||||||
$License_ExpiryDate = get_date_format($licenseExpiryDate);
|
$License_ExpiryDate = get_date_time_format($licenseExpiryDate);
|
||||||
} else {
|
} else {
|
||||||
$License_ExpiryDate = null;
|
$License_ExpiryDate = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -951,7 +951,7 @@ if (!empty($EmpDetails)) {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Voter ID</label>
|
<label>Voter ID</label>
|
||||||
<input type="text" id="VoterID" name="VoterID" maxlength="12"
|
<input type="text" id="VoterID" name="voterID" maxlength="12"
|
||||||
value="<?php echo $VoterID; ?>" class="form-control"
|
value="<?php echo $VoterID; ?>" class="form-control"
|
||||||
placeholder="VoterID" onkeypress="return alpha(event);"
|
placeholder="VoterID" onkeypress="return alpha(event);"
|
||||||
style="text-transform: uppercase">
|
style="text-transform: uppercase">
|
||||||
@ -962,7 +962,7 @@ if (!empty($EmpDetails)) {
|
|||||||
<input type="text" id="Driverlicense" maxlength="16"
|
<input type="text" id="Driverlicense" maxlength="16"
|
||||||
onchange="validateDriverLicense();"
|
onchange="validateDriverLicense();"
|
||||||
pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}"
|
pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}"
|
||||||
value="<?php echo $DriverLicense; ?>" name="Driverlicense"
|
value="<?php echo $DriverLicense; ?>" name="driverlicense"
|
||||||
title="EX:TN82 12345678900" class="form-control"
|
title="EX:TN82 12345678900" class="form-control"
|
||||||
placeholder="Driverlicense"
|
placeholder="Driverlicense"
|
||||||
style="text-transform: uppercase"
|
style="text-transform: uppercase"
|
||||||
@ -1770,6 +1770,7 @@ if (!empty($EmpDetails)) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var isValid = true;
|
var isValid = true;
|
||||||
var combinedFormData = new FormData();
|
var combinedFormData = new FormData();
|
||||||
|
|
||||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
|
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
|
||||||
formIds.forEach(function(formId) {
|
formIds.forEach(function(formId) {
|
||||||
var $form = $(formId);
|
var $form = $(formId);
|
||||||
@ -1781,6 +1782,8 @@ if (!empty($EmpDetails)) {
|
|||||||
}
|
}
|
||||||
// Append the form data to FormData
|
// Append the form data to FormData
|
||||||
$form.serializeArray().forEach(function(field) {
|
$form.serializeArray().forEach(function(field) {
|
||||||
|
console.log(field.name);
|
||||||
|
console.log(field.value);
|
||||||
combinedFormData.append(field.name, field.value);
|
combinedFormData.append(field.name, field.value);
|
||||||
});
|
});
|
||||||
// Handle file inputs separately
|
// Handle file inputs separately
|
||||||
@ -1809,7 +1812,7 @@ if (!empty($EmpDetails)) {
|
|||||||
|
|
||||||
console.log('Form submitted successfully:', response == 'true');
|
console.log('Form submitted successfully:', response == 'true');
|
||||||
if (response == 'true') {
|
if (response == 'true') {
|
||||||
window.location.href = '<?php echo base_url("employeeListing"); ?>';
|
// window.location.href = '<?php echo base_url("employeeListing"); ?>';
|
||||||
} else {
|
} else {
|
||||||
alert('Employee details Not Update...');
|
alert('Employee details Not Update...');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user