This commit is contained in:
velz 2018-08-21 11:58:26 +05:30
commit f6d1908bfd
6 changed files with 34 additions and 21 deletions

View File

@ -130,25 +130,34 @@ app.controller('datacorrectionCtrl', ["$scope","$rootScope","toaster", "$filter"
$scope.updatestatus = function (myModel, form, loading)
{
//alert(myModel.ID)
$scope.updatestatus = function (myModel, form, loading)
{
//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);
// console.log(d.getUTCDate()); // Hours
// console.log(d.getUTCMonth());
// console.log(d.getUTCFullYear());
var mdate = d.getUTCDate() + 1;
var mmonth = d.getUTCMonth() + 1;
var myear = d.getUTCFullYear();
var CDate = mdate+"-"+mmonth+"-"+myear;
//console.log(CDate)
var IsActive = '';
if(myModel.IsActive == true)
@ -189,8 +198,10 @@ else if(myModel.IsActive == false)
$scope.close();
});
}
};
};

View File

@ -69,7 +69,8 @@
</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">
Income/Expense
</label>
@ -78,11 +79,12 @@
<option value="" selected>Select</option>
<option value="I001">EXPENSE</option>
<option value="I002">INCOME</option>
<!-- <option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option> -->
</select>
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
</div>
</div> -->
</div>
<div>
<div ng-show="loadingsearch" class="center">

View File

@ -76,7 +76,7 @@
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
</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">
Income/Expense
</label>
@ -85,11 +85,11 @@
<option value="" selected>Select</option>
<option value="I001">EXPENSE</option>
<option value="I002">INCOME</option>
<!-- <option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option> -->
</select>
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
</div>
</div> -->
</div>
<div>
<div ng-show="loadingsearch" class="center">

View File

@ -51,7 +51,7 @@
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
</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">
Income/Expense
</label>
@ -63,7 +63,7 @@
</select>
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
</div>
</div> -->
</div>
<div>
<div ng-show="loadingsearch" class="center">

View File

@ -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>
Reason to Deactivate <span class="symbol required"></span>
</label>

View File

@ -368,7 +368,7 @@
<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>
<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>
</div>
<div class="col-md-6">