course master changes for duplication validations
This commit is contained in:
parent
bb2732917a
commit
1134bc5018
@ -206,6 +206,21 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
|
||||
swal("Failed!", 'Please Enter Single/Sem-Year Fees ', "error");
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
/* check duplication objects values */
|
||||
if(semYearModel.program=='Y001'){
|
||||
$scope.myModelSemYear.programName="";
|
||||
$scope.myModelSemYear.FeesAmount="";
|
||||
var valueArr = $scope.addMoreItems.map(function(item){ return item.programName });
|
||||
var isDuplicate = valueArr.some(function(item, idx){
|
||||
return valueArr.indexOf(item) != idx;
|
||||
});
|
||||
}
|
||||
if(semYearModel.program=='Y001' && isDuplicate==true){
|
||||
|
||||
swal("Warning!", 'Sem/Year Duplication ', "warning");
|
||||
}
|
||||
else{
|
||||
$scope.ldloading1 = {};
|
||||
|
||||
@ -252,6 +267,8 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -296,6 +313,20 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
|
||||
FeesAmount: semYear.FeesAmount
|
||||
});
|
||||
}
|
||||
/* check duplication objects values */
|
||||
if(semYear.program=='Y001'){
|
||||
$scope.myModelSemYear1.programName="";
|
||||
$scope.myModelSemYear1.FeesAmount="";
|
||||
var valueArr = $rootScope.updateMoreItems.map(function(item){ return item.programName });
|
||||
var isDuplicate = valueArr.some(function(item, idx){
|
||||
return valueArr.indexOf(item) != idx;
|
||||
});
|
||||
}
|
||||
if(semYear.program=='Y001' && isDuplicate==true){
|
||||
|
||||
swal("Warning!", 'Sem/Year Duplication ', "warning");
|
||||
}
|
||||
else{
|
||||
$scope.ldloading = {};
|
||||
|
||||
$scope.ldloading[loading.replace('-', '_')] = true;
|
||||
@ -348,6 +379,8 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
/*
|
||||
*get course details when page loading called from view file
|
||||
|
||||
@ -309,7 +309,7 @@
|
||||
|
||||
<input type="text" placeholder="Enter Regular Fees Amt"
|
||||
autofocus tabindex="7" class="form-control" name="regularFees" id="regularFees" ng-maxlength="8"
|
||||
ng-model="myModelRegular.FeesAmount" ng-disabled="myModelLateral.FeesAmount!='' || myModelSemYear.programName!='' || myModelSemYear.FeesAmount!=''" ng-pattern="/^[0-9]*$/"/>
|
||||
ng-model="myModelRegular.FeesAmount" ng-disabled="myModelLateral.FeesAmount!='' || myModelSemYear.programName!='' || myModelSemYear.FeesAmount!='' || addMoreItems.length!=0" ng-pattern="/^[0-9]*$/"/>
|
||||
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.regularFees.$error.maxlength || Form.regularFees.$error.pattern">Enter a valid amount</span>
|
||||
@ -322,7 +322,7 @@
|
||||
|
||||
<input type="text" placeholder="Enter Lateral Fees Amt"
|
||||
autofocus tabindex="8" class="form-control" name="lateralFees" id="lateralFees" ng-maxlength="8"
|
||||
ng-model="myModelLateral.FeesAmount" ng-disabled="myModelRegular.FeesAmount!='' || myModelSemYear.programName!='' || myModelSemYear.FeesAmount!=''" ng-pattern="/^[0-9]*$/"/>
|
||||
ng-model="myModelLateral.FeesAmount" ng-disabled="myModelRegular.FeesAmount!='' || myModelSemYear.programName!='' || myModelSemYear.FeesAmount!='' || addMoreItems.length!=0" ng-pattern="/^[0-9]*$/"/>
|
||||
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.lateralFees.$error.maxlength || Form.lateralFees.$error.pattern">Enter a valid amount</span>
|
||||
|
||||
@ -290,8 +290,95 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" ng-if="updateMoreItems.length==0">
|
||||
<fieldset>
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group"
|
||||
ng-class="{'has-error':Form.provFess.$dirty && Form.provFess.$invalid}">
|
||||
<label>
|
||||
Prov Cert Fees
|
||||
</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" placeholder="Enter Prov Cert Fees"
|
||||
autofocus tabindex="11" class="form-control" name="provFess" id="provFess" ng-maxlength="8"
|
||||
ng-model="p.PC" ng-pattern="/^[0-9]*$/">
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.provFess.$error.maxlength || Form.provFess.$error.pattern">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6 form-group"
|
||||
ng-class="{'has-error':Form.transferAmount.$dirty && Form.transferAmount.$invalid}">
|
||||
<label>
|
||||
Transfer Cert Fees
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter transfer Cert Fees"
|
||||
autofocus tabindex="12" class="form-control" name="transferAmount" id="transferAmount" ng-maxlength="8"
|
||||
ng-model="p.TC" ng-pattern="/^[0-9]*$/">
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.transferAmount.$error.maxlength || Form.transferAmount.$error.pattern">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group"
|
||||
ng-class="{'has-error':Form.degreeAmount.$dirty && Form.degreeAmount.$invalid}">
|
||||
<label>
|
||||
Degree Cert Fees
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Degree Cert Fees"
|
||||
autofocus tabindex="13" class="form-control" name="degreeAmount" id="degreeAmount" ng-maxlength="8"
|
||||
ng-model="p.DC" ng-pattern="/^[0-9]*$/">
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.degreeAmount.$error.maxlength || Form.degreeAmount.$error.pattern">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 form-group"
|
||||
ng-class="{'has-error':Form.migrationAmount.$dirty && Form.migrationAmount.$invalid}">
|
||||
<label>
|
||||
Migration Cert Fees
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Migration Cert Fees"
|
||||
autofocus tabindex="14" class="form-control" name="migrationAmount" id="migrationAmount" ng-maxlength="8"
|
||||
ng-model="p.MC" ng-pattern="/^[0-9]*$/">
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.migrationAmount.$error.maxlength || Form.migrationAmount.$error.pattern">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group"
|
||||
ng-class="{'has-error':Form.otherAmount.$dirty && Form.otherAmount.$invalid}">
|
||||
<label>
|
||||
Other Fees
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Other Fees"
|
||||
autofocus tabindex="15" class="form-control" name="otherAmount" id="otherAmount" ng-maxlength="8"
|
||||
ng-model="p.OtherFees" ng-pattern="/^[0-9]*$/">
|
||||
<span class="error text-small block"
|
||||
ng-if="Form.otherAmount.$error.maxlength || Form.otherAmount.$error.pattern">Enter a valid amount</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" ng-if="updateMoreItems.length!=0">
|
||||
|
||||
<fieldset>
|
||||
<legend >{{myModelSemYear1.FeesName}}</legend>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user