Update dashboard table reports (#1653)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
e61f4f92e3
commit
9ed38f0f7b
-1
@@ -46,7 +46,6 @@ export class DisburseToSavingsAccountComponent implements OnInit {
|
||||
* Set Disbursement Loan form.
|
||||
*/
|
||||
setDisbursementToSavingsForm() {
|
||||
console.log(this.dataObject);
|
||||
this.disbursementForm = this.formBuilder.group({
|
||||
'actualDisbursementDate': [new Date(), Validators.required],
|
||||
'transactionAmount': [this.dataObject.amount, Validators.required],
|
||||
|
||||
+3
-3
@@ -21,17 +21,17 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Principal</mat-label>
|
||||
<input matInput required formControlName="outstandingPrincipalPortion">
|
||||
<input matInput formControlName="outstandingPrincipalPortion">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Interest</mat-label>
|
||||
<input matInput required formControlName="outstandingInterestPortion">
|
||||
<input matInput formControlName="outstandingInterestPortion">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Fee Amount</mat-label>
|
||||
<input matInput required formControlName="outstandingFeeChargesPortion">
|
||||
<input matInput formControlName="outstandingFeeChargesPortion">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+10
-29
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@@ -13,6 +13,8 @@ import { Dates } from 'app/core/utils/dates';
|
||||
styleUrls: ['./foreclosure.component.scss']
|
||||
})
|
||||
export class ForeclosureComponent implements OnInit {
|
||||
@Input() dataObject: any;
|
||||
|
||||
loanId: any;
|
||||
foreclosureForm: FormGroup;
|
||||
/** Minimum Date allowed. */
|
||||
@@ -20,7 +22,6 @@ export class ForeclosureComponent implements OnInit {
|
||||
/** Maximum Date allowed. */
|
||||
maxDate = new Date();
|
||||
foreclosuredata: any;
|
||||
paymentTypes: any;
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
@@ -46,14 +47,13 @@ export class ForeclosureComponent implements OnInit {
|
||||
|
||||
createforeclosureForm() {
|
||||
this.foreclosureForm = this.formBuilder.group({
|
||||
'transactionDate': [new Date(), Validators.required],
|
||||
'outstandingPrincipalPortion': [{value: '', disabled: true}],
|
||||
'outstandingInterestPortion': [{value: '', disabled: true}],
|
||||
'outstandingFeeChargesPortion': [{value: '', disabled: true}],
|
||||
'outstandingPenaltyChargesPortion': [{value: '', disabled: true}],
|
||||
'transactionAmount': [{value: '', disabled: true}],
|
||||
'interestAccruedAfterDeath': '',
|
||||
'note': ''
|
||||
'transactionDate': [this.dataObject.date && new Date(this.dataObject.date), Validators.required],
|
||||
'outstandingPrincipalPortion': [{value: this.dataObject.principalPortion || 0, disabled: true}],
|
||||
'outstandingInterestPortion': [{value: this.dataObject.interestPortion || 0, disabled: true}],
|
||||
'outstandingFeeChargesPortion': [{value: this.dataObject.feeChargesPortion || 0, disabled: true}],
|
||||
'outstandingPenaltyChargesPortion': [{value: this.dataObject.penaltyChargesPortion || 0, disabled: true}],
|
||||
'transactionAmount': [{value: this.dataObject.amount, disabled: true}],
|
||||
'note': ['', Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,26 +82,7 @@ export class ForeclosureComponent implements OnInit {
|
||||
outstandingInterestPortion: this.foreclosuredata.interestPortion,
|
||||
outstandingFeeChargesPortion: this.foreclosuredata.feeChargesPortion,
|
||||
outstandingPenaltyChargesPortion: this.foreclosuredata.penaltyChargesPortion,
|
||||
foreClosureChargesPortion: this.foreclosuredata.foreClosureChargesPortion
|
||||
});
|
||||
if (this.foreclosuredata.unrecognizedIncomePortion) {
|
||||
this.foreclosureForm.patchValue({
|
||||
interestAccruedAfterDeath: this.foreclosuredata.unrecognizedIncomePortion
|
||||
});
|
||||
}
|
||||
this.calculateTransactionAmount();
|
||||
this.paymentTypes = this.foreclosuredata.paymentTypeOptions;
|
||||
});
|
||||
}
|
||||
|
||||
calculateTransactionAmount() {
|
||||
let transactionAmount = 0;
|
||||
transactionAmount += parseFloat(this.foreclosuredata.principalPortion);
|
||||
transactionAmount += parseFloat(this.foreclosuredata.interestPortion);
|
||||
transactionAmount += parseFloat(this.foreclosuredata.feeChargesPortion);
|
||||
transactionAmount += parseFloat(this.foreclosuredata.penaltyChargesPortion);
|
||||
this.foreclosureForm.patchValue({
|
||||
transactionAmount: transactionAmount
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<mifosx-loans-account-close [dataObject]="actionButtonData" *ngIf="actions['Close']"></mifosx-loans-account-close>
|
||||
<mifosx-undo-approval *ngIf="actions['Undo Approval']"></mifosx-undo-approval>
|
||||
<mifosx-assign-loan-officer *ngIf="actions['Assign Loan Officer']" [dataObject]="actionButtonData" ></mifosx-assign-loan-officer>
|
||||
<mifosx-foreclosure *ngIf="actions['Foreclosure']"></mifosx-foreclosure>
|
||||
<mifosx-foreclosure [dataObject]="actionButtonData" *ngIf="actions['Foreclosure']"></mifosx-foreclosure>
|
||||
<mifosx-prepay-loan [dataObject]="actionButtonData" *ngIf="actions['Prepay Loan']"></mifosx-prepay-loan>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ export class WithdrawnByClientComponent implements OnInit {
|
||||
};
|
||||
this.loanService.loanActionButtons(this.loanId, 'withdrawnByApplicant', data)
|
||||
.subscribe((response: any) => {
|
||||
this.router.navigate(['../../../general'], { relativeTo: this.route });
|
||||
this.router.navigate(['../../general'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ export class WriteOffPageComponent implements OnInit {
|
||||
const loanId = this.route.parent.snapshot.params['loanId'];
|
||||
delete data.amount;
|
||||
this.loanService.submitLoanActionButton(loanId, data, 'writeoff').subscribe((response: any) => {
|
||||
this.router.navigate(['../../../general'], {relativeTo: this.route});
|
||||
this.router.navigate(['../../general'], {relativeTo: this.route});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { LoansAccountButtonConfiguration } from './loan-accounts-button-config';
|
||||
/** Dialog Components */
|
||||
import { ConfirmationDialogComponent } from '../../shared/confirmation-dialog/confirmation-dialog.component';
|
||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||
import { LoanStatus } from '../models/loan-status.nodel';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-loans-view',
|
||||
@@ -38,6 +39,8 @@ export class LoansViewComponent implements OnInit {
|
||||
/** Disburse Transaction number */
|
||||
disburseTransactionNo = 0;
|
||||
|
||||
loanStatus: LoanStatus;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
public loansService: LoansService,
|
||||
@@ -45,6 +48,8 @@ export class LoansViewComponent implements OnInit {
|
||||
this.route.data.subscribe((data: { loanDetailsData: any, loanDatatables: any}) => {
|
||||
this.loanDetailsData = data.loanDetailsData;
|
||||
this.loanDatatables = data.loanDatatables;
|
||||
this.loanStatus = this.loanDetailsData.status;
|
||||
console.log(this.loanStatus);
|
||||
});
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
this.clientId = this.loanDetailsData.clientId;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { LoanStatus } from 'app/loans/models/loan-status.nodel';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component';
|
||||
|
||||
@@ -12,6 +13,7 @@ import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/conf
|
||||
styleUrls: ['./reschedule-loan-tab.component.scss']
|
||||
})
|
||||
export class RescheduleLoanTabComponent implements OnInit {
|
||||
@Input() loanStatus: LoanStatus;
|
||||
|
||||
loanRescheduleData: any;
|
||||
loanRescheduleDataColumns: string[] = ['id', 'rescheduleFromDate', 'reason', 'status', 'actions'];
|
||||
|
||||
Reference in New Issue
Block a user