mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:11:54 +00:00
Merge pull request #1418 from nazeer1100126/Mifosx_1523_-_GUI_for_Loan_Rescheduling
Mifosx 1523 - GUI for Loan Rescheduling
This commit is contained in:
commit
195e062bc7
@ -6,14 +6,14 @@
|
||||
scope.requestId = routeParams.requestId;
|
||||
|
||||
scope.cancel = function () {
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/'+scope.requestId);
|
||||
};
|
||||
scope.approve = function(){
|
||||
this.formData.dateFormat = scope.df;
|
||||
this.formData.locale = scope.optlang.code;
|
||||
this.formData.approvedOnDate = dateFilter(this.formData.approvedOnDate, scope.df);
|
||||
|
||||
resourceFactory.loanRescheduleResource.approve({loanId:scope.loanId},this.formData,function (data) {
|
||||
resourceFactory.loanRescheduleResource.approve({scheduleId:scope.requestId},this.formData,function (data) {
|
||||
location.path('/viewloanaccount/' + scope.loanId);
|
||||
});
|
||||
};
|
||||
|
||||
@ -5,18 +5,18 @@
|
||||
scope.loanId = routeParams.loanId;
|
||||
scope.data = {};
|
||||
|
||||
resourceFactory.loanRescheduleResource.preview({loanId:scope.loanId}, function (data) {
|
||||
scope.data = data.rescheduledRepaymentSchedule;
|
||||
resourceFactory.loanRescheduleResource.preview({scheduleId:scope.requestId}, function (data) {
|
||||
scope.data = data;
|
||||
});
|
||||
scope.reject = function(){
|
||||
location.path('/loans/' + scope.loanId + '/rejectreschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/rejectreschedulerequest/'+scope.requestId);
|
||||
};
|
||||
scope.approve = function(){
|
||||
location.path('/loans/' + scope.loanId + '/approvereschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/approvereschedulerequest/'+scope.requestId);
|
||||
};
|
||||
|
||||
scope.back = function () {
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/'+scope.requestId);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
@ -6,14 +6,14 @@
|
||||
scope.requestId = routeParams.requestId;
|
||||
|
||||
scope.cancel = function () {
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/'+scope.requestId);
|
||||
};
|
||||
scope.reject = function(){
|
||||
this.formData.dateFormat = scope.df;
|
||||
this.formData.locale = scope.optlang.code;
|
||||
this.formData.rejectedOnDate = dateFilter(this.formData.rejectedOnDate, scope.df);
|
||||
|
||||
resourceFactory.loanRescheduleResource.reject({loanId:scope.loanId},this.formData,function (data) {
|
||||
resourceFactory.loanRescheduleResource.reject({scheduleId:scope.requestId},this.formData,function (data) {
|
||||
location.path('/viewloanaccount/' + scope.loanId);
|
||||
});
|
||||
};
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
this.formData.rescheduleReasonComment = scope.comments;
|
||||
resourceFactory.loanRescheduleResource.put(this.formData, function (data) {
|
||||
scope.requestId = data.resourceId;
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/viewreschedulerequest/'+ data.resourceId);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
scope.requestId = routeParams.requestId;
|
||||
scope.loanId = routeParams.loanId;
|
||||
|
||||
resourceFactory.loanRescheduleResource.get({loanId:scope.loanId}, function (data) {
|
||||
scope.loanRescheduleDetails = data.rescheduleRequest;
|
||||
resourceFactory.loanRescheduleResource.get({scheduleId:scope.requestId}, function (data) {
|
||||
scope.loanRescheduleDetails = data;
|
||||
scope.rescheduleFromDate = new Date(scope.loanRescheduleDetails.rescheduleFromDate);
|
||||
scope.rescheduleFromDate = dateFilter(scope.rescheduleFromDate,"dd MMMM yyyy");
|
||||
scope.submittedOnDate = new Date(scope.loanRescheduleDetails.timeline.submittedOnDate);
|
||||
@ -30,10 +30,10 @@
|
||||
});
|
||||
|
||||
scope.reject = function(){
|
||||
location.path('/loans/' + scope.loanId + '/rejectreschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/rejectreschedulerequest/'+scope.requestId);
|
||||
};
|
||||
scope.approve = function(){
|
||||
location.path('/loans/' + scope.loanId + '/approvereschedulerequest/');
|
||||
location.path('/loans/' + scope.loanId + '/approvereschedulerequest/'+scope.requestId);
|
||||
};
|
||||
|
||||
scope.cancel = function () {
|
||||
@ -41,7 +41,7 @@
|
||||
};
|
||||
|
||||
scope.submit = function () {
|
||||
location.path('/loans/' + scope.loanId + '/previewloanrepaymentschedule/');
|
||||
location.path('/loans/' + scope.loanId + '/previewloanrepaymentschedule/'+scope.requestId);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -763,16 +763,16 @@
|
||||
.when('/loans/:loanId/reschedule/', {
|
||||
templateUrl: 'views/loans/rescheduleloans.html'
|
||||
})
|
||||
.when('/loans/:loanId/viewreschedulerequest/', {
|
||||
.when('/loans/:loanId/viewreschedulerequest/:requestId', {
|
||||
templateUrl: 'views/loans/viewreschedulerequest.html'
|
||||
})
|
||||
.when('/loans/:loanId/approvereschedulerequest/', {
|
||||
.when('/loans/:loanId/approvereschedulerequest/:requestId', {
|
||||
templateUrl: 'views/loans/approveloanreschedule.html'
|
||||
})
|
||||
.when('/loans/:loanId/rejectreschedulerequest/', {
|
||||
.when('/loans/:loanId/rejectreschedulerequest/:requestId', {
|
||||
templateUrl: 'views/loans/rejectloanreschedule.html'
|
||||
})
|
||||
.when('/loans/:loanId/previewloanrepaymentschedule/', {
|
||||
.when('/loans/:loanId/previewloanrepaymentschedule/:requestId', {
|
||||
templateUrl: 'views/loans/previewloanrepaymentschedule.html'
|
||||
});
|
||||
$locationProvider.html5Mode(false);
|
||||
|
||||
@ -420,9 +420,8 @@
|
||||
template: {method: 'GET',params:{}},
|
||||
preview:{method:'GET',params:{command:'previewLoanReschedule'}},
|
||||
put: {method: 'POST', params: {command:'reschedule'}},
|
||||
reject:{method:'POST',params:{command:'rejectRescheduleRequest'}},
|
||||
approve:{method:'POST',params:{command:'approveRescheduleRequest'}},
|
||||
preview:{method:'GET',params:{associations:'rescheduledRepaymentSchedule'}}
|
||||
reject:{method:'POST',params:{command:'reject'}},
|
||||
approve:{method:'POST',params:{command:'approve'}},
|
||||
}),
|
||||
auditResource: defineResource(apiVer + "/audits/:templateResource", {templateResource: '@templateResource'}, {
|
||||
get: {method: 'GET', params: {}},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user