employee job resposibility added : kdk
This commit is contained in:
parent
13fd695964
commit
b68081dd59
@ -174,6 +174,7 @@ class Employee_Controller extends REST_Controller {
|
||||
// add employee without image
|
||||
public function addEmployee_post() {
|
||||
$data = $this->post('data');
|
||||
|
||||
$createdBy = $this->post('createdBy');
|
||||
|
||||
$imagename = '';
|
||||
@ -199,7 +200,8 @@ class Employee_Controller extends REST_Controller {
|
||||
$req['Qualification'] = $data['qualificaion'];
|
||||
$req['BranchCode'] = $data['homeBranch'];
|
||||
$req['IsActive'] = $data['switchsetting'];
|
||||
$req['DOJ'] = $data['dateofjoining'];
|
||||
$req['DOJ'] = $data['dateofjoining'];
|
||||
$req['JobResponsibility'] = $data['jobResponsibility'];
|
||||
// $req['DOJ'] = $data['dateofjoining'];
|
||||
$req['ListCode'] = $data['role'];
|
||||
$req['CreatedBy'] = $createdBy;
|
||||
@ -254,6 +256,7 @@ class Employee_Controller extends REST_Controller {
|
||||
$req['BranchCode'] = $temp['homeBranch'];
|
||||
$req['IsActive'] = $temp['switchsetting'];
|
||||
$req['DOJ'] = $temp['dateofjoining'];
|
||||
$req['JobResponsibility'] = $data['jobResponsibility'];
|
||||
// $req['DOJ'] = $data['dateofjoining'];
|
||||
$req['ListCode'] = $temp['role'];
|
||||
$req['CreatedBy'] = $createdBy;
|
||||
@ -328,6 +331,7 @@ class Employee_Controller extends REST_Controller {
|
||||
$req['OtherID'] = $data['OtherID'];
|
||||
$req['OtherIDDetails'] = $data['OtherIDDetails'];
|
||||
$req['Qualification'] = $data['Qualification'];
|
||||
$req['JobResponsibility'] = $data['JobResponsibility'];
|
||||
// $req['ProfilePicPath'] = $data['ProfilePicPath'];
|
||||
// $req['BranchCode'] = $data['BranchCode'];
|
||||
$req['IsActive'] = $data['IsActive'];
|
||||
@ -382,6 +386,7 @@ class Employee_Controller extends REST_Controller {
|
||||
$req['OtherIDDetails'] = $data['OtherIDDetails'];
|
||||
$req['Qualification'] = $data['Qualification'];
|
||||
$req['ProfilePicPath'] = $data['ProfilePicPath'];
|
||||
$req['JobResponsibility'] = $data['JobResponsibility'];
|
||||
// $req['BranchCode'] = $data['BranchCode'];
|
||||
$req['IsActive'] = $data['IsActive'];
|
||||
// $req['DOJ'] = date('d-m-Y', strtotime($data['DOJ']) );
|
||||
@ -435,11 +440,12 @@ class Employee_Controller extends REST_Controller {
|
||||
$empFor = $this->post('empFor');
|
||||
$reqBanch['BranchCode'] = $this->post('updateBranch');
|
||||
$req['ListCode'] = $this->post('updateRole');
|
||||
$reqJOBRES['JobResponsibility'] = $this->post('JobResponsibility');
|
||||
$req['UpdatedBy'] = $this->post('updateBy');
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
|
||||
$updateBranch = $this->employee_model->upate_employee_branch( $empFor, $reqBanch, $req, $req['UpdatedBy'], $req['UpdatedOn'] );// Check if the employee exist
|
||||
$updateBranch = $this->employee_model->upate_employee_branch( $empFor, $reqBanch, $req, $req['UpdatedBy'], $req['UpdatedOn'], $reqJOBRES );// Check if the employee exist
|
||||
if ($updateBranch)
|
||||
{
|
||||
$updateBranch['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -87,7 +87,7 @@ class DayBook_model extends CI_Model
|
||||
$this->db->update(DAYBOOKMASTER, $Arr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['updateDetailsStatus'] = true;
|
||||
$result['message'] = "Successfully details Updated";
|
||||
$result['message'] = "Successfully Details Updated";
|
||||
} else {
|
||||
$result['updateDetailsStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
@ -101,7 +101,7 @@ class DayBook_model extends CI_Model
|
||||
$this->db->insert(DAYBOOKMASTER, $Arr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addDayBookStatus'] = true;
|
||||
$result['message'] = "Successfully DayBook details added";
|
||||
$result['message'] = "Successfully DayBook Details Added";
|
||||
|
||||
} else {
|
||||
$result['addDayBookStatus'] = false;
|
||||
|
||||
@ -26,7 +26,7 @@ class DaybookMaster_model extends CI_Model {
|
||||
$this->db->insert(INCOMEOUTCOMEMASTER, $arrayDetails);
|
||||
if($this->db->affected_rows() == '1'){
|
||||
$result['addStatus'] = true;
|
||||
$result['message'] = "Successfully day book details is added";
|
||||
$result['message'] = "Successfully Day Book Master Details Added";
|
||||
}
|
||||
else {
|
||||
$result['addStatus'] = false;
|
||||
@ -100,7 +100,7 @@ class DaybookMaster_model extends CI_Model {
|
||||
$this->db->update(INCOMEOUTCOMEMASTER, $arrayDetails);
|
||||
if($this->db->affected_rows() == '1'){
|
||||
$result['updateStatus'] = true;
|
||||
$result['message'] = "Successfully day book details is updated";
|
||||
$result['message'] = "Successfully Day Book Details Updated";
|
||||
}
|
||||
else {
|
||||
$result['updateStatus'] = false;
|
||||
@ -109,8 +109,6 @@ class DaybookMaster_model extends CI_Model {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
@ -332,6 +332,7 @@ class Employee_model extends CI_Model
|
||||
// add employee
|
||||
public function add_employee($empArr, $createdBy, $imageName, $imageSource, $imageSize)
|
||||
{
|
||||
// print_r($empArr);exit();
|
||||
if( $imageSource == '') { // add employee without image
|
||||
$imageNameDb = 'default.jpeg';
|
||||
$empArr['ProfilePicPath'] = "employee/".$imageNameDb;
|
||||
@ -513,7 +514,7 @@ class Employee_model extends CI_Model
|
||||
// get employee branch details
|
||||
public function get_employee_branch($staffId)
|
||||
{
|
||||
$this->db->select('t3.ListCode, t3.ListName');
|
||||
$this->db->select('t3.ListCode, t3.ListName, t4.JobResponsibility');
|
||||
$this->db->from('' . PICK_LIST_DETAILS . ' as t3');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT');
|
||||
$this->db->where('t4.StaffID', $staffId);
|
||||
@ -552,7 +553,7 @@ class Employee_model extends CI_Model
|
||||
}
|
||||
|
||||
// update employee branch details
|
||||
public function upate_employee_branch($empFor, $reqBanch, $req, $createby, $createon)
|
||||
public function upate_employee_branch($empFor, $reqBanch, $req, $createby, $createon, $reqJOBRES)
|
||||
{
|
||||
// print_r( count($reqBanch['BranchCode']));exit();
|
||||
if( count($reqBanch['BranchCode']) > 1) {
|
||||
@ -567,7 +568,8 @@ class Employee_model extends CI_Model
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
// $branchCode = $this->get_branch_code($reqBanch['BranchCode'][0]);
|
||||
$branchCode = $reqBanch['BranchCode'][0];
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode' WHERE StaffID='$empFor'";
|
||||
$roleResponsibility = $reqJOBRES['JobResponsibility'];
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode', JobResponsibility='$roleResponsibility' WHERE StaffID='$empFor'";
|
||||
// update branch to staff table
|
||||
if ($this->db->query($sql) == '1') {
|
||||
$this->db->where('StaffID', $empFor);
|
||||
@ -612,7 +614,8 @@ class Employee_model extends CI_Model
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
// $branchCode = $this->get_branch_code($reqBanch['BranchCode'][0]);
|
||||
$branchCode = $reqBanch['BranchCode'][0];
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode' WHERE StaffID='$empFor'";
|
||||
$roleResponsibility = $reqJOBRES['JobResponsibility'];
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode', JobResponsibility='$roleResponsibility' WHERE StaffID='$empFor'";
|
||||
// update branch to staff table
|
||||
if ($this->db->query($sql) == '1') {
|
||||
$this->db->where('StaffID', $empFor);
|
||||
|
||||
@ -43,6 +43,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
'dateofjoining': '',
|
||||
'dateofjoining': '',
|
||||
'role': '',
|
||||
'jobResponsibility': '',
|
||||
'switchsetting': true,
|
||||
};
|
||||
var data = '';
|
||||
@ -442,6 +443,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
'dateofjoining': '',
|
||||
'dateofjoining': '',
|
||||
'role': '',
|
||||
'jobResponsibility': '',
|
||||
'switchsetting': true,
|
||||
};
|
||||
}
|
||||
@ -605,6 +607,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
$scope.sendBranchData = {
|
||||
'empFor': p.StaffID,
|
||||
'updateRole': empRole.ListCode,
|
||||
'JobResponsibility': empRole.JobResponsibility,
|
||||
'updateBranch': $scope.arr1,
|
||||
'updateBy': localDetails.localUserID
|
||||
}
|
||||
|
||||
@ -416,6 +416,13 @@
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.role.$dirty && Form.role.$error.required">Role is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.jobResponsibility.$dirty && Form.jobResponsibility.$invalid}">
|
||||
<label>
|
||||
Job Resposibility
|
||||
</label>
|
||||
<textarea placeholder="Enter Job Responsibility" tabindex="20" class="form-control textdsc" name="jobResponsibility" ng-model="empRoleDetail.JobResponsibility"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.jobResponsibility.$dirty && Form.jobResponsibility.$invalid">JOB Responsibility is required</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
@ -20,8 +20,14 @@
|
||||
<div class="row">
|
||||
<div ng-if="loader == true" class="col-md-12" align="center">
|
||||
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
|
||||
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
|
||||
</spinner>
|
||||
<spinner name="html5spinner">
|
||||
<div class="overlay"></div>
|
||||
<div class="spinner">
|
||||
<div class="double-bounce1"></div>
|
||||
<div class="double-bounce2"></div>
|
||||
</div>
|
||||
<div class="please-wait">Please Wait...</div>
|
||||
</spinner>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="emptyData == false" style="min-height: 281px;">
|
||||
@ -92,7 +98,7 @@
|
||||
<th ng-click="sort('EmailID')">Email ID
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th>Status</th>
|
||||
<th>Status</th>
|
||||
<th style="text-align: center;"> Details
|
||||
</th>
|
||||
</tr>
|
||||
@ -104,7 +110,7 @@
|
||||
<td>{{p.Lastname}}</td>
|
||||
<td>{{p.MobileNumber}}</td>
|
||||
<td>{{p.EmailID}}</td>
|
||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">De-Active</span></td>
|
||||
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">De-Active</span></td>
|
||||
<td style="text-align: center;">
|
||||
<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StaffID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StaffID);">
|
||||
@ -112,10 +118,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="editId === p.StaffID" ng-if="editId === p.StaffID">
|
||||
<td colspan="6" ng-include src="'assets/views/editEmployeeDetails.html'"></td>
|
||||
<td colspan="7" ng-include src="'assets/views/editEmployeeDetails.html'"></td>
|
||||
</tr>
|
||||
<tr ng-show="editBranchId === p.StaffID" ng-if="editBranchId === p.StaffID">
|
||||
<td colspan="6" ng-include src="'assets/views/editEmployeeBranchDetails.html'"></td>
|
||||
<td colspan="7" ng-include src="'assets/views/editEmployeeBranchDetails.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -257,7 +263,7 @@
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
|
||||
<!--<pre>Selected date is: <em>{{myModel.dateofbirth}}</em></pre>-->
|
||||
<!--<pre>Selected date is: <em>{{myModel.dateofbirth}}</em></pre>-->
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofbirth.$dirty && Form.dateofbirth.$invalid, 'has-success':Form.dateofbirth.$valid}">
|
||||
<label>
|
||||
@ -268,7 +274,7 @@
|
||||
is-open="startOpen" ng-init="startOpen = true" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Birth" close-text="Close" required="required"
|
||||
ng-change="getMaxEndDate(myModel.startDate)" max-date="currentDate" />
|
||||
|
||||
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$error.maxlength">Enter a Valid Date of Birth</span>
|
||||
@ -356,6 +362,62 @@
|
||||
<span class="error text-small block" ng-if="Form.address2.$dirty && Form.address2.$invalid">Current Address is required</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<form name="Form" id="form1" novalidate ng-submit="form.submit(Form,myModel)" method="post">
|
||||
<div class="file-upload">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="user-image">
|
||||
<h5>Profile Picture</h5>
|
||||
<div class=" margin-bottom-5">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<input type="file" file-model="idProof"
|
||||
accept="image/*" onchange="angular.element(this).scope().imageUpload(event)"/>-->
|
||||
|
||||
|
||||
<div>
|
||||
<div ng-repeat="step in stepsModel">
|
||||
<!--<a class="close-thin"></a>-->
|
||||
<img class="thumb" ng-src="{{step}}" />
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-success btn-o btn-sm margin-right-15" type="button" ng-click="resetImage()">Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" accept="image/*" file-upload onchange="angular.element(this).scope().imageUpload(event)" />
|
||||
<style>
|
||||
.thumb {
|
||||
width: 130px;
|
||||
height: 140px;
|
||||
margin: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.uploader {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
@ -367,7 +429,8 @@
|
||||
Home Branch <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="17" class="cs-select cs-skin-elastic" name="homeBranch" ng-model="myModel.homeBranch" required>
|
||||
<select class="form-control" tabindex="17" class="cs-select cs-skin-elastic" name="homeBranch" ng-model="myModel.homeBranch"
|
||||
required>
|
||||
<option value="" disabled selected>Select Home Branch</option>
|
||||
<option ng-repeat="item in branchDetails" value="{{item.BranchCode}}">{{item.BranchName}}</option>
|
||||
</select>
|
||||
@ -405,6 +468,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.jobResponsibility.$dirty && Form.jobResponsibility.$invalid}">
|
||||
<label>
|
||||
Job Resposibility
|
||||
</label>
|
||||
<textarea maxlength="100" placeholder="Enter Job Responsibility" tabindex="20" class="form-control textdsc" name="jobResponsibility" ng-model="myModel.jobResponsibility"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.jobResponsibility.$dirty && Form.jobResponsibility.$invalid">JOB Responsibility is required</span>
|
||||
<span class="text-small block">Job Responsibility Should be Less than 100 Characters.</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Active/De-Active
|
||||
@ -422,63 +493,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<form name="Form" id="form1" novalidate ng-submit="form.submit(Form,myModel)"
|
||||
method="post">
|
||||
<div class="file-upload">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="user-image">
|
||||
<h5>Profile Picture</h5>
|
||||
<div class=" margin-bottom-5">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<input type="file" file-model="idProof"
|
||||
accept="image/*" onchange="angular.element(this).scope().imageUpload(event)"/>-->
|
||||
|
||||
|
||||
<div>
|
||||
<div ng-repeat="step in stepsModel">
|
||||
<!--<a class="close-thin"></a>-->
|
||||
<img class="thumb" ng-src="{{step}}" />
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-success btn-o btn-sm margin-right-15"
|
||||
type="button"
|
||||
ng-click="resetImage()">Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" accept="image/*" file-upload onchange="angular.element(this).scope().imageUpload(event)"/>
|
||||
<style>
|
||||
.thumb{
|
||||
width: 130px;
|
||||
height: 140px;
|
||||
margin: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.uploader{
|
||||
clear:both;
|
||||
}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--<pre>{{ myModel | json}}</pre>-->
|
||||
<div class="row">
|
||||
@ -505,6 +520,4 @@
|
||||
<!--<a-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
|
||||
|
||||
<!-- end: LIST GROUP -->
|
||||
Loading…
Reference in New Issue
Block a user