employeedetails changes code
This commit is contained in:
parent
32e02f1149
commit
db07152e2a
@ -226,17 +226,24 @@ class employeedetails extends BaseController
|
||||
$bankbranchname = $this->input->post('bankbranchname');
|
||||
$bankaddress = $this->input->post('bankaddress');
|
||||
$aadharno = $this->input->post('aadharno');
|
||||
$panno = $this->input->post('panno');
|
||||
$panno =strtoupper($this->input->post('panno'));
|
||||
$passportno = $this->input->post('passportno');
|
||||
$ValidTill = $this->input->post('ValidTill');
|
||||
$addinfo = $this->input->post('addinfo');
|
||||
$IsActive = '1';
|
||||
$IsActive = '1';
|
||||
$driverlicense = $this->input->post ( 'driverlicense' );
|
||||
$licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' );
|
||||
$VoterID = $this->input->post ( 'voterID' );
|
||||
$createdby = $this->session->userdata ( 'userId' );
|
||||
$licenseExpiryDate = $this->getDateformat($licenseExpiryDate);
|
||||
|
||||
if($licenseExpiryDate != '')
|
||||
{
|
||||
$License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
$License_ExpiryDate = null;
|
||||
}
|
||||
|
||||
$DOB = $this->getDateformat($DateofBirth);
|
||||
$DOJ = $this->getDateformat($dateofjoining);
|
||||
@ -250,7 +257,7 @@ class employeedetails extends BaseController
|
||||
}
|
||||
|
||||
//echo $DOB;
|
||||
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$licenseExpiryDate,'VoterID'=>$VoterID);
|
||||
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
|
||||
//print_r($Employee);die();
|
||||
$this->load->model('employeedetails_model');
|
||||
$result = $this->employeedetails_model->addNewemployee($Employee);
|
||||
@ -395,7 +402,7 @@ echo "<script>alert('Record Not Saved!');</script>";
|
||||
|
||||
$data['DepartmentList'] = $this->employeedetails_model->getDepartment();
|
||||
$data['EmpDetails'] = $this->employeedetails_model->viewemployee($EmpID);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Employee';
|
||||
$this->global['pageTitle'] = 'Siddharth : View Employee';
|
||||
|
||||
$this->loadViews("editEmployee", $this->global, $data, NULL);
|
||||
|
||||
@ -500,14 +507,14 @@ echo "<script>alert('Record Not Saved!');</script>";
|
||||
$bankbranchname = $this->input->post('bankbranchname');
|
||||
$bankaddress = $this->input->post('bankaddress');
|
||||
$aadharno = $this->input->post('aadharno');
|
||||
$panno = $this->input->post('panno');
|
||||
$panno = strtoupper($this->input->post('panno'));
|
||||
$passportno = $this->input->post('passportno');
|
||||
$ValidTill = $this->input->post('ValidTill');
|
||||
$addinfo = $this->input->post('addinfo');
|
||||
$driverlicense = $this->input->post ( 'Driverlicense' );
|
||||
$driverlicense = $this->input->post ( 'Driverlicense' );
|
||||
$licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' );
|
||||
$VoterID = $this->input->post ( 'VoterID' );
|
||||
$chked = $this->input->post('isactive');
|
||||
$chked = $this->input->post('isactive');
|
||||
// echo 'chkvalue'. $chked ;
|
||||
if( $chked != '')
|
||||
{
|
||||
@ -520,7 +527,7 @@ echo "<script>alert('Record Not Saved!');</script>";
|
||||
// echo 'chkvalue'. $IsActive ;
|
||||
$UpdatedBY = $this->session->userdata ( 'userId' );
|
||||
|
||||
$licenseExpiryDate = $this->getDateformat($licenseExpiryDate);
|
||||
//$licenseExpiryDate = $this->getDateformat($licenseExpiryDate);
|
||||
$DOB = $this->getDateformat($DateofBirth);
|
||||
$DOJ = $this->getDateformat($dateofjoining);
|
||||
if($ValidTill != '')
|
||||
@ -531,9 +538,18 @@ echo "<script>alert('Record Not Saved!');</script>";
|
||||
{
|
||||
$Valid = null;
|
||||
}
|
||||
|
||||
if($licenseExpiryDate != '')
|
||||
{
|
||||
$License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
$License_ExpiryDate = null;
|
||||
}
|
||||
|
||||
//echo $DOB;
|
||||
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$licenseExpiryDate,'VoterID'=>$VoterID);
|
||||
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'UpdatedBY'=>$UpdatedBY,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
|
||||
|
||||
//print_r($Employee);die();
|
||||
$result = $this->employeedetails_model->UpdateEmployee($Employee,$EmpId);
|
||||
|
||||
@ -303,7 +303,7 @@ class storerequistion_model extends CI_Model
|
||||
// echo 'UserId: '.$UserID . 'From: '.$FromDate .'TO: '. $ToDate. 'Status: '. $Status;
|
||||
|
||||
|
||||
$subQuery = 'select distinct Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Str.Status,Str.CreatedDate,Str.Comments,St.StatusName
|
||||
$subQuery = 'select distinct Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Str.Status,Str.CreatedDate,Str.Comments,St.StatusName,Emp.FirstName
|
||||
from T_Store_Requestion_Master Str
|
||||
join T_Status St on St.StatusCode = Str.Status
|
||||
join T_Employee_Details Emp on Emp.Departmentcode =Str.DepartmentCode
|
||||
@ -328,7 +328,7 @@ class storerequistion_model extends CI_Model
|
||||
function getRequistDetails($StoreReqNo='')
|
||||
{
|
||||
|
||||
$subQuery = 'select Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Dept.DEPCode,Dept.DepartmentName,Cm.CostCenterCode,Cm.CostCenterName from T_Store_Requestion_Master Str
|
||||
$subQuery = 'select Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Dept.DEPCode,Dept.DepartmentName,Cm.CostCenterCode,Cm.CostCenterName,Emp.FirstName from T_Store_Requestion_Master Str
|
||||
join T_DepartmentDetails Dept on Dept.DEPCode = Str.DepartmentCode
|
||||
join T_CostCenter_Master Cm on Cm.CostCenterCode =Str.CostCenterCode
|
||||
where StoreReqNo =? ';
|
||||
|
||||
@ -161,6 +161,26 @@ function validatecomEmail() {
|
||||
}
|
||||
|
||||
}
|
||||
function ValidateAadhar(){
|
||||
var reg = /(?=.*[0-9]).{12}$/;
|
||||
var aadhar = $('aadharno').val();
|
||||
if(aadhar != '')
|
||||
{
|
||||
if(reg.test()== false)
|
||||
{
|
||||
alert('Please Enter Valid Aadhar Number');
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('please Enter Aadhar number');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function validateDriverLicense() {
|
||||
|
||||
@ -225,9 +245,16 @@ $(function() {
|
||||
});
|
||||
$("#ValidTill").datepicker({dateFormat: 'mm/dd/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
|
||||
});
|
||||
$("#LicenseExpiryDate").datepicker({dateFormat: 'mm/dd/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
|
||||
$("#LicenseExpiryDate").datepicker({
|
||||
dateFormat: 'mm/dd/yy',
|
||||
minDate :'now',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-0:+100'
|
||||
|
||||
});
|
||||
|
||||
// $( ".selector" ).datepicker({
|
||||
// dateFormat: 'yy-mm-dd' });
|
||||
|
||||
});
|
||||
|
||||
@ -265,6 +292,17 @@ function onlyAlphabets(evt) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#gender").select2();
|
||||
$("#bloodgroup").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
$("#departmentname").select2();
|
||||
$("#eduqualifaction").select2();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
legend{
|
||||
@ -295,7 +333,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-primary" value="Back">Back</a>
|
||||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-info" value="Back">Back</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
@ -313,7 +351,7 @@ function onlyAlphabets(evt) {
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<form class="form-horizontal" role="form" >
|
||||
<div class="box-body">
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
<legend>Personal Information</legend>
|
||||
@ -333,6 +371,8 @@ function onlyAlphabets(evt) {
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
<span>First Name</span><span class="badge">*</span>
|
||||
@ -342,6 +382,8 @@ function onlyAlphabets(evt) {
|
||||
<div class="col-md-6 pad"><span>Last Name</span><span class="badge">*</span>
|
||||
<input type="text" name="LastName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="LastName" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"><span>Father / Husband Name</span><span class="badge">*</span>
|
||||
<input type="text" name="FatherName" onkeypress="return onlyAlphabets(event);" id="FatherName" maxlength="200"
|
||||
class="form-control" required>
|
||||
@ -349,20 +391,23 @@ function onlyAlphabets(evt) {
|
||||
<div class="col-md-6 pad"><span>Date Of Birth</span><span class="badge">*</span>
|
||||
<input id="DateofBirth" required name="DateofBirth" onkeypress="return false;" maxlength="10" onchange="getAge();" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"><span>Age</span>
|
||||
<input type="text" name="age" id="age" class="form-control" readonly>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Contact Number</span><span class="badge">*</span>
|
||||
<input type="text" name="ContactNumber" onchange="return getMobileValidation();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="ContactNumber" required pattern="(.){10,10}" maxlength="10" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"><span>Personal Email ID</span><span class="badge">*</span>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 pad"><span>Gender</span><span class="badge">*</span>
|
||||
<select id="gender" name="gender" type="text" required class="form-control">
|
||||
<option value="-1">Select Gender</option>
|
||||
<select id="gender" name="gender" type="text" required class="form-control select2">
|
||||
<option value="">Select Gender</option>
|
||||
<?php
|
||||
if(!empty($Gender))
|
||||
{
|
||||
@ -376,18 +421,19 @@ function onlyAlphabets(evt) {
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"> <span>Official Email ID</span><span class="badge">*</span>
|
||||
<input type="email" name="comemailid" id="mail" required maxlength="100" class="form-control">
|
||||
<input type="email" name="comemailid" id="mail" required maxlength="100" class="form-control">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
<div class="col-md-6 " style="padding:0px;">
|
||||
<div class="col-md-6 pad" style="padding: 10px 0px;">
|
||||
<div class="col-md-6">
|
||||
|
||||
<span>Blood group</span><span class="badge">*</span>
|
||||
<select id="bloodgroup" name="bloodgroup" required class="form-control">
|
||||
<option value="-1">Select Blood group</option>
|
||||
<select id="bloodgroup" name="bloodgroup" required class="form-control select2">
|
||||
<option value="">Select Blood group</option>
|
||||
<?php
|
||||
if(!empty($BloodGroup))
|
||||
{
|
||||
@ -401,9 +447,9 @@ function onlyAlphabets(evt) {
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding:0px;"><span>Marital Status</span><span class="badge">*</span>
|
||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Marital status" class="form-control">
|
||||
<option value="-1">Select Marital Status</option>
|
||||
<div class="col-md-6"><span>Marital Status</span><span class="badge">*</span>
|
||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Marital status" class="form-control select2">
|
||||
<option value="">Select Marital Status</option>
|
||||
<?php
|
||||
if(!empty($Martial))
|
||||
{
|
||||
@ -417,6 +463,7 @@ function onlyAlphabets(evt) {
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -468,9 +515,9 @@ function onlyAlphabets(evt) {
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Designation</span>
|
||||
<select type="text" id="desigination" name="desigination" required class="form-control">
|
||||
<option value="-1">Select Designation</option>
|
||||
<div class="col-md-3"><span>Designation</span><span class="badge">*</span>
|
||||
<select type="text" id="desigination" name="desigination" required class="form-control select2">
|
||||
<option value="">Select Designation</option>
|
||||
<?php
|
||||
if(!empty($Designation))
|
||||
{
|
||||
@ -486,8 +533,8 @@ function onlyAlphabets(evt) {
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"><span>Department</span><span class="badge">*</span>
|
||||
<select type="text" id="departmentname" name="departmentname" required class="form-control">
|
||||
<option value="-1">Select Department</option>
|
||||
<select type="text" id="departmentname" name="departmentname" required class="form-control select2">
|
||||
<option value="">Select Department</option>
|
||||
<?php
|
||||
if(!empty($Department))
|
||||
{
|
||||
@ -512,8 +559,8 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Qualification</span><span class="badge">*</span>
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control">
|
||||
<option value="-1">Select Qualification</option>
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control select2">
|
||||
<option value="">Select Qualification</option>
|
||||
<?php
|
||||
if(!empty($Qualification))
|
||||
{
|
||||
@ -563,10 +610,10 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Aadhar Number</span>
|
||||
<input type="text" id="aadharno" name="aadharno" maxlength="12" class="form-control">
|
||||
<input type="text" id="aadharno" name="aadharno" maxlength="12" onchange="ValidateAadhar();" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>PAN Number</span>
|
||||
<input type="text" id="panno" maxlength="10" style="text-transform: uppercase" name="panno" onchange="validatePAN();" class="form-control">
|
||||
<input type="text" id="panno" maxlength="10" style="text-transform:uppercase" name="panno" onchange="validatePAN();" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>Passport Number</span>
|
||||
<input type="text" id="passportno" maxlength="8" onchange="ValidatePassport();" name="passportno" class="form-control">
|
||||
@ -585,19 +632,23 @@ function onlyAlphabets(evt) {
|
||||
</div>
|
||||
|
||||
<div class="col-md-3"><span>Driving License Expiry Date</span>
|
||||
<input id="LicenseExpiryDate" name="licenseExpiryDate" onkeypress="return false;" maxlength="10" class="form-control">
|
||||
<input id="LicenseExpiryDate" name="licenseExpiryDate" onkeypress="return false;" maxlength="10" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="reset" id="reset" onclick="resetphoto();" class="btn btn-primary" value="Reset" />
|
||||
<input type="submit" onclick="validate();" class="btn btn-primary">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Command -->
|
||||
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<input type="reset" id="reset" onclick="resetphoto();" class="btn btn-primary" value="Reset" />
|
||||
<input type="submit" id="submit" onclick="validate();" class="btn btn-primary" value="Submit" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
@ -646,6 +697,7 @@ function Validate()
|
||||
if($("#FirstName").val().length < 1)
|
||||
{
|
||||
alert('Please Enter FirstName');
|
||||
$("#FirstName").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#LastName").val().length < 1)
|
||||
@ -697,18 +749,21 @@ function Validate()
|
||||
if($("option:selected", $("#gender")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Gender');
|
||||
$('#gender').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("option:selected", $("#MartialStatus")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Martial Status');
|
||||
$('#MartialStatus').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("option:selected", $("#bloodgroup")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Blood group ');
|
||||
$("#bloodgroup").focus();
|
||||
return false;
|
||||
}
|
||||
if($("#currentaddress").val().length < 1)
|
||||
@ -738,16 +793,19 @@ function Validate()
|
||||
if($("option:selected", $("#desigination")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Desigination ');
|
||||
$("#desigination").focus();
|
||||
return false;
|
||||
}
|
||||
if($("option:selected", $("#departmentname")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Department name');
|
||||
$("#departmentname").focus();
|
||||
return false;
|
||||
}
|
||||
if($("option:selected", $("#eduqualifaction")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Qualification');
|
||||
$("#eduqualifaction").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
?>
|
||||
<tr id="<?php echo $index ?>" >
|
||||
<td><a data-toggle="modal" data-target="#myModal" data-id="<%=index%>" data-userid="<?php echo $record->StoreReqNo ?>" ><u><?php echo $record->StoreReqNo ?></u></a></td>
|
||||
<td><?php echo $record->Requestedby?></td>
|
||||
<td><?php echo $record->FirstName?></td>
|
||||
<td ><?php $Cdt = new DateTime($record->ReqDate);
|
||||
$ReqDate= $Cdt->format('d-m-Y');
|
||||
echo $ReqDate;
|
||||
@ -258,7 +258,7 @@ function Reset()
|
||||
if(json.Requist != '')
|
||||
{
|
||||
//alert(json.Requist[0]['Requestedby']) ;
|
||||
$("#Requestedby").val(json.Requist[0]['Requestedby']);
|
||||
$("#Requestedby").val(json.Requist[0]['FirstName']);
|
||||
$("#ReqDate").val(json.Requist[0]['ReqDate']);
|
||||
$("#Desigination").val(json.Requist[0]['DepartmentName']);
|
||||
$("#CostCenter").val(json.Requist[0]['CostCenterName']);
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
$DateofBirth = '';
|
||||
$ContactNumber ='';
|
||||
$EmailId = '';
|
||||
|
||||
$BloodGroup ='';
|
||||
$MartialStatus= '';
|
||||
$DateofJoining = '';
|
||||
@ -97,9 +96,9 @@ if(!empty($EmpDetails))
|
||||
$DriverLicense = $Emp->DriverLicense;
|
||||
$LicenseValidtill = $Emp->LicenseValidtill;
|
||||
$VoterID = $Emp->VoterID;
|
||||
$dtLicenseValidtill = new DateTime($LicenseValidtill);
|
||||
$LicenseValidtill = $dtLicenseValidtill ->format('Y-m-d');
|
||||
|
||||
//$dtLicenseValidtill = new DateTime($LicenseValidtill);
|
||||
//$LicenseValidtill = $dtLicenseValidtill ->format('Y-m-d');
|
||||
//$LicenseValidtill = $Emp->
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,6 +170,19 @@ function validatePAN() {
|
||||
}
|
||||
|
||||
}
|
||||
function ValidateAadhar(){
|
||||
var aadhar = $('#aadhar').val().length;
|
||||
if(aadhar < 12)
|
||||
{
|
||||
alert('Please Enter valid Aadhar Number');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function validateDriverLicense() {
|
||||
|
||||
|
||||
@ -245,18 +257,21 @@ function Validate()
|
||||
if($("option:selected", $("#gender")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Gender');
|
||||
$('#gender').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if($("option:selected", $("#MartialStatus")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Martial Status');
|
||||
$('#MartialStatus').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if($("option:selected", $("#bloodgroup")).val() == "-1")
|
||||
{
|
||||
alert('Please Select Blood group ');
|
||||
$("#bloodgroup").focus();
|
||||
return;
|
||||
}
|
||||
if($("#currentaddress").val().length < 1)
|
||||
@ -281,6 +296,24 @@ function Validate()
|
||||
}
|
||||
else if(!getValidEmergencyNumber())
|
||||
{ return;}
|
||||
// if($("option:selected", $("#desigination")).val() == "-1")
|
||||
// {
|
||||
// alert('Please Select Desigination ');
|
||||
// $("#desigination").focus();
|
||||
// return false;
|
||||
// }
|
||||
// if($("option:selected", $("#departmentname")).val() == "-1")
|
||||
// {
|
||||
// alert('Please Select Department name');
|
||||
// $("#departmentname").focus();
|
||||
// return false;
|
||||
// }
|
||||
// if($("option:selected", $("#eduqualifaction")).val() == "-1")
|
||||
// {
|
||||
// alert('Please Select Qualification');
|
||||
// $("#eduqualifaction").focus();
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ -438,6 +471,15 @@ function ValidatePassport()
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#gender").select2();
|
||||
$("#bloodgroup").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
$("#departmentname").select2();
|
||||
$("#eduqualifaction").select2();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
legend{
|
||||
@ -460,7 +502,7 @@ function ValidatePassport()
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<CENTER>Siddharth Industries - Edit Employee details</CENTER>
|
||||
<CENTER>Siddharth Industries Employee Profile</CENTER>
|
||||
|
||||
</h1>
|
||||
|
||||
@ -468,7 +510,7 @@ function ValidatePassport()
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-primary" value="Back">Back</a>
|
||||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-info" value="Back">Back</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
@ -486,7 +528,7 @@ function ValidatePassport()
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<form class="form-horizontal" role="form" >
|
||||
<div class="box-body">
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
<legend>Personal Information</legend>
|
||||
@ -506,7 +548,7 @@ function ValidatePassport()
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad">
|
||||
<span>First Name</span><span class="badge">*</span>
|
||||
<input type="text" name="FirstName" maxlength="100" value="<?php echo $FirstName ; ?>" id="FirstName" placeholder="First Name" class="form-control" required>
|
||||
@ -515,25 +557,32 @@ function ValidatePassport()
|
||||
<div class="col-md-6 pad"><span>Last Name</span><span class="badge">*</span>
|
||||
<input type="text" name="LastName" maxlength="100" id="LastName" value="<?php echo $LastName ; ?>" placeholder="Last Name" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"><span>Father / Husband Name</span><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>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Date Of Birth</span><span class="badge">*</span>
|
||||
<input id="DateofBirth" required name="DateofBirth" value="<?php echo $DOB ; ?>" maxlength="10" placeholder="Date Of Birth" onchange="getAge();" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"><span>Age</span><span class="badge">*</span>
|
||||
<input type="text" name="age" placeholder="Age" id="age" value="<?php echo $Age ; ?>" class="form-control" readonly>
|
||||
</div>
|
||||
<div class="col-md-6 pad"><span>Contact Number</span><span class="badge">*</span>
|
||||
<input type="text" name="ContactNumber" value="<?php echo $ContactNumber ; ?>" onchange="getMobileValidation();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="ContactNumber" required placeholder="Contact Number" maxlength="10" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"><span>Personal Email ID</span><span class="badge">*</span>
|
||||
<input type="mail" name="emailid" value="<?php echo $EmailId ; ?>" id="email" required placeholder="Email ID" maxlength="100" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 pad"><span>Gender</span><span class="badge">*</span>
|
||||
<select id="gender" name="gender" type="text" placeholder="Gender" required class="form-control">
|
||||
<select id="gender" name="gender" type="text" placeholder="Gender" required class="form-control select2">
|
||||
<option value="<?php echo $Gender ; ?>"><?php echo $Gender; ?></option>
|
||||
<?php
|
||||
if(!empty($GenderList))
|
||||
@ -548,16 +597,18 @@ function ValidatePassport()
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6 pad"> <span>Official Email ID</span><span class="badge">*</span>
|
||||
<input type="email" name="comemailid" id="mail" required value="<?php echo $personalEmailId;?>"maxlength="100" class="form-control">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6 pad">
|
||||
<div class="col-md-6" style="padding:0px;">
|
||||
<div class="col-md-6 pad" style="padding: 10px 0px;">
|
||||
<div class="col-md-6">
|
||||
<span>Blood group</span><span class="badge">*</span>
|
||||
<select id="bloodgroup" name="bloodgroup" required class="form-control">
|
||||
<select id="bloodgroup" name="bloodgroup" required class="form-control select2">
|
||||
<option value="<?php echo $BloodGroup ; ?>"><?php echo $BloodGroup ?></option>
|
||||
<?php
|
||||
if(!empty($BloodGroupList))
|
||||
@ -572,9 +623,9 @@ function ValidatePassport()
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding:0px;">
|
||||
<div class="col-md-6">
|
||||
<span>Marital Status</span><span class="badge">*</span>
|
||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Marital status" class="form-control">
|
||||
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Marital status" class="form-control select2">
|
||||
<option value="<?php echo $MartialStatus?>"><?php echo $MartialStatus; ?></option>
|
||||
<?php
|
||||
if(!empty($MartialList))
|
||||
@ -650,7 +701,7 @@ function ValidatePassport()
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Designation</span><span class="badge">*</span>
|
||||
<select type="text" id="desigination" name="desigination" required class="form-control">
|
||||
<select type="text" id="desigination" name="desigination" required class="form-control select2">
|
||||
<option value="<?php echo $Designation ; ?>"><?php echo $Designation; ?></option>
|
||||
<?php
|
||||
if(!empty($DesignationList))
|
||||
@ -667,7 +718,7 @@ function ValidatePassport()
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"><span>Department</span><span class="badge">*</span>
|
||||
<select type="text" id="departmentname" name="departmentname" required class="form-control">
|
||||
<select type="text" id="departmentname" name="departmentname" required class="form-control select2">
|
||||
<option value="<?php echo $Departmentcode; ?>"><?php echo $Departmentcode." - ".$DepartmentName ;?></option>
|
||||
<?php
|
||||
if(!empty($DepartmentList))
|
||||
@ -695,7 +746,7 @@ function ValidatePassport()
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Qualification</span><span class="badge">*</span>
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control">
|
||||
<select type="text" id="eduqualifaction" name="eduqualifaction" required class="form-control select2">
|
||||
<option value="<?php echo $Edu_Qualification; ?>"><?php echo $Edu_Qualification ; ?></option>
|
||||
<?php
|
||||
if(!empty($QualificationList))
|
||||
@ -749,7 +800,7 @@ function ValidatePassport()
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 pad">
|
||||
<div class="col-md-3"><span>Aadhar Number</span>
|
||||
<input type="text" id="aadharno" name="aadharno" maxlength="12" placeholder="Aadhar Number" class="form-control" value="<?php echo $AadharNo ; ?>">
|
||||
<input type="text" id="aadharno" name="aadharno" maxlength="12" placeholder="Aadhar Number" onchange="ValidateAadhar();" pattern= "[0-9]{12}" class="form-control num" value="<?php echo $AadharNo ; ?>" title=" : 12 digit number"><!-- onkeypress="return isNumberKey(event)"> -->
|
||||
</div>
|
||||
<div class="col-md-3"><span>PAN Number</span>
|
||||
<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 ; ?>">
|
||||
@ -770,7 +821,7 @@ function ValidatePassport()
|
||||
</div>
|
||||
|
||||
<div class="col-md-3"><span>Driving License Expiry Date</span>
|
||||
<input id="LicenseExpiryDate" name="LicenseExpiryDate" value="<?php echo $LicenseValidtill;?>" onkeypress="return false;" class="form-control" placeholder="License Expiry Date" value="">
|
||||
<input id="LicenseExpiryDate" name="LicenseExpiryDate" value="<?php echo $LicenseValidtill;?>" onkeypress="return false;" class="form-control" placeholder="License Expiry Date">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -780,13 +831,16 @@ function ValidatePassport()
|
||||
|
||||
<!-- Command -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="submit" onclick="validate();" value="Submit" class="btn btn-primary">
|
||||
<input type="reset" class="btn btn-primary" value="Cancel" />
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-md-offset-9" style="padding: 10px;">
|
||||
<div class="pull-right">
|
||||
<input type="submit" id="submit" onclick="Validate();" class="btn btn-primary" value="Submit" />
|
||||
<a href="<?php echo base_url() ?>employeeListing" class="btn btn-primary" id="cancel" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user