Recurring Deposit view account homologation (#1910)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-11-26 20:00:42 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 7c53b82965
commit 79595f6a1c
72 changed files with 1591 additions and 1226 deletions
@@ -0,0 +1,122 @@
<div class="fixed-deposits-account-tables" fxLayout="row" fxLayoutGap="2%">
<div fxFlex="49%" fxLayout="column" fxLayoutGap="4%">
<div>
<h4 class="table-headers">{{"labels.heading.Fixed Deposit Details" | translate }}</h4>
<table>
<tbody>
<tr>
<td>{{"labels.inputs.Activated On" | translate }}</td>
<td>{{fixedDepositsAccountData.timeline.activatedOnDate ? (fixedDepositsAccountData.timeline.activatedOnDate | dateFormat) : 'Not Activated'}}</td>
</tr>
<tr *ngIf="fixedDepositsAccountData.timeline.closedOnDate">
<td>{{"labels.inputs.Closed On" | translate }}</td>
<td>{{fixedDepositsAccountData.timeline.closedOnDate | dateFormat}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Field Officer" | translate }}</td>
<td>{{fixedDepositsAccountData.fieldOfficerName ? fixedDepositsAccountData.fieldOfficerName : 'Unassigned'}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Maturity Date" | translate }}</td>
<td>{{fixedDepositsAccountData.maturityDate ? (fixedDepositsAccountData.maturityDate | dateFormat) : 'N/A'}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Deposit Period" | translate }}</td>
<td>{{fixedDepositsAccountData.depositPeriod}}&nbsp;{{fixedDepositsAccountData.depositPeriodFrequency.value}}</td>
</tr>
<tr *ngIf="fixedDepositsAccountData.withHoldTax">
<td>{{"labels.inputs.Tax Group" | translate }}</td>
<td>{{fixedDepositsAccountData.taxGroup.name}}</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4 class="table-headers">{{"labels.heading.Interest Details" | translate }}</h4>
<table>
<tbody>
<tr>
<td>{{"labels.inputs.Interest Rate" | translate }}</td>
<td>{{fixedDepositsAccountData.nominalAnnualInterestRate}}%</td>
</tr>
<tr>
<td>{{"labels.inputs.Interest Compounding Period" | translate }}</td>
<td>{{fixedDepositsAccountData.interestCompoundingPeriodType.value}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Interest Posting Period" | translate }}</td>
<td>{{fixedDepositsAccountData.interestPostingPeriodType.value}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Interest Calculated Using" | translate }}</td>
<td>{{fixedDepositsAccountData.interestCalculationType.value}}</td>
</tr>
<tr>
<td>{{"labels.inputs.No. of Days in Year" | translate }}</td>
<td>{{fixedDepositsAccountData.interestCalculationDaysInYearType.value}}</td>
</tr>
<tr *ngIf="fixedDepositsAccountData.preClosurePenalApplicable">
<td>{{"labels.inputs.Pre-cloure Penal" | translate }}</td>
<td>{{fixedDepositsAccountData.preClosurePenalInterest}} % on {{fixedDepositsAccountData.preClosurePenalInterestOnType.value}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div fxFlex="49%">
<div *ngIf="!fixedDepositsAccountData.status.rejected && !fixedDepositsAccountData.status.submittedAndPendingApproval; else otherDetails">
<h4 class="table-headers">{{"labels.heading.Performance History" | translate }}</h4>
<table>
<tbody>
<tr>
<td>{{"labels.inputs.Principal Amount" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.depositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.maturityAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
<tr *ngIf="fixedDepositsAccountData.summary.totalDeposits">
<td>{{"labels.inputs.Total Deposits" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.summary.totalDeposits | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
<tr *ngIf="fixedDepositsAccountData.summary.totalWithdrawals">
<td>{{"labels.inputs.Total Withdrawals" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.summary.totalWithdrawals | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
<tr *ngIf="fixedDepositsAccountData.summary.totalInterestEarned >= 0">
<td>{{"labels.inputs.Total Interest Earned" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.summary.totalInterestEarned | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
</tbody>
</table>
</div>
<ng-template #otherDetails>
<div>
<h4 class="table-headers">{{"labels.heading.Other Details" | translate }}</h4>
<table>
<tbody>
<tr>
<td>{{"labels.inputs.Principal Amount" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.depositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
<tr>
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
<td class="r-amount">{{fixedDepositsAccountData.maturityAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
</tr>
</tbody>
</table>
</div>
</ng-template>
</div>
</div>
@@ -0,0 +1,3 @@
.fixed-deposits-account-tables {
padding: 1%;
}
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { GeneralTabComponent } from './general-tab.component';
describe('GeneralTabComponent', () => {
let component: GeneralTabComponent;
let fixture: ComponentFixture<GeneralTabComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GeneralTabComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(GeneralTabComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,34 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Currency } from 'app/shared/models/general.model';
@Component({
selector: 'mifosx-general-tab',
templateUrl: './general-tab.component.html',
styleUrls: ['./general-tab.component.scss']
})
export class GeneralTabComponent implements OnInit {
fixedDepositsAccountData: any;
entityType: string;
currency: Currency;
constructor(private route: ActivatedRoute,
private router: Router) {
this.route.parent.data.subscribe((data: { fixedDepositsAccountData: any }) => {
this.fixedDepositsAccountData = data.fixedDepositsAccountData;
this.currency = this.fixedDepositsAccountData.currency;
});
if (this.router.url.includes('clients')) {
this.entityType = 'Client';
} else if (this.router.url.includes('groups')) {
this.entityType = 'Group';
} else if (this.router.url.includes('centers')) {
this.entityType = 'Center';
}
}
ngOnInit(): void {
}
}