Documents and Notes for Clients, Loans and Clients (#1632)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-05 03:19:41 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 28d5d7595f
commit cafe8fa73d
57 changed files with 1119 additions and 468 deletions
@@ -37,6 +37,8 @@
<mat-card-content>
<div fxLayout="row wrap" class="content">
<div fxFlex="100%" [ngClass]="loanChargeColor()">
</div>
<div fxFlex="50%" class="mat-body-strong">
Name
@@ -1,6 +1,8 @@
@import "assets/styles/helper";
.container {
max-width: 37rem;
.content {
div {
margin: 1rem 0;
@@ -8,3 +10,13 @@
}
}
}
.paid {
background-color: $status-active;
height: 4px;
}
.not-paid {
background-color: $status-active-overdue;
height: 4px;
}
@@ -52,7 +52,7 @@ export class ViewChargeComponent {
private settingsService: SettingsService) {
this.route.data.subscribe((data: { loansAccountCharge: any, loanDetailsData: any }) => {
this.chargeData = data.loansAccountCharge;
this.allowPayCharge = (this.chargeData.chargeTimeType.code === 'chargeTimeType.instalmentFee');
this.allowPayCharge = (this.chargeData.chargePayable && !this.chargeData.paid);
this.allowWaive = !this.chargeData.chargeTimeType.waived;
this.loansAccountData = data.loanDetailsData;
});
@@ -72,7 +72,7 @@ export class ViewChargeComponent {
})
];
const data = {
title: 'Pay Charge',
title: `Pay Charge ${this.chargeData.id}`,
layout: { addButtonText: 'Confirm' },
formfields: formfields
};
@@ -173,6 +173,10 @@ export class ViewChargeComponent {
});
}
loanChargeColor(): string {
return this.chargeData.paid ? 'paid' : 'not-paid';
}
/**
* Refetches data fot the component
* TODO: Replace by a custom reload component instead of hard-coded back-routing.