Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
1be49e8aea
@ -198,6 +198,40 @@ class Employeedetails extends BaseController
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
|
||||
|
||||
function AddNewEmployee()
|
||||
{
|
||||
@ -338,11 +372,25 @@ class Employeedetails extends BaseController
|
||||
if ($result) {
|
||||
|
||||
// Get the uploaded files
|
||||
$files = $this->request->getFiles();
|
||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||
if (isset($files['emp_file'])) {
|
||||
foreach ($files['emp_file'] as $index => $file) {
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$files1 = $this->request->getFile('emp_file1');
|
||||
$files2 = $this->request->getFile('emp_file2');
|
||||
$files3 = $this->request->getFile('emp_file3');
|
||||
$files4 = $this->request->getFile('emp_file4');
|
||||
$files5 = $this->request->getFile('emp_file5');
|
||||
|
||||
$files=[$files1,$files2,$files3,$files4,$files5];
|
||||
|
||||
$fileName1 = $this->request->getPost('file_name1');
|
||||
$fileName2 = $this->request->getPost('file_name2');
|
||||
$fileName3 = $this->request->getPost('file_name3');
|
||||
$fileName4 = $this->request->getPost('file_name4');
|
||||
$fileName5 = $this->request->getPost('file_name5');
|
||||
|
||||
$fileNames=[$fileName1,$fileName2,$fileName3,$fileName4,$fileName5];
|
||||
|
||||
if (!empty($files)) {
|
||||
foreach ($files as $index => $file) {
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
// Move the file to the desired directory
|
||||
$newName = $file->getRandomName();
|
||||
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||
@ -351,16 +399,15 @@ class Employeedetails extends BaseController
|
||||
$this->empFiles->save([
|
||||
'file_name' => $fileNames[$index], // User-entered file name
|
||||
'emp_file' => $newName, // New file name
|
||||
'emp_id' => $result,
|
||||
'emp_id' => $result['EmpID'],
|
||||
'path' => $path
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$EmpID = $result;
|
||||
$EmpID = $result['EmpID'];
|
||||
$Total_Salary = $this->request->getPost('Total_salary');
|
||||
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
||||
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
||||
@ -614,18 +661,45 @@ class Employeedetails extends BaseController
|
||||
}
|
||||
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
|
||||
|
||||
function UpdateEmployee()
|
||||
{
|
||||
|
||||
$EmpId = $this->request->getPost('employeeid');
|
||||
$EmpId = $this->request->getGet('empId');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$EmpId = $this->request->getPost('employeeid');
|
||||
$PictureName = $this->request->getPost('Image');
|
||||
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
||||
$Picture = "";
|
||||
@ -816,12 +890,27 @@ class Employeedetails extends BaseController
|
||||
//print_r($Employee);die();
|
||||
$result = $this->employeedetails_model->UpdateEmployee($Employee, $EmpId);
|
||||
|
||||
|
||||
// Get the uploaded files
|
||||
$files = $this->request->getFiles();
|
||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||
if (isset($files['emp_file'])) {
|
||||
foreach ($files['emp_file'] as $index => $file) {
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$files1 = $this->request->getFile('emp_file1');
|
||||
$files2 = $this->request->getFile('emp_file2');
|
||||
$files3 = $this->request->getFile('emp_file3');
|
||||
$files4 = $this->request->getFile('emp_file4');
|
||||
$files5 = $this->request->getFile('emp_file5');
|
||||
|
||||
$files=[$files1,$files2,$files3,$files4,$files5];
|
||||
|
||||
$fileName1 = $this->request->getPost('file_name1');
|
||||
$fileName2 = $this->request->getPost('file_name2');
|
||||
$fileName3 = $this->request->getPost('file_name3');
|
||||
$fileName4 = $this->request->getPost('file_name4');
|
||||
$fileName5 = $this->request->getPost('file_name5');
|
||||
|
||||
$fileNames=[$fileName1,$fileName2,$fileName3,$fileName4,$fileName5];
|
||||
|
||||
if (!empty($files)) {
|
||||
foreach ($files as $index => $file) {
|
||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
||||
// Move the file to the desired directory
|
||||
$newName = $file->getRandomName();
|
||||
$file->move(ROOTPATH . 'public/uploads/images/emp_files', $newName);
|
||||
@ -832,7 +921,6 @@ class Employeedetails extends BaseController
|
||||
'emp_file' => $newName, // New file name
|
||||
'emp_id' => $EmpId,
|
||||
'path' => $path
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,4 +21,3 @@ class EmpFilesModel extends Model
|
||||
];
|
||||
|
||||
}
|
||||
?>
|
||||
@ -86,7 +86,7 @@ class Employeedetails_model extends Model
|
||||
|
||||
$query = $builder->get();
|
||||
$result = $query->getRowArray();
|
||||
return $result['EmpID'];
|
||||
return $result;
|
||||
} else {
|
||||
|
||||
return 0;
|
||||
|
||||
@ -423,13 +423,7 @@
|
||||
<span class="d-none d-sm-inline">Proof</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" data-target-form="#fileForm">
|
||||
<a href="#fivth" data-toggle="tab" class="nav-link">
|
||||
<!-- <a data-toggle="tab" class="nav-link"> -->
|
||||
<span class="number">5</span>
|
||||
<span class="d-none d-sm-inline">File Upload</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content mb-0 b-0">
|
||||
@ -1003,19 +997,37 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="fourth">
|
||||
<form id="proofForm" method="post" action="#" class="form-horizontal">
|
||||
<form id="proofForm" method="post" action="#" class="form-horizontal" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<div class="row">
|
||||
<div class="col-md-3"><label>Aadhar Number</label> <span
|
||||
<div class="col-md-4"><label>Aadhar Number</label> <span
|
||||
class="badge">*</span>
|
||||
<input type="text" id="aadharno" name="aadharno" maxlength="14"
|
||||
onchange="ValidateAadhar();" class="form-control"
|
||||
onkeypress="return isNumberKey(event)" required>
|
||||
</div>
|
||||
<div class="col-md-3"><label>PAN Number</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Aadhar File Name</label>
|
||||
<input type="text" id="file_name" name="file_name1" maxlength="255"
|
||||
class="form-control" value="Aadhar" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select Aadhar File</label>
|
||||
<input type="file" name="emp_file1" class="">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4"><label>PAN Number</label>
|
||||
<input type="text" id="panno" maxlength="10"
|
||||
style="text-transform:uppercase" name="panno"
|
||||
onchange="validatePAN();" class="form-control"
|
||||
@ -1023,7 +1035,22 @@
|
||||
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) "
|
||||
onkeypress="return alpha(event);">
|
||||
</div>
|
||||
<div class="col-md-3"><label>Passport Number</label>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>PAN File Name</label>
|
||||
<input type="text" id="file_name" name="file_name2" maxlength="255"
|
||||
class="form-control" value="PAN" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select PAN File</label>
|
||||
<input type="file" name="emp_file2" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4"><label>Passport Number</label>
|
||||
<input type="text" id="passportno" maxlength="9"
|
||||
onchange="ValidatePassport();" name="passportno"
|
||||
style="text-transform:uppercase" class="form-control"
|
||||
@ -1031,10 +1058,44 @@
|
||||
The first character cannot be Q, X or Z. (eg:A12 34567)" onkeypress="return alpha(event);">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Passport File Name</label>
|
||||
<input type="text" id="file_name" name="file_name3" maxlength="255"
|
||||
class="form-control" value="Passport" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select Passport File</label>
|
||||
<input type="file" name="emp_file3" class="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-4">
|
||||
<label>Bank PassBok Name</label>
|
||||
<input type="text" id="file_name" name="file_name4" maxlength="255"
|
||||
class="form-control" value="Bank Passbook" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select Bank PassBok File</label>
|
||||
<input type="file" name="emp_file4" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-4">
|
||||
<label>Other Document File Name</label>
|
||||
<input type="text" id="file_name" name="file_name5" maxlength="255"
|
||||
class="form-control" value="Other Document" >
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select Other Document File </label>
|
||||
<input type="file" name="emp_file5" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1042,48 +1103,11 @@
|
||||
<ul class="list-inline wizard mb-0">
|
||||
<li class="previous list-inline-item"><a href="javascript: void(0);" class="btn btn-secondary">Previous</a>
|
||||
</li>
|
||||
<li class="next list-inline-item float-right"><a href="javascript: void(0);" class="btn btn-secondary">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="fivth">
|
||||
<form id="fileForm" method="post" action="#" class="form-horizontal" enctype="multipart/form-data" style="height: 250px;">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<div class="row">
|
||||
<!-- <div class="files"> -->
|
||||
<div class="col-md-4">
|
||||
<label>File Name</label>
|
||||
<input type="text" id="file_name" name="file_name[]" maxlength="255"
|
||||
class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>File</label>
|
||||
<input type="file" name="emp_file[]" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 32px;">
|
||||
<button type="button" class="btn btn-primary btn-sm a1"
|
||||
onclick="appendFilesFileds()" id="day">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
<div id="filesContainer" class="col-12"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<ul class="list-inline wizard mb-0">
|
||||
<li class="previous list-inline-item"><a href="javascript: void(0);" class="btn btn-secondary">Previous</a>
|
||||
</li>
|
||||
<!-- <li class="next list-inline-item float-right"> -->
|
||||
<button type="submit" class="btn btn-primary submit float-right">Submit</button>
|
||||
<!-- </li> -->
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- tab-content -->
|
||||
</div> <!-- end #rootwizard-->
|
||||
@ -1122,28 +1146,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function appendFilesFileds(data) {
|
||||
var newRowHtml = `
|
||||
<div class="pad row">
|
||||
<div class="col-md-4">
|
||||
<span for="file_name">File name</span>
|
||||
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control" value="${data != null && data != '' ? data.file_name : ''}">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span for="emp_file">File</span>
|
||||
<input type="file" name="emp_file[]" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 23px;">
|
||||
<button type="button" class="btn btn-danger btn-sm" id="" onclick="removeContact(this)">Remove</button>
|
||||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#filesContainer').append(newRowHtml);
|
||||
$('.a1').hide();
|
||||
$('#filesContainer .pad:last .a1').show();
|
||||
}
|
||||
|
||||
function removeContact(button) {
|
||||
$(button).closest('.pad').remove();
|
||||
$('#filesContainer .a1').hide();
|
||||
@ -1457,7 +1459,7 @@
|
||||
var combinedFormData = new FormData(); // Use FormData to handle files
|
||||
|
||||
// List of form IDs you want to combine
|
||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
|
||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm',]; // Add all your form IDs here
|
||||
|
||||
formIds.forEach(function(formId) {
|
||||
var $form = $(formId);
|
||||
|
||||
@ -58,8 +58,8 @@ $uano = '';
|
||||
$is_management_team = 0;
|
||||
$esi_applicable = 0;
|
||||
$pf_applicable = 0;
|
||||
$TDS_Rate='';
|
||||
$tds_apllicable=0;
|
||||
$TDS_Rate = '';
|
||||
$tds_apllicable = 0;
|
||||
|
||||
if (!empty($EmpDetails)) {
|
||||
foreach ($EmpDetails as $Emp) {
|
||||
@ -96,8 +96,8 @@ if (!empty($EmpDetails)) {
|
||||
$IFSCCode = $Emp->IFSCCode;
|
||||
$BankBranchName = $Emp->BankBranchName;
|
||||
$BankAddress = $Emp->BankAddress;
|
||||
$TDS_Rate=$Emp->TDS_Rate;
|
||||
$tds_applicable =$Emp->tds_applicable;
|
||||
$TDS_Rate = $Emp->TDS_Rate;
|
||||
$tds_applicable = $Emp->tds_applicable;
|
||||
$PassportNo = $Emp->PassportNo;
|
||||
$Passport_Valid_till = $Emp->Passport_Valid_till;
|
||||
if ($Passport_Valid_till != '' && $Passport_Valid_till != '0000-00-00 00:00:00') {
|
||||
@ -145,6 +145,7 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
@ -191,13 +192,7 @@ if (!empty($EmpDetails)) {
|
||||
<span class="d-none d-sm-inline">Proof</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" data-target-form="#fileForm">
|
||||
<a href="#fivth" data-toggle="tab" class="nav-link">
|
||||
<!-- <a data-toggle="tab" class="nav-link"> -->
|
||||
<span class="number">5</span>
|
||||
<span class="d-none d-sm-inline">File Upload</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content mb-0 b-0">
|
||||
@ -213,8 +208,8 @@ if (!empty($EmpDetails)) {
|
||||
<div class="box-header">
|
||||
|
||||
<img id="profilepicture"
|
||||
src="<?php echo base_url() . $ProfilePic; ?>" alt="your image"
|
||||
style="width: 139px;" />
|
||||
src="<?php echo base_url() . $ProfilePic; ?>"
|
||||
alt="your image" style="width: 139px;" />
|
||||
|
||||
|
||||
|
||||
@ -222,18 +217,20 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<br />
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
<label for="photo">Select profile picture<br /><small>(only .jpg or
|
||||
<label for="photo">Select profile picture<br /><small>(only .jpg
|
||||
or
|
||||
.png)</small>
|
||||
</label>
|
||||
|
||||
<br>
|
||||
|
||||
<input type='file' onchange="readURL(this);" id="photo"
|
||||
value="<?php echo base_url() . $ProfilePic; ?>" name="photo" />
|
||||
value="<?php echo base_url() . $ProfilePic; ?>"
|
||||
name="photo" />
|
||||
|
||||
|
||||
<input type="hidden" name="Image" id="Image"
|
||||
@ -259,11 +256,11 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-row" >
|
||||
<div class="form-row">
|
||||
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?>
|
||||
name="isactive" value="1">
|
||||
<label style="margin-top:8px;" >
|
||||
<label style="margin-top:8px;">
|
||||
Is Active
|
||||
</label>
|
||||
</div>
|
||||
@ -287,11 +284,13 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 pad">
|
||||
<label>Father / Husband Name</label><span class="badge">*</span>
|
||||
<label>Father / Husband Name</label><span
|
||||
class="badge">*</span>
|
||||
<input type="text" name="FatherName" id="FatherName"
|
||||
maxlength="200" value="<?php echo $FatherName; ?>"
|
||||
placeholder="Father / Husband Name" class="form-control"
|
||||
required onkeypress="return onlyAlphabets(event);">
|
||||
placeholder="Father / Husband Name"
|
||||
class="form-control" required
|
||||
onkeypress="return onlyAlphabets(event);">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 pad">
|
||||
@ -300,7 +299,8 @@ if (!empty($EmpDetails)) {
|
||||
value="<?php echo $ContactNumber; ?>"
|
||||
onchange="getMobileValidation();" id="ContactNumber"
|
||||
required placeholder="Contact Number" maxlength="10"
|
||||
class="form-control" onkeypress="return isNumberKey(event)">
|
||||
class="form-control"
|
||||
onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -311,7 +311,8 @@ if (!empty($EmpDetails)) {
|
||||
<div class="col-md-4 pad">
|
||||
<label>Gender</label><span class="badge">*</span>
|
||||
<select id="gender" name="gender" type="text"
|
||||
placeholder="Gender" required class="form-control select2">
|
||||
placeholder="Gender" required
|
||||
class="form-control select2">
|
||||
<option value="<?php echo $Gender; ?>">
|
||||
<?php echo $Gender; ?>
|
||||
</option>
|
||||
@ -346,7 +347,8 @@ if (!empty($EmpDetails)) {
|
||||
<div class="col-md-4 pad">
|
||||
<label>Age</label><span class="badge">*</span>
|
||||
<input type="text" name="age" placeholder="Age" id="age"
|
||||
value="<?php echo $Age; ?>" class="form-control" readonly>
|
||||
value="<?php echo $Age; ?>" class="form-control"
|
||||
readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -501,8 +503,9 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Department</label><span class="badge">*</span>
|
||||
<select type="text" id="departmentname" name="departmentname"
|
||||
required class="form-control select2">
|
||||
<select type="text" id="departmentname"
|
||||
name="departmentname" required
|
||||
class="form-control select2">
|
||||
<option value="<?php echo $Departmentcode; ?>">
|
||||
<?php echo $Departmentcode . " - " . $DepartmentName; ?>
|
||||
</option>
|
||||
@ -552,8 +555,9 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Qualification</label><span class="badge">*</span>
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction"
|
||||
required class="form-control select2">
|
||||
<select type="text" id="eduqualifaction"
|
||||
name="eduqualifaction" required
|
||||
class="form-control select2">
|
||||
<option value="<?php echo $Edu_Qualification; ?>">
|
||||
<?php echo $Edu_Qualification; ?>
|
||||
</option>
|
||||
@ -575,7 +579,8 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
<div class="col-md-3" style="display:none">
|
||||
<label>Additional Qualification</label>
|
||||
<input type="text" id="addqualification" name="addqualification"
|
||||
<input type="text" id="addqualification"
|
||||
name="addqualification"
|
||||
value="<?php echo $Additional_Qualification; ?>"
|
||||
maxlength="100" placeholder="Additional Qualification"
|
||||
class="form-control">
|
||||
@ -592,7 +597,8 @@ if (!empty($EmpDetails)) {
|
||||
<input type="text" id="referrercontno" name="referrercontno"
|
||||
value="<?php echo $Reference_ContactNumber; ?>"
|
||||
onchange="getValidReferNumber();" maxlength="10"
|
||||
placeholder="Referrer Contact Number" class="form-control"
|
||||
placeholder="Referrer Contact Number"
|
||||
class="form-control"
|
||||
onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
|
||||
@ -668,15 +674,16 @@ if (!empty($EmpDetails)) {
|
||||
<div class="col-md-3">
|
||||
<label>Bank Name</label>
|
||||
<input type="text" id="bankbranchname" name="bankbranchname"
|
||||
class="form-control" value="<?php echo $BankBranchName; ?>"
|
||||
required>
|
||||
class="form-control"
|
||||
value="<?php echo $BankBranchName; ?>" required>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Account Number</label>
|
||||
<input type="text" id="accountno" maxlength="20"
|
||||
name="accountno" placeholder="Account Number"
|
||||
class="form-control" value="<?php echo $BankAccountNo; ?>"
|
||||
class="form-control"
|
||||
value="<?php echo $BankAccountNo; ?>"
|
||||
onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@ -773,9 +780,10 @@ if (!empty($EmpDetails)) {
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>ESI Number</label>
|
||||
<input type="text" id="esino" name="esino" maxlength="10"
|
||||
onchange="validateESI();" class="form-control"
|
||||
title=" 10 digit number" value="<?php echo $esino; ?>"
|
||||
<input type="text" id="esino" name="esino"
|
||||
maxlength="10" onchange="validateESI();"
|
||||
class="form-control" title=" 10 digit number"
|
||||
value="<?php echo $esino; ?>"
|
||||
onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
</div>
|
||||
@ -798,9 +806,10 @@ if (!empty($EmpDetails)) {
|
||||
<div class="form-group">
|
||||
<label>UAN</label>
|
||||
<input type="text" id="pfno" name="pfno" maxlength="22"
|
||||
value="<?php echo $pfno; ?>" onchange="validatePF();"
|
||||
class="form-control" style="text-transform:uppercase"
|
||||
pattern="\d{12}" title="12 Digit number"
|
||||
value="<?php echo $pfno; ?>"
|
||||
onchange="validatePF();" class="form-control"
|
||||
style="text-transform:uppercase" pattern="\d{12}"
|
||||
title="12 Digit number"
|
||||
onkeypress="return alpha(event);">
|
||||
</div>
|
||||
</div>
|
||||
@ -847,13 +856,11 @@ if (!empty($EmpDetails)) {
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="tds_applicable"
|
||||
value="<?= $tds_applicable; ?>" <?php echo $tds_applicable == '1' ? 'checked' : ''; ?>
|
||||
onchange="updateSwitchValue(this)"
|
||||
/>
|
||||
onchange="updateSwitchValue(this)" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
|
||||
<label
|
||||
class="mt-4">TDS
|
||||
<label class="mt-4">TDS
|
||||
Applicable</label>
|
||||
|
||||
|
||||
@ -870,8 +877,7 @@ if (!empty($EmpDetails)) {
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
|
||||
<label
|
||||
class="mt-4">ESI
|
||||
<label class="mt-4">ESI
|
||||
Applicable</label>
|
||||
|
||||
|
||||
@ -888,8 +894,7 @@ if (!empty($EmpDetails)) {
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
|
||||
<label
|
||||
class="mt-4">PF
|
||||
<label class="mt-4">PF
|
||||
Applicable</label>
|
||||
|
||||
|
||||
@ -913,85 +918,65 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="fourth">
|
||||
<form id="proofForm" method="post" action="#" class="form-horizontal">
|
||||
<form id="proofForm" method="post" enctype="multipart/form-data" action="#"
|
||||
class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>Aadhar Number</label> <span class="badge">*</span>
|
||||
<input type="text" id="aadharno" name="aadharno" required
|
||||
maxlength="14" placeholder="Aadhar Number"
|
||||
onchange="ValidateAadhar();" class="form-control num"
|
||||
value="<?php echo $AadharNo; ?>" title=" : 12 digit number">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>PAN Number</label>
|
||||
<input type="text" id="panno" style="text-transform: uppercase"
|
||||
maxlength="10" name="panno" placeholder="PAN Number"
|
||||
onchange="validatePAN();" class="form-control"
|
||||
value="<?php echo $PANNo; ?>"
|
||||
onkeypress="return alpha(event);"
|
||||
pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}"
|
||||
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) ">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Passport Number</label>
|
||||
<input type="text" id="passportno" name="passportno"
|
||||
maxlength="9" placeholder="Passport Number"
|
||||
onkeypress="return alpha(event);"
|
||||
onchange="ValidatePassport();" class="form-control"
|
||||
value="<?php echo $PassportNo; ?>"
|
||||
pattern="[Aa-PpRr-WwYy]{1}[1-9]{1}\d{1}\s\d{4}[1-9]{1}"
|
||||
title="The first digit or the last digit will never be 0
|
||||
The first character cannot be Q, X or Z. (eg:A12 34567)"
|
||||
style="text-transform: uppercase">
|
||||
</div>
|
||||
<?php if (count($emp_data) > 0) {
|
||||
|
||||
$aadharFileName = '';
|
||||
$panFileName = '';
|
||||
$passportFileName = '';
|
||||
$bankPassBookFileName = '';
|
||||
$otherDocumentFileName = '';
|
||||
$aadharFile = '';
|
||||
$panFile = '';
|
||||
$passportFile = '';
|
||||
$bankPassBookFile = '';
|
||||
$otherDocumentFile = '';
|
||||
|
||||
foreach ($emp_data as $emp_proofFile) {
|
||||
|
||||
if ($emp_proofFile['file_name'] == 'Aadhar') {
|
||||
$aadharFileName = $emp_proofFile['file_name'];
|
||||
$aadharFile = $emp_proofFile['emp_file'];
|
||||
|
||||
} elseif ($emp_proofFile['file_name'] == 'PAN') {
|
||||
$panFileName = $emp_proofFile['file_name'];
|
||||
$panFile = $emp_proofFile['emp_file'];
|
||||
} elseif ($emp_proofFile['file_name'] == 'Passport') {
|
||||
$passportFileName = $emp_proofFile['file_name'];
|
||||
$passportFile = $emp_proofFile['emp_file'];
|
||||
} elseif ($emp_proofFile['file_name'] == 'Bank Passbook') {
|
||||
$bankPassBookFileName = $emp_proofFile['file_name'];
|
||||
$bankPassBookFile = $emp_proofFile['emp_file'];
|
||||
} else {
|
||||
$otherDocumentFileName = $emp_proofFile['file_name'];
|
||||
$otherDocumentFile = $emp_proofFile['emp_file'];
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
</form>
|
||||
<ul class="list-inline wizard mb-0">
|
||||
<li class="previous list-inline-item"><a href="javascript: void(0);"
|
||||
class="btn btn-secondary">Previous</a>
|
||||
</li>
|
||||
<li class="next list-inline-item float-right"><a href="javascript: void(0);"
|
||||
class="btn btn-secondary">Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="fivth">
|
||||
<form id="fileForm" method="post" action="#" class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<!-- <div class="row"> -->
|
||||
<!-- <div class="files"> -->
|
||||
|
||||
<?php if (count($emp_data) > 0) { ?>
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php foreach ($emp_data as $key => $value) { ?>
|
||||
|
||||
<div class="row">
|
||||
<!-- previous code -->
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<label>File Name</label>
|
||||
<input type="text" maxlength="255" class="form-control"
|
||||
value="<?php echo $value['file_name']; ?>" readonly>
|
||||
value="" readonly>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="margin-top: 32px;">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $value['emp_file']; ?>"
|
||||
<a href=""
|
||||
download>
|
||||
<i class="fa fa-download" aria-hidden="true"
|
||||
style="font-size: 25px;"></i>
|
||||
@ -999,57 +984,295 @@ if (!empty($EmpDetails)) {
|
||||
</div>
|
||||
<div class="col-md-4" align="left" style="margin-top: 32px;">
|
||||
<button type="button" class="btn btn-danger btn-sm"
|
||||
id="<?= $value['id']; ?>"
|
||||
id=""
|
||||
onclick="removeContact(this)">Delete
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm a1"
|
||||
onclick="appendFilesFileds()" id="day"
|
||||
style="display: inline-block;">
|
||||
Add New File
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
} else { ?>
|
||||
</div> -->
|
||||
|
||||
<!-- new code -->
|
||||
<div class="row">
|
||||
<div class="col-md-4"><label>Aadhar Number</label> <span
|
||||
class="badge">*</span>
|
||||
<input type="text" id="aadharno" name="aadharno"
|
||||
maxlength="14" onchange="ValidateAadhar();"
|
||||
class="form-control"
|
||||
onkeypress="return isNumberKey(event)" required
|
||||
value="<?=$AadharNo?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Aadhar File Name</label>
|
||||
<input type="text" id="file_name" name="file_name1"
|
||||
maxlength="255" class="form-control"
|
||||
value="Aadhar" readonly>
|
||||
</div>
|
||||
<?php
|
||||
if(!empty($aadharFile)){ ?>
|
||||
<div class="col-md-1">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $aadharFile; ?>"
|
||||
download>
|
||||
<i class="fa fa-download mt-4" aria-hidden="true"
|
||||
style="font-size: 25px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="col-md-1"></div>
|
||||
<?php }?>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>File Name</label>
|
||||
<input type="text" id="file_name" name="file_name[]"
|
||||
maxlength="255" class="form-control">
|
||||
<label>Update Aadhar File</label>
|
||||
<input type="file" name="emp_file1" class=""
|
||||
value="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4"><label>PAN Number</label>
|
||||
<input type="text" id="panno" maxlength="10"
|
||||
style="text-transform:uppercase" name="panno"
|
||||
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="<?=$PANNo?>"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>PAN File Name</label>
|
||||
<input type="text" id="file_name" name="file_name2"
|
||||
maxlength="255" class="form-control" value="PAN" readonly>
|
||||
</div>
|
||||
<?php if(!empty($panFile)) { ?>
|
||||
<div class="col-md-1">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $panFile; ?>"
|
||||
download>
|
||||
<i class="fa fa-download mt-4" aria-hidden="true"
|
||||
style="font-size: 25px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="col-md-1"></div>
|
||||
<?php }?>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Update PAN File</label>
|
||||
<input type="file" name="emp_file2" class="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4"><label>Passport Number</label>
|
||||
<input type="text" id="passportno" maxlength="9"
|
||||
onchange="ValidatePassport();" name="passportno"
|
||||
style="text-transform:uppercase" class="form-control"
|
||||
pattern="[aA-prPR-wyWY]{1}[1-9]{1}\d{1}\s\d{4}[1-9]{1}"
|
||||
title="The first digit or the last digit will never be 0
|
||||
The first character cannot be Q, X or Z. (eg:A12 34567)"
|
||||
onkeypress="return alpha(event);"
|
||||
value="<?=$PassportNo?>"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Passport File Name</label>
|
||||
<input type="text" id="file_name" name="file_name3"
|
||||
maxlength="255" class="form-control" value="Passport" readonly>
|
||||
</div>
|
||||
<?php if(!empty($passportFile)){?>
|
||||
<div class="col-md-1">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $passportFile; ?>"
|
||||
download>
|
||||
<i class="fa fa-download mt-4" aria-hidden="true"
|
||||
style="font-size: 25px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="col-md-1"></div>
|
||||
<?php }?>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Update Passport File</label>
|
||||
<input type="file" name="emp_file3" class="">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-3">
|
||||
<label>Bank PassBok Name</label>
|
||||
<input type="text" id="file_name" name="file_name4"
|
||||
maxlength="255" class="form-control"
|
||||
value="Bank Passbook" readonly>
|
||||
</div>
|
||||
<?php if(!empty($bankPassBookFile)){?>
|
||||
<div class="col-md-1">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $bankPassBookFile; ?>"
|
||||
download>
|
||||
<i class="fa fa-download mt-4" aria-hidden="true"
|
||||
style="font-size: 25px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="col-md-1"></div>
|
||||
<?php }?>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Update Bank PassBok File</label>
|
||||
<input type="file" name="emp_file4" class="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-3">
|
||||
<label> Other Document File Name</label>
|
||||
<input type="text" id="file_name" name="file_name5"
|
||||
maxlength="255" class="form-control"
|
||||
value="<?= $otherDocumentFileName?>" >
|
||||
</div>
|
||||
<?php if(!empty($otherDocumentFile)){?>
|
||||
<div class="col-md-1">
|
||||
<a href="<?php echo base_url() . 'public/uploads/images/emp_files/' . $otherDocumentFile; ?>"
|
||||
download>
|
||||
<i class="fa fa-download mt-4" aria-hidden="true"
|
||||
style="font-size: 25px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<div class="col-md-1"></div>
|
||||
<?php }?>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Update Other Document File </label>
|
||||
<input type="file" name="emp_file5" class="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"><label>Aadhar Number</label> <span
|
||||
class="badge">*</span>
|
||||
<input type="text" id="aadharno" name="aadharno"
|
||||
maxlength="14" onchange="ValidateAadhar();"
|
||||
class="form-control"
|
||||
onkeypress="return isNumberKey(event)" required>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>File</label>
|
||||
<input type="file" name="emp_file[]" class="form-control">
|
||||
<label>Aadhar File Name</label>
|
||||
<input type="text" id="file_name" name="file_name1"
|
||||
maxlength="255" class="form-control" value="Aadhar">
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 32px;">
|
||||
<button type="button" class="btn btn-primary btn-sm a1"
|
||||
onclick="appendFilesFileds()" id="day">
|
||||
Add
|
||||
</button>
|
||||
<div class="col-md-4">
|
||||
<label>Select Aadhar File</label>
|
||||
<input type="file" name="emp_file1" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4"><label>PAN Number</label>
|
||||
<input type="text" id="panno" maxlength="10"
|
||||
style="text-transform:uppercase" name="panno"
|
||||
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);">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>PAN File Name</label>
|
||||
<input type="text" id="file_name" name="file_name2"
|
||||
maxlength="255" class="form-control" value="PAN">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select PAN File</label>
|
||||
<input type="file" name="emp_file2" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4"><label>Passport Number</label>
|
||||
<input type="text" id="passportno" maxlength="9"
|
||||
onchange="ValidatePassport();" name="passportno"
|
||||
style="text-transform:uppercase" class="form-control"
|
||||
pattern="[aA-prPR-wyWY]{1}[1-9]{1}\d{1}\s\d{4}[1-9]{1}"
|
||||
title="The first digit or the last digit will never be 0
|
||||
The first character cannot be Q, X or Z. (eg:A12 34567)"
|
||||
onkeypress="return alpha(event);">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Passport File Name</label>
|
||||
<input type="text" id="file_name" name="file_name3"
|
||||
maxlength="255" class="form-control" value="Passport">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Select Passport File</label>
|
||||
<input type="file" name="emp_file3" class="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-4">
|
||||
<label>Bank PassBok Name</label>
|
||||
<input type="text" id="file_name" name="file_name4"
|
||||
maxlength="255" class="form-control"
|
||||
value="Bank Passbook">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Bank PassBok File</label>
|
||||
<input type="file" name="emp_file4" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-4">
|
||||
<label>Other Document File Name</label>
|
||||
<input type="text" id="file_name" name="file_name5"
|
||||
maxlength="255" class="form-control"
|
||||
value="Other Document">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Other Document File </label>
|
||||
<input type="file" name="emp_file5" class="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="filesContainer" class="col-12"></div>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<ul class="list-inline wizard mb-0">
|
||||
<li class="previous list-inline-item"><a href="javascript: void(0);"
|
||||
class="btn btn-secondary">Previous</a>
|
||||
</li>
|
||||
<!-- <li class="next list-inline-item float-right"> -->
|
||||
<button type="submit" class="btn btn-primary submit float-right">Submit</button>
|
||||
<!-- </li> -->
|
||||
<li class="next list-inline-item float-right">
|
||||
<button type="submit"
|
||||
class="btn btn-primary submit float-right">Submit</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div> <!-- tab-content -->
|
||||
</div> <!-- end #rootwizard-->
|
||||
@ -1065,7 +1288,7 @@ if (!empty($EmpDetails)) {
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function(e) {
|
||||
reader.onload = function (e) {
|
||||
$('#profilepicture')
|
||||
.attr('src', e.target.result)
|
||||
.width(166)
|
||||
@ -1078,8 +1301,8 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#checksame').click(function() {
|
||||
$(function () {
|
||||
$('#checksame').click(function () {
|
||||
if ($('#checksame').prop('checked')) {
|
||||
|
||||
$('#permanentaddress').val($('#currentaddress').val());
|
||||
@ -1414,7 +1637,7 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$(function () {
|
||||
var d = new Date();
|
||||
|
||||
var month = d.getMonth();
|
||||
@ -1476,14 +1699,14 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
$("#gender").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
$("#departmentname").select2();
|
||||
$("#eduqualifaction").select2();
|
||||
$("#work_location").select2();
|
||||
document.getElementById('aadharno').addEventListener('input', function(e) {
|
||||
document.getElementById('aadharno').addEventListener('input', function (e) {
|
||||
e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim();
|
||||
});
|
||||
});
|
||||
@ -1534,28 +1757,6 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
}
|
||||
|
||||
function appendFilesFileds(data) {
|
||||
var newRowHtml = `
|
||||
<div class="pad row">
|
||||
<div class="col-md-4">
|
||||
<span for="file_name">File name</span>
|
||||
<input type="text" id="file_name" name="file_name[]" maxlength="255" class="form-control" value="${data != null && data != '' ? data.file_name : ''}">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span for="emp_file">File</span>
|
||||
<input type="file" name="emp_file[]" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top: 23px;">
|
||||
<button type="button" class="btn btn-danger btn-sm" id="" onclick="removeContact(this)">Remove</button>
|
||||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()">Add</button>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$('#filesContainer').append(newRowHtml);
|
||||
$('.a1').hide();
|
||||
$('#filesContainer .pad:last .a1').show();
|
||||
}
|
||||
|
||||
function removeContact(button) {
|
||||
if (button.id != '') {
|
||||
$('#loader').show();
|
||||
@ -1565,7 +1766,7 @@ if (!empty($EmpDetails)) {
|
||||
},
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>deleteEmployeeFile",
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
$('#loader').hide();
|
||||
if (data) {
|
||||
alert("File removed");
|
||||
@ -1589,7 +1790,7 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
|
||||
|
||||
$("#email").change(function() {
|
||||
$("#email").change(function () {
|
||||
|
||||
var emailId = $('#email').val();
|
||||
if (validateEmail() && emailId != "<?= $EmailId ?>") {
|
||||
@ -1602,14 +1803,14 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>employeeEmailExist",
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
$('#loader').hide(); // Hide the loader after a successful response
|
||||
|
||||
let responseCheck = response.data[0];
|
||||
let responseEmail=response.data[0].EmailId;
|
||||
let responseEmail = response.data[0].EmailId;
|
||||
|
||||
if(responseCheck ){
|
||||
if ( responseEmail == emailId) {
|
||||
if (responseCheck) {
|
||||
if (responseEmail == emailId) {
|
||||
alert(
|
||||
"Another Employee already exists !!.Please Change the mail id");
|
||||
$("#email").val('');
|
||||
@ -1620,17 +1821,17 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
|
||||
},
|
||||
complete: function() {
|
||||
complete: function () {
|
||||
$('#loader').hide(); // Ensure the loader is always hidden after the request completes
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
$('#panno').change(function() {
|
||||
$('#panno').change(function () {
|
||||
|
||||
var panNo = $('#panno').val();
|
||||
if (validatePAN() && panNo != "<?= $PANNo ?>" ) {
|
||||
if (validatePAN() && panNo != "<?= $PANNo ?>") {
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
@ -1639,13 +1840,13 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>employeePANExist",
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
$('#loader').hide();
|
||||
|
||||
let responseCheck = response.data[0];
|
||||
let responsePanNo=response.data[0].PANNo;
|
||||
let responsePanNo = response.data[0].PANNo;
|
||||
|
||||
if(responseCheck ){
|
||||
if (responseCheck) {
|
||||
if (responsePanNo == panNo) {
|
||||
alert(
|
||||
" Employee with this pan number already exists in the database.Please Change the Pan Card Number"
|
||||
@ -1658,17 +1859,17 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
}
|
||||
,
|
||||
complete: function() {
|
||||
complete: function () {
|
||||
$('#loader').hide(); // Ensure the loader is always hidden after the request completes
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
$('#aadharno').change(function() {
|
||||
$('#aadharno').change(function () {
|
||||
|
||||
var aadharNo = $('#aadharno').val();
|
||||
if (ValidateAadhar() && aadharNo != "<?= $AadharNo ?>" ) {
|
||||
if (ValidateAadhar() && aadharNo != "<?= $AadharNo ?>") {
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
@ -1676,17 +1877,17 @@ if (!empty($EmpDetails)) {
|
||||
},
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>employeecheckAadharNoExist",
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
$('#loader').hide();
|
||||
|
||||
|
||||
let responseCheck = response.data[0];
|
||||
let responseAadharNo=response.data[0].AadharNo;
|
||||
let responseAadharNo = response.data[0].AadharNo;
|
||||
|
||||
|
||||
//let response=response.data[0];
|
||||
if(responseCheck ){
|
||||
if ( responseAadharNo == aadharNo) {
|
||||
if (responseCheck) {
|
||||
if (responseAadharNo == aadharNo) {
|
||||
alert(
|
||||
"Another Employee with this aadhar number already exists ..!!.Please Change the Aadhar card Number"
|
||||
);
|
||||
@ -1697,7 +1898,7 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
}
|
||||
,
|
||||
complete: function() {
|
||||
complete: function () {
|
||||
$('#loader').hide(); // Ensure the loader is always hidden after the request completes
|
||||
}
|
||||
|
||||
@ -1706,7 +1907,7 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
});
|
||||
|
||||
$('#bankbranchname').change(function() {
|
||||
$('#bankbranchname').change(function () {
|
||||
|
||||
var bank = $('#bankbranchname').val();
|
||||
|
||||
@ -1714,7 +1915,7 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
var y = <?php echo json_encode($bankdetails, JSON_PRETTY_PRINT) ?>;
|
||||
|
||||
$.each(y, function(idx, obj) {
|
||||
$.each(y, function (idx, obj) {
|
||||
|
||||
if (bank == obj.Bank_name) {
|
||||
$("#ifsccode").val(obj.IFSC);
|
||||
@ -1727,8 +1928,8 @@ if (!empty($EmpDetails)) {
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.next').click(function(e) {
|
||||
$(document).ready(function () {
|
||||
$('.next').click(function (e) {
|
||||
e.preventDefault(); // Prevent default action
|
||||
|
||||
var isValid = true;
|
||||
@ -1737,7 +1938,7 @@ if (!empty($EmpDetails)) {
|
||||
var $forms = $('.tab-pane form');
|
||||
|
||||
// Validate all forms before proceeding
|
||||
$forms.each(function(index) {
|
||||
$forms.each(function (index) {
|
||||
var $form = $(this);
|
||||
if (index <= currentIndex) {
|
||||
// Only validate forms up to the current tab
|
||||
@ -1768,13 +1969,13 @@ if (!empty($EmpDetails)) {
|
||||
// }
|
||||
});
|
||||
|
||||
$('.submit').click(function(e) {
|
||||
$('.submit').click(function (e) {
|
||||
e.preventDefault();
|
||||
var isValid = true;
|
||||
var combinedFormData = new FormData();
|
||||
|
||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm', '#fileForm']; // Add all your form IDs here
|
||||
formIds.forEach(function(formId) {
|
||||
var formIds = ['#accountForm', '#profileForm', '#bankForm', '#proofForm']; // Add all your form IDs here
|
||||
formIds.forEach(function (formId) {
|
||||
var $form = $(formId);
|
||||
|
||||
if (!$form[0].checkValidity()) {
|
||||
@ -1783,15 +1984,15 @@ if (!empty($EmpDetails)) {
|
||||
return false; // Break the loop if any form is invalid
|
||||
}
|
||||
// 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);
|
||||
});
|
||||
// Handle file inputs separately
|
||||
$form.find('input[type="file"]').each(function() {
|
||||
$form.find('input[type="file"]').each(function () {
|
||||
var input = $(this);
|
||||
$.each(input[0].files, function(i, file) {
|
||||
$.each(input[0].files, function (i, file) {
|
||||
combinedFormData.append(input.attr('name'), file);
|
||||
});
|
||||
});
|
||||
@ -1806,11 +2007,11 @@ if (!empty($EmpDetails)) {
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '<?php echo base_url() ?>employeedetails/UpdateEmployee', // Replace with your form submission URL
|
||||
url: '<?php echo base_url() ?>employeedetails/UpdateEmployee?empId=<?= $EmpID ?>',
|
||||
data: combinedFormData,
|
||||
processData: false, // Prevent jQuery from processing the data
|
||||
contentType: false, // Prevent jQuery from setting the content type
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
$('#loader').hide();
|
||||
if (response == 'true') {
|
||||
window.location.href = '<?php echo base_url("employeeListing"); ?>';
|
||||
@ -1818,7 +2019,7 @@ if (!empty($EmpDetails)) {
|
||||
alert('Employee details Not Update...');
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
error: function (error) {
|
||||
$('#loader').hide();
|
||||
console.log('Form submission failed:', error);
|
||||
}
|
||||
@ -1840,7 +2041,7 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
|
||||
// Handle form submission
|
||||
$('#fileForm').on('submit', function(event) {
|
||||
$('#fileForm').on('submit', function (event) {
|
||||
event.preventDefault(); // Prevent default form submission
|
||||
// Your form submission logic here
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user