Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
f6d1908bfd
@ -130,25 +130,34 @@ app.controller('datacorrectionCtrl', ["$scope","$rootScope","toaster", "$filter"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.updatestatus = function (myModel, form, loading)
|
$scope.updatestatus = function (myModel, form, loading)
|
||||||
{
|
{
|
||||||
//alert(myModel.ID)
|
|
||||||
|
|
||||||
//alert(myModel.Reason);
|
var firstError = null;
|
||||||
|
if (form.$invalid) {
|
||||||
|
|
||||||
|
var field = null, firstError = null;
|
||||||
|
for (field in form) {
|
||||||
|
if (field[0] != '$') {
|
||||||
|
if (firstError === null && !form[field].$valid) {
|
||||||
|
firstError = form[field].$name;
|
||||||
|
}
|
||||||
|
if (form[field].$pristine) {
|
||||||
|
form[field].$dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||||
|
swal("Please Enter Reason!", "", "error");
|
||||||
|
} else {
|
||||||
|
|
||||||
var d = new Date(myModel.Date);
|
var d = new Date(myModel.Date);
|
||||||
// console.log(d.getUTCDate()); // Hours
|
|
||||||
// console.log(d.getUTCMonth());
|
|
||||||
// console.log(d.getUTCFullYear());
|
|
||||||
|
|
||||||
var mdate = d.getUTCDate() + 1;
|
var mdate = d.getUTCDate() + 1;
|
||||||
var mmonth = d.getUTCMonth() + 1;
|
var mmonth = d.getUTCMonth() + 1;
|
||||||
var myear = d.getUTCFullYear();
|
var myear = d.getUTCFullYear();
|
||||||
|
|
||||||
var CDate = mdate+"-"+mmonth+"-"+myear;
|
var CDate = mdate+"-"+mmonth+"-"+myear;
|
||||||
//console.log(CDate)
|
//console.log(CDate)
|
||||||
|
|
||||||
|
|
||||||
var IsActive = '';
|
var IsActive = '';
|
||||||
|
|
||||||
if(myModel.IsActive == true)
|
if(myModel.IsActive == true)
|
||||||
@ -189,8 +198,10 @@ else if(myModel.IsActive == false)
|
|||||||
$scope.close();
|
$scope.close();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
|
||||||
|
<!-- <div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||||
<label for="form-field-select-2">
|
<label for="form-field-select-2">
|
||||||
Income/Expense
|
Income/Expense
|
||||||
</label>
|
</label>
|
||||||
@ -78,11 +79,12 @@
|
|||||||
<option value="" selected>Select</option>
|
<option value="" selected>Select</option>
|
||||||
<option value="I001">EXPENSE</option>
|
<option value="I001">EXPENSE</option>
|
||||||
<option value="I002">INCOME</option>
|
<option value="I002">INCOME</option>
|
||||||
<!-- <option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option> -->
|
|
||||||
</select>
|
</select>
|
||||||
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div ng-show="loadingsearch" class="center">
|
<div ng-show="loadingsearch" class="center">
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
<!-- <div class="col-md-3 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||||
<label for="form-field-select-2">
|
<label for="form-field-select-2">
|
||||||
Income/Expense
|
Income/Expense
|
||||||
</label>
|
</label>
|
||||||
@ -85,11 +85,11 @@
|
|||||||
<option value="" selected>Select</option>
|
<option value="" selected>Select</option>
|
||||||
<option value="I001">EXPENSE</option>
|
<option value="I001">EXPENSE</option>
|
||||||
<option value="I002">INCOME</option>
|
<option value="I002">INCOME</option>
|
||||||
<!-- <option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option> -->
|
|
||||||
</select>
|
</select>
|
||||||
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div ng-show="loadingsearch" class="center">
|
<div ng-show="loadingsearch" class="center">
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
<!-- <div class="col-md-3 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||||
<label for="form-field-select-2">
|
<label for="form-field-select-2">
|
||||||
Income/Expense
|
Income/Expense
|
||||||
</label>
|
</label>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div ng-show="loadingsearch" class="center">
|
<div ng-show="loadingsearch" class="center">
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3 form-group" >
|
<div class="col-md-3 form-group" ng-class="{'has-error':p.Reason.$dirty && p.Reason.$invalid, 'has-success':p.Reason.$valid}">
|
||||||
<label>
|
<label>
|
||||||
Reason to Deactivate <span class="symbol required"></span>
|
Reason to Deactivate <span class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@ -368,7 +368,7 @@
|
|||||||
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="mobileNumList.grouptype"
|
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="mobileNumList.grouptype"
|
||||||
ng-Change="getall_Numbers(mobileNumList.grouptype);" required>
|
ng-Change="getall_Numbers(mobileNumList.grouptype);" required>
|
||||||
<option value="" disabled selected>Select Group</option>
|
<option value="" disabled selected>Select Group</option>
|
||||||
<option ng-repeat="p in statusInfo" value="{{p.ID}}">{{p.GroupName}}</option>
|
<option ng-repeat="p in statusInfo" ng-if="p.IsActive" value="{{p.ID}}">{{p.GroupName}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user