diff --git a/app/Controllers/Employeedetails.php b/app/Controllers/Employeedetails.php index ae941ba0..b6c0d291 100755 --- a/app/Controllers/Employeedetails.php +++ b/app/Controllers/Employeedetails.php @@ -222,15 +222,11 @@ class Employeedetails extends BaseController $FatherName = $this->request->getPost('FatherName'); $DateofBirth = $this->request->getPost('DateofBirth'); $ContactNumber = $this->request->getPost('ContactNumber'); - $EmailId = $this->request->getPost('emailid'); - $comEmailId = $this->request->getPost('comemailid'); $Gender = $this->request->getPost('gender'); $MartialStatus = $this->request->getPost('MartialStatus'); $BloodGroup = $this->request->getPost('bloodgroup'); $CurrentAddress = $this->request->getPost('currentaddress'); $permanentaddress = $this->request->getPost('permanentaddress'); - $emergencycontactname = $this->request->getPost('emergencycontactname'); - $emergencycontactnumber = $this->request->getPost('emergencycontactnumber'); $desigination = $this->request->getPost('desigination'); $departmentCode = $this->request->getPost('departmentname'); $dateofjoining = $this->request->getPost('dateofjoining'); @@ -300,7 +296,6 @@ class Employeedetails extends BaseController 'Gender' => $Gender, 'DateofBirth' => $DOB, 'ContactNumber' => $ContactNumber, - 'EmailId' => $EmailId, 'BloodGroup' => $BloodGroup, 'MartialStatus' => $MartialStatus, 'DateofJoining' => $DOJ, @@ -309,8 +304,6 @@ class Employeedetails extends BaseController 'Departmentcode' => $departmentCode, 'PresentAddress' => $CurrentAddress, 'PermanentAddress' => $permanentaddress, - 'EmergencyContactName' => $emergencycontactname, - 'EmergencyContactNumber' => $emergencycontactnumber, 'Edu_Qualification' => $eduqualifaction, 'Additional_Qualification' => $addqualification, 'AadharNo' => $aadharno, @@ -327,7 +320,6 @@ class Employeedetails extends BaseController 'Reference_ContactNumber' => $referrercontno, 'Remarks' => $addinfo, 'CreatedBy' => $createdby, - 'personalEmailId' => $comEmailId, 'DriverLicense' => $driverlicense, 'LicenseValidtill' => $License_ExpiryDate, 'VoterID' => $VoterID, @@ -633,29 +625,10 @@ class Employeedetails extends BaseController $EmpId = $this->request->getPost('employeeid'); - //$mail = $this->this->.post('emailid'); - // $this->validator->setRules([ - // 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]', - // 'emailid'=> 'trim|required|valid_email|callback_checkMailEmp', - // 'gender'=> 'callback_Gender_validate', - // 'MartialStatus'=> 'callback_Martial_validate', - // 'bloodgroup'=> 'callback_Blood_validate', - // 'emergencycontactnumber'=> 'trim|required|min_length[10]|max_length[10]', - // 'desigination'=> 'callback_Des_validate', - // 'departmentname'=> 'callback_Dep_validate', - // 'eduqualifaction'=> 'callback_select_validate', - // 'referrercontno'=> 'trim|min_length[10]|max_length[10]', - // 'aadharno'=> 'trim|max_length[14]', - // 'panno'=> 'trim|max_length[10]', - // 'passportno'=> 'trim|min_length[9]|max_length[9]', - // 'accountno'=> 'trim|min_length[10]|max_length[20]', - // 'pfno'=> 'trim|min_length[22]|max_length[22]', - // 'esino'=> 'trim|min_length[10]|max_length[10]']); + - // if ($this->validator->run() == FALSE) { - // $this->ViewEmployee($EmpId); - // } else { + $EmpId = $this->request->getPost('employeeid'); @@ -664,19 +637,12 @@ class Employeedetails extends BaseController $Picture = ""; if ($PictureName != '') { - //echo 'Exists'; - //$Picture = $PictureName; + if (strlen((string)$ModifyPictureName) == 0) { - //echo 'Exists But Not replace'; + $Picture = $PictureName; } else { - // echo "
";
- // // print_r($this->request->getPost());
- // print_r($this->request->getFile('photo'));
- // die;
- //echo 'Exists But Replace';
- //$Picture = $ModifyPictureName;
- //$Picture = $this->editimage($ModifyPictureName);
+
$photo = $this->request->getFile('ModifyImage');
if (!$photo || !$photo->isValid()) {
$photo = $this->request->getFile('photo');
@@ -724,15 +690,12 @@ class Employeedetails extends BaseController
// dd($DateofBirth);
$ContactNumber = $this->request->getPost('ContactNumber');
- $EmailId = $this->request->getPost('emailid');
- $comEmailId = $this->request->getPost('comemailid');
+
$Gender = $this->request->getPost('gender');
$MartialStatus = $this->request->getPost('MartialStatus');
$BloodGroup = $this->request->getPost('bloodgroup');
$CurrentAddress = $this->request->getPost('currentaddress');
$permanentaddress = $this->request->getPost('permanentaddress');
- $emergencycontactname = $this->request->getPost('emergencycontactname');
- $emergencycontactnumber = $this->request->getPost('emergencycontactnumber');
$desigination = $this->request->getPost('desigination');
$departmentCode = $this->request->getPost('departmentname');
$dateofjoining = $this->request->getPost('dateofjoining');
@@ -823,7 +786,6 @@ class Employeedetails extends BaseController
'Gender' => $Gender,
'DateofBirth' => $DOB,
'ContactNumber' => $ContactNumber,
- 'EmailId' => $EmailId,
'BloodGroup' => $BloodGroup,
'MartialStatus' => $MartialStatus,
'DateofJoining' => $DOJ,
@@ -832,8 +794,6 @@ class Employeedetails extends BaseController
'Departmentcode' => $departmentCode,
'PresentAddress' => $CurrentAddress,
'PermanentAddress' => $permanentaddress,
- 'EmergencyContactName' => $emergencycontactname,
- 'EmergencyContactNumber' => $emergencycontactnumber,
'Edu_Qualification' => $eduqualifaction,
'Additional_Qualification' => $addqualification,
'AadharNo' => $aadharno,
@@ -850,7 +810,6 @@ class Employeedetails extends BaseController
'Reference_ContactNumber' => $referrercontno,
'Remarks' => $addinfo,
'UpdatedBY' => $UpdatedBY,
- 'personalEmailId' => $comEmailId,
'DriverLicense' => $driverlicense,
'LicenseValidtill' => $License_ExpiryDate,
'VoterID' => $VoterID,
diff --git a/app/Controllers/User.php b/app/Controllers/User.php
index c1c74bd3..3b7e9b1d 100755
--- a/app/Controllers/User.php
+++ b/app/Controllers/User.php
@@ -1135,7 +1135,7 @@ class User extends BaseController
$userInfo = array();
// $userInfo = array('password' => getHashedPassword($password), 'roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
- $userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
+ $userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate , 'email'=> $this->request->getPost('MailID'));
$result = $this->user_model->editUser($userInfo, $EmpID);
diff --git a/app/Models/User_model.php b/app/Models/User_model.php
index 8098fd00..ed47d868 100755
--- a/app/Models/User_model.php
+++ b/app/Models/User_model.php
@@ -193,9 +193,11 @@ class User_model extends Model
function GetEmployeeDetails($UserId)
{
//echo $UserId;
- $subQuery = 'select EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName from
- t_employee_details EMP join t_departmentdetails DEPT on
- EMP.Departmentcode = DEPT.DEPCode where EMP.EmpID= (select EmpID from tbl_users where userId=?)';
+ $subQuery = 'select EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,user.email as EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName from
+ t_employee_details EMP
+ join t_departmentdetails DEPT on EMP.Departmentcode = DEPT.DEPCode
+ join tbl_users user on EMP.EmpID = user.EmpID
+ where EMP.EmpID= (select EmpID from tbl_users where userId=?)';
$query = $this->db->query($subQuery, array($UserId));
diff --git a/app/Views/addEmployeenew.php b/app/Views/addEmployeenew.php
index a87b77db..95b555e0 100755
--- a/app/Views/addEmployeenew.php
+++ b/app/Views/addEmployeenew.php
@@ -520,8 +520,11 @@
+
+
+
-
+
@@ -581,6 +567,25 @@
+
+ *
+
+
+
+
*
-
+
diff --git a/app/Views/addUser.php b/app/Views/addUser.php
index c55034f6..9bf1ae5f 100755
--- a/app/Views/addUser.php
+++ b/app/Views/addUser.php
@@ -46,20 +46,18 @@
-
-
-
-
+
+
+ *
+
+
-
-
-
-
+
@@ -79,11 +77,7 @@
?>
-
-
-
-
-
+
@@ -171,9 +165,7 @@
success: function(data) {
if (data.success) {
$("#FirstName").val(data.userInfo[0].FirstName);
- $("#LastName").val(data.userInfo[0].LastName);
$("#Designation").val(data.userInfo[0].Designation);
- $("#MailID").val(data.userInfo[0].EmailId);
$("#ContactNo").val(data.userInfo[0].ContactNumber);
$('#loader').hide();
} else {
@@ -189,7 +181,6 @@
} else {
// Clear fields if no employee ID is selected
$("#FirstName").val('');
- $("#LastName").val('');
$("#Designation").val('');
$("#MailID").val('');
$("#ContactNo").val('');
diff --git a/app/Views/editEmployeenew.php b/app/Views/editEmployeenew.php
index bbe9dea6..72db588e 100755
--- a/app/Views/editEmployeenew.php
+++ b/app/Views/editEmployeenew.php
@@ -354,7 +354,7 @@ if (!empty($EmpDetails)) {
-
+
@@ -429,6 +405,32 @@ if (!empty($EmpDetails)) {
+
+
+ *
+
+
+
*
@@ -455,7 +457,7 @@ if (!empty($EmpDetails)) {
-
+
diff --git a/app/Views/editOld.php b/app/Views/editOld.php
index c6926795..d005134a 100755
--- a/app/Views/editOld.php
+++ b/app/Views/editOld.php
@@ -55,26 +55,25 @@ if (!empty($EmpList)) {
-
-
-
-
+
+
+
+ *
+
+
+
-
-
-
-
-
+
-
+