branch getails added
This commit is contained in:
parent
bca711f95b
commit
2137de6889
@ -23,21 +23,29 @@ class Branch_model extends CI_Model {
|
||||
if($this->db->get(BRANCH)->first_row()){
|
||||
$result['BranchStatus'] = false;
|
||||
$result['message'] = "This branch code is already exist!";
|
||||
}
|
||||
else{
|
||||
$this->db->insert(BRANCH, $arrayDetails);
|
||||
if($this->db->affected_rows() == '1'){
|
||||
} else {
|
||||
$this->db->select('BranchName');
|
||||
$this->db->where('BranchName', $arrayDetails['BranchName']);
|
||||
if($this->db->get(BRANCH)->first_row()){
|
||||
$result['BranchStatus'] = false;
|
||||
$result['message'] = "This branch name is already exist!";
|
||||
} else{
|
||||
$this->db->insert(BRANCH, $arrayDetails);
|
||||
if($this->db->affected_rows() == '1'){
|
||||
|
||||
$result['branchStatus'] = true;
|
||||
$result['message'] = "Successfully branch details added";
|
||||
}
|
||||
$result['branchStatus'] = true;
|
||||
$result['message'] = "Successfully branch details added";
|
||||
}
|
||||
|
||||
else {
|
||||
$result['branchStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
else {
|
||||
$result['branchStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
@ -413,8 +413,8 @@ class Employee_model extends CI_Model
|
||||
$this->db->delete(STAFF_BRANCH);
|
||||
foreach($reqBanch['BranchCode'] as $something) {
|
||||
$branchCode = $this->get_branch_code($something);
|
||||
$sql1 = "INSERT INTO ".STAFF_BRANCH." (StaffID, BranchCode, IsActive, CreatedBy, CreatedOn)
|
||||
VALUES ('$empFor', '$branchCode', '1','$createby', '$createon')";
|
||||
$sql1 = "INSERT INTO ".STAFF_BRANCH." (StaffID, BranchCode, IsActive, CreatedBy, CreatedOn, UpdatedBy, UpdatedOn)
|
||||
VALUES ('$empFor', '$branchCode', '1','$createby', '$createon', '$createby', '$createon')";
|
||||
// update branch to staff_branch table
|
||||
if ($this->db->query($sql1) == '1') {
|
||||
$result['updateEmpbranchStatus'] = true;
|
||||
|
||||
@ -301,7 +301,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
// alert($scope.myModel.dateofbirth);
|
||||
var formate = "yyyy-MM-dd";
|
||||
var formate = "dd-MM-yyyy";
|
||||
// var date = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
||||
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||
|
||||
@ -182,7 +182,7 @@
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Branch Code"
|
||||
tabindex="5" class="form-control" name="branchcode"
|
||||
tabindex="1" class="form-control" name="branchcode"
|
||||
ng-model="myModel.branchCode" ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.branchcode.$dirty && Form.branchcode.$error.required">Branch Code required</span>
|
||||
@ -200,7 +200,7 @@
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Branch Name"
|
||||
tabindex="5" class="form-control" name="branchname"
|
||||
tabindex="2" class="form-control" name="branchname"
|
||||
ng-model="myModel.branchName" ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.branchname.$dirty && Form.branchname.$error.required">Branch Name required</span>
|
||||
@ -215,7 +215,7 @@
|
||||
<label>
|
||||
Email ID <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="email" tabindex="27"
|
||||
<input type="email" tabindex="3"
|
||||
placeholder="Enter Email ID"
|
||||
class="form-control"
|
||||
name="Email"
|
||||
@ -238,7 +238,7 @@
|
||||
Mobile Number <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="29"
|
||||
<input type="text" name="primaryPhone" tabindex="4"
|
||||
placeholder="Enter Mobile Number"
|
||||
class="form-control"
|
||||
ng-model="myModel.primaryPhone"
|
||||
@ -258,7 +258,7 @@
|
||||
<label class="control-label">
|
||||
Alternate Mobile Number
|
||||
</label>
|
||||
<input type="text" name="secondaryPhone" tabindex="30"
|
||||
<input type="text" name="secondaryPhone" tabindex="5"
|
||||
placeholder="Enter Alternate Mobile Number"
|
||||
class="form-control"
|
||||
ng-model="myModel.secondaryPhone"
|
||||
@ -272,7 +272,7 @@
|
||||
<label class="control-label">
|
||||
Landline Number
|
||||
</label>
|
||||
<input type="text" name="Landline" tabindex="30"
|
||||
<input type="text" name="Landline" tabindex="6"
|
||||
placeholder="Enter Landline Number"
|
||||
class="form-control"
|
||||
ng-model="myModel.landLine"
|
||||
@ -289,7 +289,7 @@
|
||||
<label>
|
||||
Address<span class="symbol required"></span>
|
||||
</label>
|
||||
<textarea placeholder="Enter Address" tabindex="31"
|
||||
<textarea placeholder="Enter Address" tabindex="7"
|
||||
class="form-control textdsc" name="address"
|
||||
ng-model="myModel.address" required></textarea>
|
||||
<span class="error text-small block"
|
||||
@ -326,13 +326,13 @@
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
<button type="submit" ladda="ldloading1.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Submit
|
||||
</button>
|
||||
<!-- <button type="submit" class="btn btn-success btn-o" tabindex="8">
|
||||
Submit
|
||||
</button>-->
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9"
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="10"
|
||||
ng-click="branchForm.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Branch Code"
|
||||
tabindex="5" class="form-control" name="branchcode"
|
||||
tabindex="1" class="form-control" name="branchcode"
|
||||
ng-model="p.BranchCode" ng-pattern="/^[a-zA-Z0-9.\s]*$/" readonly required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.branchcode.$dirty && Form.branchcode.$error.required">Branch Code required</span>
|
||||
@ -34,7 +34,7 @@
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Branch Name"
|
||||
tabindex="5" class="form-control" name="branchname"
|
||||
tabindex="2" class="form-control" name="branchname"
|
||||
ng-model="p.BranchName" ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.branchname.$dirty && Form.branchname.$error.required">Branch Name required</span>
|
||||
@ -49,7 +49,7 @@
|
||||
<label>
|
||||
Email ID <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="email" tabindex="27"
|
||||
<input type="email" tabindex="3"
|
||||
placeholder="Enter Email ID"
|
||||
class="form-control"
|
||||
name="Email"
|
||||
@ -72,7 +72,7 @@
|
||||
Mobile Number <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="29"
|
||||
<input type="text" name="primaryPhone" tabindex="4"
|
||||
placeholder="Enter Mobile Number"
|
||||
class="form-control"
|
||||
ng-model="p.MobileNumber"
|
||||
@ -92,7 +92,7 @@
|
||||
<label class="control-label">
|
||||
Alternate Mobile Number
|
||||
</label>
|
||||
<input type="text" name="secondaryPhone" tabindex="30"
|
||||
<input type="text" name="secondaryPhone" tabindex="5"
|
||||
placeholder="Enter Alternate Mobile Number"
|
||||
class="form-control"
|
||||
ng-model="p.AlternateNumber"
|
||||
@ -106,7 +106,7 @@
|
||||
<label class="control-label">
|
||||
Landline Number
|
||||
</label>
|
||||
<input type="text" name="Landline" tabindex="30"
|
||||
<input type="text" name="Landline" tabindex="6"
|
||||
placeholder="Enter Landline Number"
|
||||
class="form-control"
|
||||
ng-model="p.LandlineNumber"
|
||||
@ -123,7 +123,7 @@
|
||||
<label>
|
||||
Address<span class="symbol required"></span>
|
||||
</label>
|
||||
<textarea placeholder="Enter Address" tabindex="31"
|
||||
<textarea placeholder="Enter Address" tabindex="7"
|
||||
class="form-control textdsc" name="address"
|
||||
ng-model="p.Address" required></textarea>
|
||||
<span class="error text-small block"
|
||||
@ -153,13 +153,13 @@
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ladda="ldloading.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateBranch(p,Form,'zoom-in')">
|
||||
<button type="submit" ladda="ldloading.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateBranch(p,Form,'zoom-in')">
|
||||
Save
|
||||
</button>
|
||||
<!-- <button type="submit" class="btn btn-success btn-o" tabindex="8">
|
||||
Submit
|
||||
</button>-->
|
||||
<input type="button" class="btn btn-warning btn-wide" tabindex="9" value="Cancel"
|
||||
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
|
||||
ng-click="cancel();">
|
||||
|
||||
</input>
|
||||
|
||||
@ -367,6 +367,26 @@
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.homeBranch.$dirty && Form.homeBranch.$error.required">Home Branch is Required</span>
|
||||
</div>-->
|
||||
<!--check obj-->
|
||||
<!--<div>
|
||||
<div class=" col-md-4 form-group">
|
||||
<label>
|
||||
Select Branch
|
||||
<div>{{ branchDetails | json}}</div>
|
||||
<div>{{ empBranchsObj | json}}</div>
|
||||
</label>
|
||||
<ui-select multiple ng-model="empBranchsObj.arr" theme="bootstrap" ng-disabled="disabled" close-on-select="false">
|
||||
<ui-select-match placeholder="Select Branch">
|
||||
{{$item.BranchName}}
|
||||
</ui-select-match>
|
||||
<ui-select-choices repeat="name in branchDetailsNameObj.arr | filter:$select.search">
|
||||
|
||||
{{name.BranchName}}
|
||||
</ui-select-choices>
|
||||
</ui-select>
|
||||
</div>
|
||||
</div>-->
|
||||
<!--check obj-->
|
||||
<div>
|
||||
<div class=" col-md-4 form-group">
|
||||
<label>
|
||||
@ -384,7 +404,7 @@
|
||||
</ui-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--{{ empRoleDetail | json }}-->
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.role.$dirty && Form.role.$invalid, 'has-success':Form.role.$valid}">
|
||||
<label>
|
||||
Role <span class="symbol required"></span>
|
||||
@ -392,7 +412,7 @@
|
||||
<select class="form-control" name="role" ng-model="empRoleDetail.ListCode" class="cs-select cs-skin-elastic" required>
|
||||
|
||||
<option value="" disabled selected>Select Role</option>
|
||||
<option ng-repeat="item in roleDetails" value="{{item.ListCode}}" ng-selected="empRoleDetail.ListCode == item.ListCode">{{item.ListName}}</option>
|
||||
<option ng-repeat="items in roleDetails" value="{{items.ListCode}}" ng-selected="empRoleDetail.ListCode == items.ListCode">{{items.ListName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.role.$dirty && Form.role.$error.required">Role is required</span>
|
||||
</div>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="emptyData == false" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! No
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
|
||||
@ -255,7 +255,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>
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.master')}">
|
||||
<!--<li ng-class="{'active open':$state.includes('app.master')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
@ -85,23 +85,23 @@
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<!--<li ui-sref-active="active">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.branch">
|
||||
<span class="title" translate="sidebar.nav.master.BRANCH"> BRANCH DETAILS </span>
|
||||
</a>
|
||||
</li>-->
|
||||
<!--<li ui-sref-active="active" >
|
||||
</li>
|
||||
<li ui-sref-active="active" >
|
||||
<a ui-sref="app.master.employee">
|
||||
<span class="title" translate="sidebar.nav.master.EMPLOYEE"> EMPLOYEE DETAILS </span>
|
||||
</a>
|
||||
</li>-->
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.activity">
|
||||
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>-->
|
||||
<li ng-class="{'active open':$state.includes('app.tracking')}">
|
||||
<a ui-sref="app.tracking">
|
||||
<div class="item-content">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user