course details changes done
This commit is contained in:
parent
320cf96104
commit
54d906b890
@ -34,6 +34,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
$scope.setModel = {
|
$scope.setModel = {
|
||||||
"feesType": "",
|
"feesType": "",
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* get payment options
|
* get payment options
|
||||||
@ -274,7 +275,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
/*
|
/*
|
||||||
* set fees for student
|
* set fees for student
|
||||||
* */
|
* */
|
||||||
$scope.submitFeesForStudent = function (myModel, form,updateModel, loading) {
|
$scope.submitFeesForStudent = function (myModel, form,updateModel, loading,installment) {
|
||||||
|
|
||||||
|
|
||||||
var firstError = null;
|
var firstError = null;
|
||||||
if (form.$invalid) {
|
if (form.$invalid) {
|
||||||
var field = null, firstError = null;
|
var field = null, firstError = null;
|
||||||
@ -291,6 +294,32 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
}
|
}
|
||||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||||
} else {
|
} else {
|
||||||
|
if(isNaN(installment.date)){
|
||||||
|
$scope.pushDueDate1= $rootScope.lastInstallemtDate;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$scope.convertGetDate1=new Date(installment.date).toDateString();
|
||||||
|
$scope.pushDueDate1 = $filter('date')(new Date($scope.convertGetDate1), 'dd-MM-yyyy');
|
||||||
|
|
||||||
|
}
|
||||||
|
if(installment.ID !='' && installment.ID !==null && installment.ID !=undefined){
|
||||||
|
$rootScope.updateMoreItems.push({
|
||||||
|
ID: installment.ID,
|
||||||
|
Name: installment.name,
|
||||||
|
Amount: installment.amount,
|
||||||
|
DueDate: $scope.pushDueDate1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$rootScope.updateMoreItems.push({
|
||||||
|
ID: "",
|
||||||
|
Name: installment.name,
|
||||||
|
Amount: installment.amount,
|
||||||
|
DueDate: $scope.pushDueDate1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$scope.ldloading5 = {};
|
$scope.ldloading5 = {};
|
||||||
|
|
||||||
$scope.ldloading5[loading.replace('-', '_')] = true;
|
$scope.ldloading5[loading.replace('-', '_')] = true;
|
||||||
@ -312,9 +341,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
other: updateModel.Others,
|
other: updateModel.Others,
|
||||||
session: updateModel.SessionName,
|
session: updateModel.SessionName,
|
||||||
rollNo: updateModel.RollNo,
|
rollNo: updateModel.RollNo,
|
||||||
|
|
||||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
installmentItems:$rootScope.updateMoreItems
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -327,12 +355,18 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
/*$scope.setModel = {
|
/*$scope.setModel = {
|
||||||
"feesType": "",
|
"feesType": "",
|
||||||
};*/
|
};*/
|
||||||
|
$scope.myModelInstallemt.ID="";
|
||||||
|
$scope.myModelInstallemt.name="";
|
||||||
|
$scope.myModelInstallemt.amount="";
|
||||||
|
$scope.myModelInstallemt.date="";
|
||||||
|
$rootScope.updateMoreItems=[];
|
||||||
form.$setPristine(true);
|
form.$setPristine(true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$scope.ldloading5[loading.replace('-', '_')] = false;
|
$scope.ldloading5[loading.replace('-', '_')] = false;
|
||||||
swal("Failed!", response.data.message, "error");
|
swal("Failed!", response.data.message, "error");
|
||||||
$scope.getStudentSetFees(myModel.ID,myModel.CourseID,myModel.StudentID);
|
$rootScope.updateMoreItems.splice($scope.updateMoreItems.length-1);
|
||||||
|
// $scope.getStudentSetFees(myModel.ID,myModel.CourseID,myModel.StudentID);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -390,6 +424,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
$scope.feesStructureInfo="";
|
$scope.feesStructureInfo="";
|
||||||
$scope.getStudentSetFees = function (ID,courseID,studeID) {
|
$scope.getStudentSetFees = function (ID,courseID,studeID) {
|
||||||
$scope.feesStructureInfo="";
|
$scope.feesStructureInfo="";
|
||||||
|
$scope.myModelInstallemt.ID="";
|
||||||
|
$scope.myModelInstallemt.name="";
|
||||||
|
$scope.myModelInstallemt.amount="";
|
||||||
|
$scope.myModelInstallemt.date="";
|
||||||
|
$rootScope.lastInstallemtDate="";
|
||||||
|
$rootScope.updateMoreItems=[];
|
||||||
var setFees = {
|
var setFees = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: apiPoint.url + 'getStudentFeesAssign/',
|
url: apiPoint.url + 'getStudentFeesAssign/',
|
||||||
@ -409,14 +449,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
$scope.setModel = {
|
$scope.setModel = {
|
||||||
"feesType": "",
|
"feesType": "",
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$scope.feesStructureInfo="";
|
$scope.feesStructureInfo="";
|
||||||
$scope.setModel = {
|
$scope.setModel = {
|
||||||
"feesType": "",
|
"feesType": "",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -424,22 +462,114 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* set course fees amount
|
|
||||||
* */
|
|
||||||
/* $scope.changeFeesValues = function (model) {
|
|
||||||
console.log(model);
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$scope.cancel = function () {
|
$scope.cancel = function () {
|
||||||
$scope.editId=-1;
|
$scope.editId=-1;
|
||||||
$scope.studentFeesInfo="";
|
$scope.studentFeesInfo="";
|
||||||
$scope.existStudentFeesDetails="";
|
$scope.existStudentFeesDetails="";
|
||||||
$scope.getFeesUpdateStatus="";
|
$scope.getFeesUpdateStatus="";
|
||||||
|
|
||||||
$scope.viewId=-1;
|
$scope.viewId=-1;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* get add more installment array
|
||||||
|
* created by kms
|
||||||
|
* */
|
||||||
|
|
||||||
|
$scope.myModelInstallemt = {
|
||||||
|
"ID":"",
|
||||||
|
"amount":"",
|
||||||
|
"name":"",
|
||||||
|
"date":"",
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
$rootScope.updateMoreItems=[];
|
||||||
|
$rootScope.clickMoreItems = function (model,form,setModel) {
|
||||||
|
$scope.convertGetDate='';
|
||||||
|
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].$stop_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (form[field].$pristine) {
|
||||||
|
form[field].$dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
if(isNaN(model.date)){
|
||||||
|
$scope.pushDueDate= $rootScope.lastInstallemtDate;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$scope.convertGetDate=new Date(model.date).toDateString();
|
||||||
|
$scope.pushDueDate = $filter('date')(new Date($scope.convertGetDate), 'dd-MM-yyyy');
|
||||||
|
|
||||||
|
}
|
||||||
|
if(model.ID !='' && model.ID !==null && model.ID !=undefined){
|
||||||
|
$rootScope.updateMoreItems.push({
|
||||||
|
ID:model.ID,
|
||||||
|
Name: model.name,
|
||||||
|
Amount: model.amount,
|
||||||
|
DueDate: $scope.pushDueDate
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$rootScope.updateMoreItems.push({
|
||||||
|
ID:"",
|
||||||
|
Name: model.name,
|
||||||
|
Amount: model.amount,
|
||||||
|
DueDate: $scope.pushDueDate
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$scope.myModelInstallemt.ID="";
|
||||||
|
$scope.myModelInstallemt.name="";
|
||||||
|
$scope.myModelInstallemt.amount="";
|
||||||
|
$scope.myModelInstallemt.date="";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* change installment values
|
||||||
|
* */
|
||||||
|
$scope.changeInstallemt = function (model,form) {
|
||||||
|
$rootScope.updateMoreItems=[];
|
||||||
|
|
||||||
|
if(model.InstallmentDetails != ''){
|
||||||
|
$scope.myModelInstallemt.ID=model.InstallmentDetails[model.InstallmentDetails.length-1].ID;
|
||||||
|
|
||||||
|
$scope.myModelInstallemt.name=model.InstallmentDetails[model.InstallmentDetails.length-1].Name;
|
||||||
|
$scope.myModelInstallemt.amount=model.InstallmentDetails[model.InstallmentDetails.length-1].Amount;
|
||||||
|
$scope.myModelInstallemt.date=model.InstallmentDetails[model.InstallmentDetails.length-1].DueDate;
|
||||||
|
$rootScope.lastInstallemtDate = $scope.myModelInstallemt.date;
|
||||||
|
for(var i=0; i < model.InstallmentDetails.length-1; i++){
|
||||||
|
$rootScope.updateMoreItems.push(model.InstallmentDetails[i]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$scope.myModelInstallemt.ID="";
|
||||||
|
$scope.myModelInstallemt.name="";
|
||||||
|
$scope.myModelInstallemt.amount="";
|
||||||
|
$scope.myModelInstallemt.date="";
|
||||||
|
$rootScope.lastInstallemtDate="";
|
||||||
|
}
|
||||||
|
|
||||||
|
form.$setPristine(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -476,6 +606,8 @@ app.controller('ModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $
|
|||||||
$log.info('Modal dismissed at: ' + new Date());
|
$log.info('Modal dismissed at: ' + new Date());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
// Please note that $modalInstance represents a modal window (instance) dependency.
|
// Please note that $modalInstance represents a modal window (instance) dependency.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user