Recurring Deposit view account homologation (#1910)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
7c53b82965
commit
79595f6a1c
@@ -1,13 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
@mixin clients-view-component-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
|
||||
mifosx-clients-view {
|
||||
.client-card {
|
||||
.header {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card class="client-card">
|
||||
<mat-card class="account-card">
|
||||
|
||||
<mat-card-header fxLayout="column" class="header">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<p (click)="doAction('View Signature')" class="signature">{{"labels.inputs.View Signature" | translate}}</p>
|
||||
</div>
|
||||
|
||||
<div class="mat-typography client-card-title">
|
||||
<div class="mat-typography account-card-title">
|
||||
|
||||
<mat-card-title fxLayout="row wrap" class="content">
|
||||
<h3 fxFlex="95%">
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
.client-card {
|
||||
margin: 0 auto;
|
||||
max-width: 80rem;
|
||||
width: 90%;
|
||||
padding: 0;
|
||||
.account-card {
|
||||
.header {
|
||||
padding: 1%;
|
||||
.header-title-group {
|
||||
.client-card-title {
|
||||
color: white;
|
||||
width: 90%;
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
.profile-image-container {
|
||||
margin: 4px;
|
||||
.profile-image {
|
||||
object-fit: cover;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.client-image-button {
|
||||
min-width: 26px;
|
||||
padding: 0 6px;
|
||||
@@ -37,19 +18,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.client-actions {
|
||||
align-self: flex-end;
|
||||
margin: 0 1%;
|
||||
i {
|
||||
margin-bottom: 2px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigation-tabs {
|
||||
overflow: auto;
|
||||
}
|
||||
i:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="openSavingsColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: openSavingsColumns;"
|
||||
[routerLink]="['../', 'savings-accounts', row.id, 'transactions']"></tr>
|
||||
[routerLink]="['../', 'savings-accounts', row.id, 'general']"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="closedSavingsColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;" [routerLink]="['../', 'savings-accounts', row.id, 'transactions']"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;" [routerLink]="['../', 'savings-accounts', row.id, 'general']"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="openSavingsColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: openSavingsColumns;"
|
||||
[routerLink]="['../', 'fixed-deposits-accounts', row.id, 'interest-rate-chart']"></tr>
|
||||
[routerLink]="['../', 'fixed-deposits-accounts', row.id, 'general']"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="closedSavingsColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;"
|
||||
[routerLink]="['../', 'fixed-deposits-account', row.id]"></tr>
|
||||
[routerLink]="['../', 'fixed-deposits-accounts', row.id, 'general']"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -498,7 +498,7 @@
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="openSavingsColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: openSavingsColumns;"
|
||||
[routerLink]="['../', 'recurringdeposits', row.id, 'interest-rate-chart']" class="select-row"></tr>
|
||||
[routerLink]="['../', 'recurringdeposits', row.id, 'general']" class="select-row"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -525,7 +525,7 @@
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="closedSavingsColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;"
|
||||
[routerLink]="['../', 'recurringdeposits', row.id, 'interest-rate-chart']" class="select-row"></tr>
|
||||
[routerLink]="['../', 'recurringdeposits', row.id, 'general']" class="select-row"></tr>
|
||||
</table>
|
||||
|
||||
<!-- Shares overview Table -->
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
@mixin fixed-deposits-account-view-component-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
mifosx-fixed-deposit-account-view {
|
||||
.fixed-deposits-account-card {
|
||||
.header {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
}
|
||||
.table-headers {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
color: mat.get-contrast-color-from-palette($primary, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+40
-155
@@ -1,4 +1,4 @@
|
||||
<mat-card class="fixed-deposits-account-card">
|
||||
<mat-card class="account-card">
|
||||
|
||||
<mat-card-header fxLayout="column" class="header">
|
||||
|
||||
@@ -14,12 +14,42 @@
|
||||
|
||||
<div class="mat-typography account-card-title">
|
||||
<mat-card-title>
|
||||
<h3>
|
||||
<i class="fa fa-stop" [ngClass]="fixedDepositsAccountData.status.code | statusLookup" [matTooltip]="fixedDepositsAccountData.status.value"></i>
|
||||
{{"labels.inputs.Account Name" | translate }} : {{fixedDepositsAccountData.depositProductName}}
|
||||
</h3>
|
||||
|
||||
<div fxFlex="60%">
|
||||
<h3>
|
||||
<i class="fa fa-stop" [ngClass]="fixedDepositsAccountData.status.code | statusLookup" [matTooltip]="fixedDepositsAccountData.status.value"></i>
|
||||
{{"labels.inputs.Fixed Deposit Product" | translate }} : {{fixedDepositsAccountData.depositProductName}}
|
||||
<mifosx-account-number accountNo="{{fixedDepositsAccountData.accountNo}}"></mifosx-account-number>
|
||||
</h3>
|
||||
<span class="account-overview">
|
||||
{{'labels.text.' + entityType | translate}} {{"labels.inputs.name" | translate}}: {{fixedDepositsAccountData.clientName ||
|
||||
fixedDepositsAccountData.groupName}}
|
||||
<span class="m-l-10" *ngIf="fixedDepositsAccountData.clientAccountNo">
|
||||
<mifosx-account-number accountNo="{{fixedDepositsAccountData.clientAccountNo}}"></mifosx-account-number>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!fixedDepositsAccountData.status.rejected && !fixedDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h3> {{"labels.heading.Account Overview" | translate}} </h3>
|
||||
<table class="account-overview">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Current Balance" | translate }}</td>
|
||||
<td class="r-amount">{{fixedDepositsAccountData.summary.accountBalance | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Deposit Amount" | translate }}</td>
|
||||
<td class="r-amount">{{fixedDepositsAccountData.depositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<span fxFlex="auto"></span>
|
||||
|
||||
<div fxFlex="5%">
|
||||
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Loan account actions"
|
||||
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Fixed Deposit account actions"
|
||||
yPosition="below">
|
||||
<mat-icon matListIcon class="actions-menu">
|
||||
<fa-icon icon="bars" size="sm"></fa-icon>
|
||||
@@ -27,15 +57,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
<mat-card-subtitle>
|
||||
<p>
|
||||
{{"labels.inputs.Account" | translate }} #: {{fixedDepositsAccountData.accountNo}} | {{"labels.inputs.Client Name" | translate }}: {{fixedDepositsAccountData.clientName}}<br/>
|
||||
<span *ngIf="!fixedDepositsAccountData.status.rejected && !fixedDepositsAccountData.status.submittedAndPendingApproval">
|
||||
{{"labels.inputs.Current Balance" | translate }}: {{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.summary.accountBalance}}<br/>
|
||||
{{"labels.inputs.Deposit Amount" | translate }}: {{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.depositAmount}}<br/>
|
||||
</span>
|
||||
</p>
|
||||
</mat-card-subtitle>
|
||||
</div>
|
||||
|
||||
<mat-menu #accountMenu="matMenu">
|
||||
@@ -56,151 +77,15 @@
|
||||
|
||||
</mat-card-title-group>
|
||||
|
||||
<mat-card-actions class="account-actions">
|
||||
|
||||
<ng-container *ngFor="let button of buttonConfig.singleButtons">
|
||||
<button mat-raised-button (click)="doAction(button.name)">
|
||||
<i ngClass="{{button.icon}}"></i> {{button.name}}</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.options.length">
|
||||
<button mat-raised-button [matMenuTriggerFor]="More">{{"labels.buttons.More" | translate }}</button>
|
||||
<mat-menu #More="matMenu">
|
||||
<span *ngFor="let option of buttonConfig.options">
|
||||
<button mat-menu-item (click)="doAction(option.name)">{{option.name}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content class="content">
|
||||
|
||||
<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}} {{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>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.depositAmount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
|
||||
<td>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.maturityAmount}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="fixedDepositsAccountData.summary.totalDeposits">
|
||||
<td>{{"labels.inputs.Total Deposits" | translate }}</td>
|
||||
<td>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.summary.totalDeposits}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="fixedDepositsAccountData.summary.totalWithdrawals">
|
||||
<td>{{"labels.inputs.Total Withdrawals" | translate }}</td>
|
||||
<td>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.summary.totalWithdrawals}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="fixedDepositsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td>{{"labels.inputs.Total Interest Earned" | translate }}</td>
|
||||
<td>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.summary.totalInterestEarned}}</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>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.depositAmount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
|
||||
<td>{{fixedDepositsAccountData.currency.displaySymbol}} {{fixedDepositsAccountData.maturityAmount}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<nav mat-tab-nav-bar class="navigation-tabs">
|
||||
<a mat-tab-link [routerLink]="['./general']" routerLinkActive #general="routerLinkActive"
|
||||
[active]="general.isActive">
|
||||
{{"labels.inputs.General" | translate }}
|
||||
</a>
|
||||
<a mat-tab-link [routerLink]="['./interest-rate-chart']" routerLinkActive #IRC="routerLinkActive"
|
||||
[active]="IRC.isActive">
|
||||
{{"labels.inputs.Interest Rate Chart" | translate }}
|
||||
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
.fixed-deposits-account-card {
|
||||
margin: 0 auto;
|
||||
max-width: 80rem;
|
||||
width: 90%;
|
||||
padding: 0;
|
||||
.header {
|
||||
padding: 1%;
|
||||
.header-title-group {
|
||||
.account-card-title {
|
||||
color: white;
|
||||
width: 90%;
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
.profile-image-container {
|
||||
margin: 1%;
|
||||
.profile-image {
|
||||
object-fit: cover;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
.account-actions {
|
||||
align-self: flex-end;
|
||||
margin: 0 1%;
|
||||
i {
|
||||
margin-bottom: 2px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigation-tabs {
|
||||
background-color: #f2f2f2;
|
||||
overflow: auto;
|
||||
}
|
||||
.content {
|
||||
.fixed-deposits-account-tables {
|
||||
padding: 1%;
|
||||
margin: 1%;
|
||||
.table-headers {
|
||||
margin: 0;
|
||||
padding: 6px;
|
||||
}
|
||||
td {
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
i, img:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -15,6 +15,7 @@ import { FixedDepositsButtonsConfiguration } from './fixed-deposits-buttons.conf
|
||||
/** Custom Services */
|
||||
import { FixedDepositsService } from '../fixed-deposits.service';
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
/**
|
||||
* Fixed Deposits Account View Component
|
||||
@@ -34,7 +35,7 @@ export class FixedDepositAccountViewComponent implements OnInit {
|
||||
buttonConfig: FixedDepositsButtonsConfiguration;
|
||||
/** Entity Type */
|
||||
entityType: string;
|
||||
currencyCode: string;
|
||||
currency: Currency;
|
||||
|
||||
/**
|
||||
* Fetches fixed deposits account data from `resolve`
|
||||
@@ -52,7 +53,7 @@ export class FixedDepositAccountViewComponent implements OnInit {
|
||||
this.route.data.subscribe((data: { fixedDepositsAccountData: any, savingsDatatables: any }) => {
|
||||
this.fixedDepositsAccountData = data.fixedDepositsAccountData;
|
||||
this.savingsDatatables = data.savingsDatatables;
|
||||
this.currencyCode = this.fixedDepositsAccountData.currency.code;
|
||||
this.currency = this.fixedDepositsAccountData.currency;
|
||||
});
|
||||
if (this.router.url.includes('clients')) {
|
||||
this.entityType = 'Client';
|
||||
|
||||
+122
@@ -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}} {{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>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
.fixed-deposits-account-tables {
|
||||
padding: 1%;
|
||||
}
|
||||
+23
@@ -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();
|
||||
});
|
||||
});
|
||||
+34
@@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
+14
@@ -40,6 +40,20 @@
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.runningBalance }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Actions" | translate }} </th>
|
||||
<td mat-cell class="center" *matCellDef="let transaction">
|
||||
<button class="account-action-button" mat-raised-button color="primary" (click)="routeEdit($event)" [routerLink]="[transaction.id, 'reciept']">
|
||||
<i class="fa fa-file" matTooltip="View Reciept"></i>
|
||||
</button>
|
||||
<button class="account-action-button" mat-raised-button color="primary" matTooltip="View Journal Entries"
|
||||
matTooltipPosition="left" (click)="routeEdit($event)"
|
||||
[routerLink]="['/','journal-entry', 'view', 'S'+transaction.id ]">
|
||||
<i class="fa fa-arrow-circle-right"></i>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row" (click)="showTransactions(row)"></tr>
|
||||
|
||||
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
<div fxLayoutAlign="end" class="container m-b-20" fxLayoutGap="2%">
|
||||
<span *ngIf="allowUndo()">
|
||||
<button mat-raised-button color="warn" *mifosxHasPermission="'UNDOTRANSACTION_SAVINGSACCOUNT'"
|
||||
(click)="undoTransaction()">
|
||||
<fa-icon icon="undo" class="m-r-10"></fa-icon>Undo
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="container">
|
||||
|
||||
<mat-card>
|
||||
|
||||
+39
-7
@@ -1,7 +1,11 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { UndoTransactionDialogComponent } from 'app/savings/savings-account-view/custom-dialogs/undo-transaction-dialog/undo-transaction-dialog.component';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* View Transaction Component.
|
||||
@@ -12,18 +16,23 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
styleUrls: ['./view-transaction.component.scss']
|
||||
})
|
||||
export class ViewTransactionComponent {
|
||||
|
||||
accountId: string;
|
||||
transactionId: string;
|
||||
/** Transaction data. */
|
||||
transactionData: any;
|
||||
|
||||
/**
|
||||
* Retrieves the Transaction data from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {MatDialog} dialog Dialog reference.
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
public dialog: MatDialog) {
|
||||
constructor(private savingsService: SavingsService,
|
||||
private route: ActivatedRoute,
|
||||
private dateUtils: Dates,
|
||||
private router: Router,
|
||||
public dialog: MatDialog,
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { fixedDepositsAccountTransaction: any }) => {
|
||||
console.log(this.route.parent.snapshot.params);
|
||||
this.accountId = this.route.parent.snapshot.params['fixedDepositAccountId'];
|
||||
|
||||
this.transactionData = data.fixedDepositsAccountTransaction;
|
||||
});
|
||||
}
|
||||
@@ -35,4 +44,27 @@ export class ViewTransactionComponent {
|
||||
return 'active';
|
||||
}
|
||||
|
||||
allowUndo(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
undoTransaction(): void {
|
||||
const undoTransactionAccountDialogRef = this.dialog.open(UndoTransactionDialogComponent);
|
||||
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.confirm) {
|
||||
const locale = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const data = {
|
||||
transactionDate: this.dateUtils.formatDate(this.transactionData.date && new Date(this.transactionData.date), dateFormat),
|
||||
transactionAmount: 0,
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId, 'undo', data, this.transactionData.id).subscribe(() => {
|
||||
this.router.navigate(['../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import { FixedDepositsAccountTransactionResolver } from './common-resolvers/fixe
|
||||
import { FixedDepositsAccountActionsResolver } from './common-resolvers/fixed-deposit-account-actions.resolver';
|
||||
import { FixedDepositsAccountTemplateResolver } from './common-resolvers/fixed-deposit-account-template.resolver';
|
||||
import { FixedDepositsAccountAndTemplateResolver } from './common-resolvers/fixed-deposit-account-and-template.resolver';
|
||||
import { GeneralTabComponent } from './fixed-deposit-account-view/general-tab/general-tab.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@@ -53,9 +54,14 @@ const routes: Routes = [
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'transactions',
|
||||
redirectTo: 'general',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'general',
|
||||
component: GeneralTabComponent,
|
||||
data: { title: 'Fixed Deposit Account Details', breadcrumb: 'General', routeParamBreadcrumb: false },
|
||||
},
|
||||
{
|
||||
path: 'interest-rate-chart',
|
||||
component: InterestRateChartTabComponent,
|
||||
|
||||
@@ -38,6 +38,7 @@ import { FixedDepositAccountInterestRateChartStepComponent } from './fixed-depos
|
||||
import { FixedDepositAccountPreviewStepComponent } from './fixed-deposit-account-stepper/fixed-deposit-account-preview-step/fixed-deposit-account-preview-step.component';
|
||||
import { FixedDepositAccountCurrencyStepComponent } from './fixed-deposit-account-stepper/fixed-deposit-account-currency-step/fixed-deposit-account-currency-step.component';
|
||||
import { EditFixedDepositAccountComponent } from './edit-fixed-deposit-account/edit-fixed-deposit-account.component';
|
||||
import { GeneralTabComponent } from './fixed-deposit-account-view/general-tab/general-tab.component';
|
||||
|
||||
/**
|
||||
* Fixed Deposits Module
|
||||
@@ -75,7 +76,8 @@ import { EditFixedDepositAccountComponent } from './edit-fixed-deposit-account/e
|
||||
FixedDepositAccountInterestRateChartStepComponent,
|
||||
FixedDepositAccountPreviewStepComponent,
|
||||
FixedDepositAccountCurrencyStepComponent,
|
||||
EditFixedDepositAccountComponent
|
||||
EditFixedDepositAccountComponent,
|
||||
GeneralTabComponent
|
||||
],
|
||||
imports: [
|
||||
SharedModule,
|
||||
|
||||
+13
-13
@@ -19,11 +19,13 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{"labels.inputs.Transaction Amount" | translate }}</mat-label>
|
||||
<input matInput required formControlName="transactionAmount">
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>{{"labels.inputs.Transaction Amount" | translate}}</mat-label>
|
||||
<span matTextSuffix class="m-l-10">{{ currency.code }}</span>
|
||||
<span fxFlex="auto"></span>
|
||||
<input type="number" matInput required class="right-input" formControlName="transactionAmount">
|
||||
<mat-error *ngIf="depositRecurringDepositForm.controls.transactionAmount.hasError('required')">
|
||||
{{"labels.inputs.Transaction Amount" | translate }} {{ "labels.commons.is" |translate}} <strong>{{ "labels.commons.required" |translate}}</strong>
|
||||
{{"labels.inputs.Transaction Amount" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -40,14 +42,12 @@
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="25%">{{"labels.inputs.Show Payment Details" | translate }}</span>
|
||||
<span fxFlex="75%" class="expandcollapsebutton" (click)="toggleDisplay()">
|
||||
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle>
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">{{"labels.inputs.Show Payment Details" | translate}}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{"labels.inputs.Cheque" | translate }} #</mat-label>
|
||||
<input matInput formControlName="chequeNumber">
|
||||
<input matInput formControlName="checkNumber">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+8
@@ -6,3 +6,11 @@
|
||||
margin-top: -7px;
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.right-input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.right-label {
|
||||
padding-right: 25px !important;
|
||||
}
|
||||
|
||||
+25
-7
@@ -1,12 +1,13 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
/**
|
||||
* Deposits Recurring Deposits Account Component
|
||||
@@ -18,6 +19,8 @@ import { Dates } from 'app/core/utils/dates';
|
||||
})
|
||||
export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
|
||||
@Input() currency: Currency;
|
||||
|
||||
/** Transactions Amount */
|
||||
transactionAmount: any;
|
||||
/** Outstanding Charge Amount */
|
||||
@@ -75,15 +78,30 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
'transactionDate': [new Date(), Validators.required],
|
||||
'transactionAmount': [this.transactionAmount, Validators.required],
|
||||
'paymentTypeId': ['', Validators.required],
|
||||
'accountNumber': '',
|
||||
'chequeNumber': '',
|
||||
'routingCode': '',
|
||||
'receiptNumber': '',
|
||||
'bankNumber': '',
|
||||
'note': ''
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add payment detail fields to the UI.
|
||||
*/
|
||||
addPaymentDetails() {
|
||||
this.showPaymentDetails = !this.showPaymentDetails;
|
||||
if (this.showPaymentDetails) {
|
||||
this.depositRecurringDepositForm.addControl('accountNumber', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('checkNumber', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('routingCode', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('receiptNumber', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('bankNumber', new UntypedFormControl(''));
|
||||
} else {
|
||||
this.depositRecurringDepositForm.removeControl('accountNumber');
|
||||
this.depositRecurringDepositForm.removeControl('checkNumber');
|
||||
this.depositRecurringDepositForm.removeControl('routingCode');
|
||||
this.depositRecurringDepositForm.removeControl('receiptNumber');
|
||||
this.depositRecurringDepositForm.removeControl('bankNumber');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the display of payment details
|
||||
*/
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
<mifosx-undo-approval-recurring-deposits-account *ngIf="actions['Undo Approval']"></mifosx-undo-approval-recurring-deposits-account>
|
||||
<mifosx-approve-recurring-deposits-account *ngIf="actions['Approve']"></mifosx-approve-recurring-deposits-account>
|
||||
<mifosx-reject-recurring-deposits-account *ngIf="actions['Reject']"></mifosx-reject-recurring-deposits-account>
|
||||
<mifosx-withdraw-by-client-recurring-deposits-account *ngIf="actions['Withdraw By Client']"></mifosx-withdraw-by-client-recurring-deposits-account>
|
||||
<mifosx-withdraw-by-client-recurring-deposits-account *ngIf="actions['Withdrawn by client']"></mifosx-withdraw-by-client-recurring-deposits-account>
|
||||
<mifosx-add-charge-recurring-deposits-account *ngIf="actions['Add Charge']"></mifosx-add-charge-recurring-deposits-account>
|
||||
<mifosx-premature-close-recurring-deposit-account *ngIf="actions['Premature Close']"></mifosx-premature-close-recurring-deposit-account>
|
||||
<mifosx-close-recurring-deposits-account *ngIf="actions['Close']"></mifosx-close-recurring-deposits-account>
|
||||
<mifosx-deposit-recurring-deposits-account *ngIf="actions['Deposit']"></mifosx-deposit-recurring-deposits-account>
|
||||
<mifosx-deposit-recurring-deposits-account [currency]="currency" *ngIf="actions['Deposit']"></mifosx-deposit-recurring-deposits-account>
|
||||
|
||||
+11
-3
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-recurring-deposits-account-actions',
|
||||
@@ -14,7 +15,7 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
'Undo Approval': boolean
|
||||
'Approve': boolean
|
||||
'Reject': boolean
|
||||
'Withdraw By Client': boolean
|
||||
'Withdrawn by client': boolean
|
||||
'Add Charge': boolean
|
||||
'Premature Close': boolean
|
||||
'Close': boolean
|
||||
@@ -24,17 +25,24 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
'Undo Approval': false,
|
||||
'Approve': false,
|
||||
'Reject': false,
|
||||
'Withdraw By Client': false,
|
||||
'Withdrawn by client': false,
|
||||
'Add Charge': false,
|
||||
'Premature Close': false,
|
||||
'Close': false,
|
||||
'Deposit': false
|
||||
};
|
||||
|
||||
currency: Currency;
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
||||
if (data.recurringDepositsAccountActionData) {
|
||||
this.currency = data.recurringDepositsAccountActionData.currency;
|
||||
}
|
||||
});
|
||||
const name = this.route.snapshot.params['name'];
|
||||
this.actions[name] = true;
|
||||
}
|
||||
|
||||
+286
@@ -0,0 +1,286 @@
|
||||
|
||||
<div class="recurring-deposits-account-tables" fxLayout="row" fxLayoutGap="2%">
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{"labels.heading.Account Details" | translate }}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Field Officer" | translate }}</td>
|
||||
<td>{{recurringDepositsAccountData.fieldOfficerName}}<span
|
||||
*ngIf="!recurringDepositsAccountData.fieldOfficerName">{{"labels.inputs.Unassigned" | translate }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Activation date" | translate }}</td>
|
||||
<td>{{recurringDepositsAccountData.timeline.activatedOnDate | dateFormat}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Maturity Date" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.maturityDate | dateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr
|
||||
*ngIf="recurringDepositsAccountData.timeline.closedOnDate || recurringDepositsAccountData.summary.totalWitddrawals">
|
||||
<td *ngIf="recurringDepositsAccountData.timeline.closedOnDate">
|
||||
{{"labels.inputs.Closed on Date" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.timeline.closedOnDate | dateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>{{recurringDepositsAccountData.recurringFrequency}}
|
||||
{{recurringDepositsAccountData.recurringFrequencyType.value}}
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.minBalanceForInterestCalculation">
|
||||
<td> {{"labels.inputs.Balance Required For Interest Calculation" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.minBalanceForInterestCalculation}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.witdHoldTax">
|
||||
<td> {{"labels.inputs.Witdhold Tax Group" | translate }} </td>
|
||||
<td><span>{{recurringDepositsAccountData.taxGroup.name}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{"labels.heading.Performance History" | translate }}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Principal Amount" | translate }}</td>
|
||||
<td class="r-amount">
|
||||
<span>{{recurringDepositsAccountData.depositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
|
||||
<td class="r-amount">
|
||||
<span>{{recurringDepositsAccountData.maturityAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Recurring Deposit Amount" | translate }}</td>
|
||||
<td class="r-amount">
|
||||
<span>{{recurringDepositsAccountData?.mandatoryRecommendedDepositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Deposits till Date" | translate }}</td>
|
||||
<td class="r-amount"><span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalDeposits">{{recurringDepositsAccountData.summary.totalDeposits | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalDeposits">{{ 0 | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Withdrwals till Date" | translate }}</td>
|
||||
<td class="r-amount"><span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalWithdrawals">{{recurringDepositsAccountData.summary.totalWithdrawals | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalWithdrawals">{{ 0 | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td>{{"labels.inputs.Interest Earned" | translate }}</td>
|
||||
<td class="r-amount"><span>{{recurringDepositsAccountData.summary.totalInterestEarned | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Date of Deposit" | translate }}</td>
|
||||
<td>
|
||||
<span *ngIf="!recurringDepositsAccountData.expectedFirstDepositOnDate">{{recurringDepositsAccountData.timeline.activatedOnDate | dateFormat}}
|
||||
<span *ngIf="!recurringDepositsAccountData.timeline.activatedOnDate">{{"labels.inputs.Not Activated" | translate }}</span>
|
||||
</span>
|
||||
<span *ngIf="recurringDepositsAccountData.expectedFirstDepositOnDate" >{{recurringDepositsAccountData.expectedFirstDepositOnDate | dateFormat}}
|
||||
<span *ngIf="!recurringDepositsAccountData.expectedFirstDepositOnDate">{{"labels.inputs.Not Activated" | translate }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Period" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData.depositPeriod}} {{recurringDepositsAccountData.depositPeriodFrequency.value}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.maturityDate">
|
||||
<td>{{"labels.inputs.Maturity Date" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.maturityDate | dateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Total Deposits" | translate }}</td>
|
||||
<td class="r-amount">
|
||||
<span *ngIf="recurringDepositsAccountData.summary.totalDeposits">{{ recurringDepositsAccountData.summary.totalDeposits | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span *ngIf="!recurringDepositsAccountData.summary.totalDeposits">{{ 0 | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td> {{"labels.inputs.Actual Available Balance" | translate }}</td>
|
||||
<td>{{ recurringDepositsAccountData.currency.displaySymbol }} {{ recurringDepositsAccountData.summary.accountBalance }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{"labels.inputs.Recurring Deposit Amount" | translate }}</td>
|
||||
<td class="r-amount">
|
||||
{{ recurringDepositsAccountData.mandatoryRecommendedDepositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalInterestEarned">
|
||||
<td> {{"labels.inputs.Interests Earned" | translate }} </td>
|
||||
<td><span>{{ recurringDepositsAccountData.currency.displaySymbol }} {{ recurringDepositsAccountData.summary.totalInterestEarned }}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalWithdrawals">
|
||||
<td> {{"labels.inputs.Total Withdrawls" | translate }} </td>
|
||||
<td class="r-amount">
|
||||
<span>{{ recurringDepositsAccountData.summary.totalWithdrawals | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.minBalanceForInterestCalculation">
|
||||
<td> {{"labels.inputs.Balance Required For Interest Calculation" | translate }} </td>
|
||||
<td class="r-amount">
|
||||
<span>{{ recurringDepositsAccountData.minBalanceForInterestCalculation | number }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Principal Amount" | translate }}</td>
|
||||
<td class="r-amount"><span
|
||||
*ngIf="recurringDepositsAccountData.depositAmount">{{ recurringDepositsAccountData.depositAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.depositAmount">{{ 0 | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Rate of Interest" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData.nominalAnnualInterestRate}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.maturityDate">
|
||||
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
|
||||
<td>
|
||||
<span>{{ recurringDepositsAccountData.maturityAmount | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Total Withdrawls" | translate }} </td>
|
||||
<td class="r-amount">
|
||||
<span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalWithdrawals">{{ recurringDepositsAccountData.summary.totalWithdrawals | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalWithdrawals">{{ 0 | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.timeline.closedOnDate">
|
||||
<td> {{"labels.inputs.Closed on Date" | translate }} </td>
|
||||
<td>
|
||||
{{ recurringDepositsAccountData.timeline.closedOnDate | dateFormat }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{"labels.inputs.Deposits Frequency" | translate }} </td>
|
||||
<td>
|
||||
{{ recurringDepositsAccountData.recurringFrequency }} {{ recurringDepositsAccountData.recurringFrequencyType.value }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalInterestEarned">
|
||||
<td> {{"labels.inputs.Interests Posted" | translate }} </td>
|
||||
<td class="r-amount">
|
||||
<span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalInterestPosted">{{recurringDepositsAccountData.summary.totalInterestPosted | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalInterestPosted">{{ 0 | currency:currency.code:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="recurring-deposits-account-tables" fxLayout="row" fxLayoutGap="2%">
|
||||
<div fxFlex="49%"
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{"labels.heading.Interest Details" | translate }}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Rate" | translate }}</td>
|
||||
<td class="r-amount">{{recurringDepositsAccountData.nominalAnnualInterestRate}}%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Compounding Period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCompoundingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Posting Period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestPostingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest calculated using" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td># {{"labels.inputs.Days in Year" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationDaysInYearType.value}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.preClosurePenalApplicable">
|
||||
<td>{{"labels.inputs.Pre-closure penal Interest (less)" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.preClosurePenalInterest}} % on
|
||||
{{recurringDepositsAccountData.preClosurePenalInterestOnType.value}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Compounding Period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCompoundingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Posting Period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestPostingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest calculated using" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td># {{"labels.inputs.Days in Year" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationDaysInYearType.value}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.preClosurePenalApplicable">
|
||||
<td>{{"labels.inputs.Pre-closure penal Interest (less)" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.preClosurePenalInterest}} % on
|
||||
{{recurringDepositsAccountData.preClosurePenalInterestOnType.value}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.witdHoldTax">
|
||||
<td> {{"labels.inputs.Witdhold Tax Group" | translate }} </td>
|
||||
<td><span>{{recurringDepositsAccountData.taxGroup.name}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
.recurring-deposits-account-tables {
|
||||
padding: 1%;
|
||||
}
|
||||
+23
@@ -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();
|
||||
});
|
||||
});
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
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 {
|
||||
|
||||
recurringDepositsAccountData: any;
|
||||
isprematureAllowed = false;
|
||||
entityType: string;
|
||||
currency: Currency;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
this.route.parent.data.subscribe((data: { recurringDepositsAccountData: any }) => {
|
||||
this.recurringDepositsAccountData = data.recurringDepositsAccountData;
|
||||
this.currency = this.recurringDepositsAccountData.currency;
|
||||
this.isprematureAllowed = data.recurringDepositsAccountData.maturityDate != null;
|
||||
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 {
|
||||
}
|
||||
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
@mixin recurring-deposits-account-view-component-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
mifosx-recurring-deposits-account-view {
|
||||
.recurringDeposits-account-card {
|
||||
.header {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
}
|
||||
.table-headers {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
color: mat.get-contrast-color-from-palette($primary, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+86
-354
@@ -1,4 +1,4 @@
|
||||
<mat-card class="recurring-deposits-account-card">
|
||||
<mat-card class="account-card">
|
||||
|
||||
<mat-card-header fxLayout="column" class="header">
|
||||
|
||||
@@ -13,11 +13,49 @@
|
||||
|
||||
<div class="mat-typography account-card-title">
|
||||
<mat-card-title>
|
||||
<h3 fxFlex="95%">
|
||||
<i class="fa fa-stop" [ngClass]="recurringDepositsAccountData.status.code | statusLookup"
|
||||
[matTooltip]="recurringDepositsAccountData.status.value"></i>
|
||||
{{"labels.inputs.Account Name" | translate }} : {{recurringDepositsAccountData.depositProductName}}
|
||||
</h3>
|
||||
<div fxFlex="60%">
|
||||
<h3>
|
||||
<i class="fa fa-stop" [ngClass]="recurringDepositsAccountData.status.code | statusLookup"
|
||||
[matTooltip]="recurringDepositsAccountData.status.value"></i>
|
||||
{{"labels.inputs.Recurring Deposit" | translate }} : {{recurringDepositsAccountData.depositProductName}}
|
||||
<mifosx-account-number accountNo="{{recurringDepositsAccountData.accountNo}}"></mifosx-account-number>
|
||||
</h3>
|
||||
<span class="account-overview">
|
||||
{{'labels.text.' + entityType | translate}} {{"labels.inputs.name" | translate}}:
|
||||
{{recurringDepositsAccountData.clientName ||
|
||||
recurringDepositsAccountData.groupName}}
|
||||
<span class="m-l-10" *ngIf="recurringDepositsAccountData.clientAccountNo">
|
||||
<mifosx-account-number
|
||||
accountNo="{{recurringDepositsAccountData.clientAccountNo}}"></mifosx-account-number>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h3> {{"labels.heading.Account Overview" | translate}} </h3>
|
||||
<table class="account-overview">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Current Balance" | translate }}</td>
|
||||
<td class="r-amount">{{recurringDepositsAccountData.summary.accountBalance |
|
||||
currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Deposit Amount" | translate }}</td>
|
||||
<td class="r-amount">{{recurringDepositsAccountData.depositAmount |
|
||||
currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Deposit Period" | translate }}</td>
|
||||
<td class="r-amount">{{recurringDepositsAccountData.depositPeriod | number}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<span fxFlex="auto"></span>
|
||||
|
||||
<div fxFlex="5%">
|
||||
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Loan account actions"
|
||||
yPosition="below">
|
||||
@@ -27,33 +65,26 @@
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
<mat-card-subtitle>
|
||||
<p>
|
||||
{{"labels.inputs.Account" | translate }} #: {{recurringDepositsAccountData.accountNo}} | {{"labels.inputs.Client Name" | translate }}:
|
||||
{{recurringDepositsAccountData.clientName}}<br />
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
{{"labels.inputs.Current Balance" | translate }}:
|
||||
{{recurringDepositsAccountData.currency.displaySymbol}} {{recurringDepositsAccountData.summary.accountBalance}}<br />
|
||||
{{"labels.inputs.Available Balance" | translate }}:
|
||||
{{recurringDepositsAccountData.currency.displaySymbol}} {{recurringDepositsAccountData.summary.availableBalance}}<br />
|
||||
</span>
|
||||
</p>
|
||||
</mat-card-subtitle>
|
||||
|
||||
</div>
|
||||
|
||||
<mat-menu #accountMenu="matMenu">
|
||||
<ng-container *ngFor="let button of buttonConfig.singleButtons">
|
||||
<button mat-raised-button (click)="doAction(button.name)">
|
||||
<i ngClass="{{button.icon}}"></i> {{button.name}}</button>
|
||||
<ng-container *ngFor="let item of buttonConfig.singleButtons">
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName" (click)="doAction(item.name)">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="{{item.icon}}" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span> {{'labels.menus.' + item.name | translate}} </span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.options.length">
|
||||
<button mat-raised-button [matMenuTriggerFor]="More">More</button>
|
||||
<button mat-menu-item [matMenuTriggerFor]="More">{{'labels.menus.More' | translate}}</button>
|
||||
<mat-menu #More="matMenu">
|
||||
<span *ngFor="let option of buttonConfig.options">
|
||||
<button mat-menu-item (click)="doAction(option.name)">{{option.name}}</button>
|
||||
</span>
|
||||
<span *ngFor="let option of buttonConfig.options">
|
||||
<button mat-menu-item *mifosxHasPermission="option.taskPermissionName"
|
||||
(click)="doAction(option.name)">{{'labels.menus.' + option.name | translate}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
@@ -61,341 +92,42 @@
|
||||
|
||||
</mat-card-title-group>
|
||||
|
||||
<mat-card-actions class="account-actions">
|
||||
|
||||
<ng-container *ngFor="let button of buttonConfig.singleButtons">
|
||||
<button mat-raised-button (click)="doAction(button.name)">
|
||||
<i ngClass="{{button.icon}}"></i> {{button.name}}</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.options.length">
|
||||
<button mat-raised-button [matMenuTriggerFor]="More">{{"labels.buttons.More" | translate }}</button>
|
||||
<mat-menu #More="matMenu">
|
||||
<span *ngFor="let option of buttonConfig.options">
|
||||
<button mat-menu-item (click)="doAction(option.name)">{{option.name}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content class="content">
|
||||
|
||||
<div class="recurring-deposits-account-tables" fxLayout="row" fxLayoutGap="2%">
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{"labels.heading.Savings Details" | translate }}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Field Officer" | translate }}</td>
|
||||
<td>{{recurringDepositsAccountData.fieldOfficerName}}<span
|
||||
*ngIf="!recurringDepositsAccountData.fieldOfficerName">{{"labels.inputs.Unassigned" | translate }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Activation date" | translate }}</td>
|
||||
<td>{{recurringDepositsAccountData.timeline.activatedOnDate | dateFormat}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Maturity Date" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.maturityDate | dateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr
|
||||
*ngIf="recurringDepositsAccountData.timeline.closedOnDate || recurringDepositsAccountData.summary.totalWitddrawals">
|
||||
<td *ngIf="recurringDepositsAccountData.timeline.closedOnDate">
|
||||
{{"labels.inputs.Closed on Date" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.timeline.closedOnDate | dateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>{{recurringDepositsAccountData.recurringFrequency}}
|
||||
{{recurringDepositsAccountData.recurringFrequencyType.value}}
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.minBalanceForInterestCalculation">
|
||||
<td> {{"labels.inputs.Balance Required For Interest Calculation" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.minBalanceForInterestCalculation}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.witdHoldTax">
|
||||
<td> {{"labels.inputs.Witdhold Tax Group" | translate }} </td>
|
||||
<td><span>{{recurringDepositsAccountData.taxGroup.name}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{"labels.heading.Performance History" | translate }}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Principal Amount" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData.depositAmount | currency:currencyCode:'symbol-narrow':'1.2-2'}}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData.maturityAmount | currency:currencyCode:'symbol-narrow':'1.2-2'}}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Recurring Deposit Amount" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData?.mandatoryRecommendedDepositAmount | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Deposits till Date" | translate }}</td>
|
||||
<td><span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalDeposits">{{recurringDepositsAccountData.summary.totalDeposits | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalDeposits">{{ 0 | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Withdrwals till Date" | translate }}</td>
|
||||
<td><span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalWithdrawals">{{recurringDepositsAccountData.summary.totalWithdrawals | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalWithdrawals">{{ 0 | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td >{{"labels.inputs.Interest Earned" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.currency.displaySymbol}} {{recurringDepositsAccountData.summary.totalInterestEarned| formatNumber}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Date of Deposit" | translate }}</td>
|
||||
<td>
|
||||
<span *ngIf="!recurringDepositsAccountData.expectedFirstDepositOnDate">{{recurringDepositsAccountData.timeline.activatedOnDate | dateFormat}}
|
||||
<span *ngIf="!recurringDepositsAccountData.timeline.activatedOnDate">{{"labels.inputs.Not Activated" | translate }}</span>
|
||||
</span>
|
||||
<span *ngIf="recurringDepositsAccountData.expectedFirstDepositOnDate" >{{recurringDepositsAccountData.expectedFirstDepositOnDate | dateFormat}}
|
||||
<span *ngIf="!recurringDepositsAccountData.expectedFirstDepositOnDate">{{"labels.inputs.Not Activated" | translate }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Period" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData.depositPeriod}} {{recurringDepositsAccountData.depositPeriodFrequency.value}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.maturityDate">
|
||||
<td>{{"labels.inputs.Maturity Date" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.maturityDate | dateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Total Deposits" | translate }}</td>
|
||||
<td>
|
||||
<span *ngIf="recurringDepositsAccountData.summary.totalDeposits">{{ recurringDepositsAccountData.summary.totalDeposits | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span *ngIf="!recurringDepositsAccountData.summary.totalDeposits">{{ 0 | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td> {{"labels.inputs.Actual Available Balance" | translate }}</td>
|
||||
<td>{{ recurringDepositsAccountData.currency.displaySymbol }} {{ recurringDepositsAccountData.summary.accountBalance }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{"labels.inputs.Recurring Deposits Amount" | translate }}</td>
|
||||
<td>
|
||||
{{ recurringDepositsAccountData.mandatoryRecommendedDepositAmount | currency:currencyCode:'symbol-narrow':'1.2-2'}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalInterestEarned">
|
||||
<td> {{"labels.inputs.Interests Earned" | translate }} </td>
|
||||
<td><span>{{ recurringDepositsAccountData.currency.displaySymbol }} {{ recurringDepositsAccountData.summary.totalInterestEarned }}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalWithdrawals">
|
||||
<td> {{"labels.inputs.Total Withdrawls" | translate }} </td>
|
||||
<td>
|
||||
<span>{{ recurringDepositsAccountData.summary.totalWithdrawals | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.minBalanceForInterestCalculation">
|
||||
<td> {{"labels.inputs.Balance Required For Interest Calculation" | translate }} </td>
|
||||
<td>
|
||||
<span>{{ recurringDepositsAccountData.minBalanceForInterestCalculation | number }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Principal Amount" | translate }}</td>
|
||||
<td><span
|
||||
*ngIf="recurringDepositsAccountData.depositAmount">{{ recurringDepositsAccountData.depositAmount | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.depositAmount">{{ 0 | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Rate of Interest" | translate }}</td>
|
||||
<td>
|
||||
<span>{{recurringDepositsAccountData.nominalAnnualInterestRate}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.maturityDate">
|
||||
<td>{{"labels.inputs.Maturity Amount" | translate }}</td>
|
||||
<td>
|
||||
<span>{{ recurringDepositsAccountData.maturityAmount | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Total Withdrawls" | translate }} </td>
|
||||
<td>
|
||||
<span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalWithdrawals">{{ recurringDepositsAccountData.summary.totalWithdrawals | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalWithdrawals">{{ 0 | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.timeline.closedOnDate">
|
||||
<td> {{"labels.inputs.Closed on Date" | translate }} </td>
|
||||
<td>
|
||||
{{ recurringDepositsAccountData.timeline.closedOnDate | dateFormat }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{"labels.inputs.Deposits Frequency" | translate }} </td>
|
||||
<td>
|
||||
{{ recurringDepositsAccountData.recurringFrequency }} {{ recurringDepositsAccountData.recurringFrequencyType.value }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.summary.totalInterestEarned">
|
||||
<td> {{"labels.inputs.Interests Posted" | translate }} </td>
|
||||
<td>
|
||||
<span
|
||||
*ngIf="recurringDepositsAccountData.summary.totalInterestPosted">{{recurringDepositsAccountData.summary.totalInterestPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
<span
|
||||
*ngIf="!recurringDepositsAccountData.summary.totalInterestPosted">{{ 0 | currency:currencyCode:'symbol-narrow':'1.2-2'}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="recurring-deposits-account-tables" fxLayout="row" fxLayoutGap="2%">
|
||||
<div fxFlex="49%"
|
||||
*ngIf="!recurringDepositsAccountData.status.rejected && !recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{"labels.heading.Interest Details" | translate }}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Rate" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.nominalAnnualInterestRate}}%</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Compounding period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCompoundingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Posting period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestPostingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest calculated using" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td># {{"labels.inputs.Days in Year" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationDaysInYearType.value}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.preClosurePenalApplicable">
|
||||
<td>{{"labels.inputs.Pre-closure penal Interest (less)" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.preClosurePenalInterest}} % on
|
||||
{{recurringDepositsAccountData.preClosurePenalInterestOnType.value}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="recurringDepositsAccountData.status.rejected || recurringDepositsAccountData.status.submittedAndPendingApproval">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Compounding Period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCompoundingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest Posting period" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestPostingPeriodType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Interest calculated using" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationType.value}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td># {{"labels.inputs.Days in Year" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.interestCalculationDaysInYearType.value}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.preClosurePenalApplicable">
|
||||
<td>{{"labels.inputs.Pre-closure penal Interest (less)" | translate }}</td>
|
||||
<td><span>{{recurringDepositsAccountData.preClosurePenalInterest}} % on
|
||||
{{recurringDepositsAccountData.preClosurePenalInterestOnType.value}}</span></td>
|
||||
</tr>
|
||||
<tr *ngIf="recurringDepositsAccountData.witdHoldTax">
|
||||
<td> {{"labels.inputs.Witdhold Tax Group" | translate }} </td>
|
||||
<td><span>{{recurringDepositsAccountData.taxGroup.name}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<nav mat-tab-nav-bar class="navigation-tabs">
|
||||
<a mat-tab-link [routerLink]="['./interest-rate-chart']" routerLinkActive #IRC="routerLinkActive"
|
||||
[active]="IRC.isActive">
|
||||
{{"labels.inputs.Interest Rate Chart" | translate }}
|
||||
<a mat-tab-link [routerLink]="['./general']" routerLinkActive #general="routerLinkActive"
|
||||
[active]="general.isActive">
|
||||
{{"labels.inputs.General" | translate }}
|
||||
</a>
|
||||
<a mat-tab-link [routerLink]="['./interest-rate-chart']" routerLinkActive #IRC="routerLinkActive"
|
||||
[active]="IRC.isActive">
|
||||
{{"labels.inputs.Interest Rate Chart" | translate }}
|
||||
</a>
|
||||
<ng-container *ngIf="recurringDepositsAccountData.transactions">
|
||||
<a mat-tab-link [routerLink]="['./transactions']" routerLinkActive #transactions="routerLinkActive"
|
||||
[active]="transactions.isActive">
|
||||
{{"labels.inputs.Transactions" | translate }}
|
||||
</a>
|
||||
<ng-container *ngIf="recurringDepositsAccountData.transactions">
|
||||
<a mat-tab-link [routerLink]="['./transactions']" routerLinkActive #transactions="routerLinkActive"
|
||||
[active]="transactions.isActive">
|
||||
{{"labels.inputs.Transactions" | translate }}
|
||||
</a>
|
||||
</ng-container>
|
||||
<a mat-tab-link [routerLink]="['./charges']" routerLinkActive #charges="routerLinkActive" [active]="charges.isActive">
|
||||
{{"labels.inputs.Charges" | translate }}
|
||||
</ng-container>
|
||||
<a mat-tab-link [routerLink]="['./charges']" routerLinkActive #charges="routerLinkActive"
|
||||
[active]="charges.isActive">
|
||||
{{"labels.inputs.Charges" | translate }}
|
||||
</a>
|
||||
<ng-container *ngIf="recurringDepositsAccountData.clientId">
|
||||
<a mat-tab-link [routerLink]="['./standing-instructions-tab']" routerLinkActive
|
||||
#standingInstructions="routerLinkActive" [active]="standingInstructions.isActive">
|
||||
{{"labels.inputs.Standing Instructions" | translate }}
|
||||
</a>
|
||||
<ng-container *ngIf="recurringDepositsAccountData.clientId">
|
||||
<a mat-tab-link [routerLink]="['./standing-instructions-tab']" routerLinkActive #standingInstructions="routerLinkActive"
|
||||
[active]="standingInstructions.isActive">
|
||||
{{"labels.inputs.Standing Instructions" | translate }}
|
||||
</a>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let savingsDatatable of savingsDatatables">
|
||||
<a mat-tab-link *mifosxHasPermission="'READ_' + savingsDatatable.registeredTableName"
|
||||
[routerLink]="['./datatables',savingsDatatable.registeredTableName]" routerLinkActive #datatable="routerLinkActive"
|
||||
[active]="datatable.isActive">
|
||||
{{savingsDatatable.registeredTableName}}
|
||||
</a>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngFor="let savingsDatatable of savingsDatatables">
|
||||
<a mat-tab-link *mifosxHasPermission="'READ_' + savingsDatatable.registeredTableName"
|
||||
[routerLink]="['./datatables',savingsDatatable.registeredTableName]" routerLinkActive
|
||||
#datatable="routerLinkActive" [active]="datatable.isActive">
|
||||
{{savingsDatatable.registeredTableName}}
|
||||
</a>
|
||||
</ng-container>
|
||||
</nav>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
.recurring-deposits-account-card {
|
||||
margin: 0 auto;
|
||||
max-width: 80rem;
|
||||
width: 90%;
|
||||
padding: 0;
|
||||
.header {
|
||||
padding: 1%;
|
||||
.header-title-group {
|
||||
.account-card-title {
|
||||
color: white;
|
||||
width: 90%;
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
.profile-image-container {
|
||||
margin: 1%;
|
||||
.profile-image {
|
||||
object-fit: cover;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
.account-actions {
|
||||
align-self: flex-end;
|
||||
margin: 0 1%;
|
||||
i {
|
||||
margin-bottom: 2px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigation-tabs {
|
||||
background-color: #f2f2f2;
|
||||
overflow: auto;
|
||||
}
|
||||
.content {
|
||||
.recurringDeposits-account-tables {
|
||||
padding: 1%;
|
||||
margin: 1%;
|
||||
.table-headers {
|
||||
margin: 0;
|
||||
padding: 6px;
|
||||
}
|
||||
td {
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
i, img:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
+19
-5
@@ -13,6 +13,7 @@ import { RecurringDepositsButtonsConfiguration } from './recurring-deposits-butt
|
||||
/** Custom Dialogs */
|
||||
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
|
||||
import { RecurringDepositConfirmationDialogComponent } from './custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
|
||||
/**
|
||||
@@ -35,7 +36,8 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
savingsDatatables: any;
|
||||
/** Is Prematured Allowed */
|
||||
isprematureAllowed: any;
|
||||
currencyCode: string;
|
||||
entityType: string;
|
||||
currency: Currency;
|
||||
/**
|
||||
* Fetches recurringDeposits account data from `resolve`
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
@@ -51,8 +53,15 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
this.recurringDepositsAccountData = data.recurringDepositsAccountData;
|
||||
this.charges = this.recurringDepositsAccountData.charges;
|
||||
this.savingsDatatables = data.savingsDatatables;
|
||||
this.currencyCode = this.recurringDepositsAccountData.currency.code;
|
||||
this.currency = this.recurringDepositsAccountData.currency;
|
||||
this.isprematureAllowed = data.recurringDepositsAccountData.maturityDate != null;
|
||||
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';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -69,6 +78,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
if (this.recurringDepositsAccountData.clientId && this.recurringDepositsAccountData.status.value === 'Matured') {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Transfer Funds',
|
||||
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,6 +87,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
if (element.name === 'Annual fee - INR') {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Apply Annual Fees',
|
||||
taskPermissionName: 'APPLYANNUALFEE_SAVINGSACCOUNT'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -85,7 +96,8 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
if (this.recurringDepositsAccountData.clientId && this.recurringDepositsAccountData.status.value === 'Active') {
|
||||
if (this.recurringDepositsAccountData.allowWithdrawal === true) {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Withdraw'
|
||||
name: 'Withdraw',
|
||||
taskPermissionName: 'WITHDRAW_RECURRINGDEPOSITACCOUNT'
|
||||
});
|
||||
}
|
||||
if (this.recurringDepositsAccountData.charges) {
|
||||
@@ -93,6 +105,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
if (element.name === 'Annual fee - INR') {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Apply Annual Fees',
|
||||
taskPermissionName: 'APPLYANNUALFEE_SAVINGSACCOUNT'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -101,7 +114,8 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
if (!this.isprematureAllowed) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Close',
|
||||
icon: 'fa fa-arrow-right'
|
||||
icon: 'arrow-right',
|
||||
taskPermissionName: 'CLOSE_RECURRINGDEPOSITACCOUNT'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -144,7 +158,7 @@ export class RecurringDepositsAccountViewComponent implements OnInit {
|
||||
case 'Reject':
|
||||
case 'Undo Approval':
|
||||
case 'Add Charge':
|
||||
case 'Withdraw By Client':
|
||||
case 'Withdrawn by client':
|
||||
case 'Premature Close':
|
||||
case 'Close':
|
||||
case 'Deposit':
|
||||
|
||||
+44
-19
@@ -3,13 +3,14 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
|
||||
optionArray: {
|
||||
name: string,
|
||||
taskPermissionName?: string,
|
||||
icon?: string,
|
||||
taskPermissionName: string,
|
||||
}[];
|
||||
|
||||
buttonsArray: {
|
||||
name: string,
|
||||
icon: string,
|
||||
taskPermissionName?: string,
|
||||
taskPermissionName: string,
|
||||
}[];
|
||||
|
||||
constructor(status: string) {
|
||||
@@ -31,15 +32,18 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Deposit',
|
||||
icon: 'fa fa-arrow-up'
|
||||
icon: 'arrow-up',
|
||||
taskPermissionName: 'DEPOSIT_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Premature Close',
|
||||
icon: 'fa fa-arrow-left'
|
||||
icon: 'arrow-left',
|
||||
taskPermissionName: 'PREMATURECLOSE_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Calculate Interest',
|
||||
icon: 'fa fa-table',
|
||||
icon: 'calculator',
|
||||
taskPermissionName: 'CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
@@ -47,11 +51,13 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Modify Application',
|
||||
icon: 'fa fa-pencil ',
|
||||
icon: 'edit',
|
||||
taskPermissionName: 'UPDATE_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Approve',
|
||||
icon: 'fa fa-check'
|
||||
icon: 'check',
|
||||
taskPermissionName: 'APPROVE_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
@@ -59,11 +65,13 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Undo Approval',
|
||||
icon: 'fa fa-undo'
|
||||
icon: 'undo',
|
||||
taskPermissionName: 'APPROVALUNDO_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Activate',
|
||||
icon: 'fa fa-check'
|
||||
icon: 'check',
|
||||
taskPermissionName: 'ACTIVATE_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
@@ -71,15 +79,18 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Close',
|
||||
icon: 'fa fa-arrow-right'
|
||||
icon: 'arrow-right',
|
||||
taskPermissionName: 'CLOSE_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Calculate Interest',
|
||||
icon: 'fa fa-table'
|
||||
icon: 'calculator',
|
||||
taskPermissionName: 'CALCULATEINTEREST_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Post Interest',
|
||||
icon: 'fa fa-table'
|
||||
icon: 'money',
|
||||
taskPermissionName: 'POSTINTEREST_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
@@ -94,32 +105,46 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
this.optionArray = [
|
||||
{
|
||||
name: 'Post Interest',
|
||||
icon: 'table',
|
||||
taskPermissionName: 'POSTINTEREST_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Add Charge',
|
||||
icon: 'plus',
|
||||
taskPermissionName: 'POSTINTEREST_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
case 'Submitted and pending approval':
|
||||
this.optionArray = [
|
||||
{
|
||||
name: 'Reject'
|
||||
name: 'Reject',
|
||||
icon: 'ban',
|
||||
taskPermissionName: 'REJECT_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Withdraw By Client'
|
||||
name: 'Withdrawn by client',
|
||||
icon: 'arrow-down',
|
||||
taskPermissionName: 'WITHDRAW_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Add Charge'
|
||||
name: 'Add Charge',
|
||||
icon: 'plus',
|
||||
taskPermissionName: 'ADDCHARGE_RECURRINGDEPOSITACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Delete'
|
||||
name: 'Delete',
|
||||
icon: 'trash',
|
||||
taskPermissionName: 'DELETE_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
case 'Matured':
|
||||
this.optionArray = [
|
||||
{
|
||||
name: 'Add Charge'
|
||||
name: 'Add Charge',
|
||||
icon: 'plus',
|
||||
taskPermissionName: 'ADDCHARGE_RECURRINGDEPOSITACCOUNT'
|
||||
}
|
||||
];
|
||||
break;
|
||||
@@ -129,11 +154,11 @@ export class RecurringDepositsButtonsConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
addOption(option: {name: string, icon?: string, taskPermissionName?: string}) {
|
||||
addOption(option: {name: string, icon?: string, taskPermissionName: string}) {
|
||||
this.optionArray.push(option);
|
||||
}
|
||||
|
||||
addButton(option: { name: string, icon: string, taskPermissionName?: string }) {
|
||||
addButton(option: { name: string, icon: string, taskPermissionName: string }) {
|
||||
this.buttonsArray.push(option);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import { EditRecurringDepositAccountComponent } from './edit-recurring-deposit-a
|
||||
import { RecurringDepositsAccountAndTemplateResolver } from './common-resolvers/recurring-deposit-account-and-template.resolver';
|
||||
import { RecurringDepositsAccountTransactionResolver } from './common-resolvers/recurring-deposit-account-transaction.resolver';
|
||||
import { RecurringDepositsAccountTransactionTemplateResolver } from './common-resolvers/recurring-deposit-account-transaction-template.resolver';
|
||||
import { GeneralTabComponent } from './recurring-deposits-account-view/general-tab/general-tab.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@@ -47,25 +48,29 @@ const routes: Routes = [
|
||||
path: '',
|
||||
component: RecurringDepositsAccountViewComponent,
|
||||
resolve: {
|
||||
recurringDepositsAccountData: RecurringDepositsAccountViewResolver,
|
||||
recurringDepositsAccountData: RecurringDepositsAccountDataResolver,
|
||||
savingsDatatables: SavingsDatatablesResolver
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'general',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'general',
|
||||
component: GeneralTabComponent,
|
||||
data: { title: 'Recurring Deposit Account Details', breadcrumb: 'General', routeParamBreadcrumb: false },
|
||||
},
|
||||
{
|
||||
path: 'interest-rate-chart',
|
||||
component: InterestRateChartTabComponent,
|
||||
data: { title: 'Recurring Deposit Account Interest Rate Chart', breadcrumb: 'Interest Rate Chart', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
recurringDepositsAccountData: RecurringDepositsAccountDataResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transactions',
|
||||
component: TransactionsTabComponent,
|
||||
data: { title: 'Recurring Deposit Account Transactions', breadcrumb: 'Transactions', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
recurringDepositsAccountData: RecurringDepositsAccountDataResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'charges',
|
||||
@@ -76,9 +81,6 @@ const routes: Routes = [
|
||||
path: 'standing-instructions-tab',
|
||||
component: StandingInstructionsTabComponent,
|
||||
data: { title: 'Recurring Deposit Account Standing Instructions', breadcrumb: 'Standing Instructions', routeParamBreadcrumb: false },
|
||||
resolve: {
|
||||
recurringDepositsAccountData: RecurringDepositsAccountDataResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'datatables',
|
||||
|
||||
@@ -38,6 +38,7 @@ import { EditTransactionComponent } from './recurring-deposits-account-view/tran
|
||||
|
||||
/* Dialog Components */
|
||||
import { RecurringDepositConfirmationDialogComponent } from './recurring-deposits-account-view/custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component';
|
||||
import { GeneralTabComponent } from './recurring-deposits-account-view/general-tab/general-tab.component';
|
||||
|
||||
/**
|
||||
* RecurringDeposits Module
|
||||
@@ -79,7 +80,8 @@ import { RecurringDepositConfirmationDialogComponent } from './recurring-deposit
|
||||
CloseRecurringDepositsAccountComponent,
|
||||
DepositRecurringDepositsAccountComponent,
|
||||
ViewTransactionComponent,
|
||||
EditTransactionComponent
|
||||
EditTransactionComponent,
|
||||
GeneralTabComponent
|
||||
],
|
||||
providers: [ ]
|
||||
})
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" *ngIf="loanProductSelected">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>{{"labels.inputs.Loan purpose" | translate}}</mat-label>
|
||||
<mat-label>{{"labels.inputs.Loan Purpose" | translate}}</mat-label>
|
||||
<mat-select formControlName="loanPurposeId" matTooltip="{{ 'tooltips.Provides an indication' | translate}}">
|
||||
<mat-option *ngFor="let loanPurpose of loanPurposeOptions" [value]="loanPurpose.id">
|
||||
{{ loanPurpose.name }}
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
<div fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<a mat-button (click)="showRepaymentInfo()">
|
||||
{{"labels.inputs.Repayment Info" | translate}}
|
||||
</a>
|
||||
<button mat-stroked-button color="primary" (click)="showRepaymentInfo()">
|
||||
<fa-icon icon="calendar" class="m-r-10"></fa-icon>{{"labels.inputs.Generate Repayment Schedule" | translate}}
|
||||
</button>
|
||||
|
||||
<mifosx-repayment-schedule-tab fxFlex="100%" [repaymentScheduleDetails]="repaymentScheduleDetails"
|
||||
[currencyCode]="currencyCode">
|
||||
|
||||
+7
-11
@@ -19,7 +19,6 @@ export class LoansAccountScheduleStepComponent implements OnInit {
|
||||
/** Loans Account Data */
|
||||
@Input() loansAccount: any;
|
||||
|
||||
showRepayment = false;
|
||||
repaymentScheduleDetails: any = {periods: []};
|
||||
|
||||
loanId: any = null;
|
||||
@@ -34,16 +33,13 @@ export class LoansAccountScheduleStepComponent implements OnInit {
|
||||
|
||||
showRepaymentInfo(): void {
|
||||
this.repaymentScheduleDetails = {periods: []};
|
||||
this.showRepayment = !this.showRepayment;
|
||||
if (this.showRepayment) {
|
||||
const locale = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const payload = this.loansService.buildLoanRequestPayload(this.loansAccount, this.loansAccountTemplate,
|
||||
this.loansAccountProductTemplate.calendarOptions, locale, dateFormat);
|
||||
const locale = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const payload = this.loansService.buildLoanRequestPayload(this.loansAccount, this.loansAccountTemplate,
|
||||
this.loansAccountProductTemplate.calendarOptions, locale, dateFormat);
|
||||
|
||||
this.loansService.calculateLoanSchedule(payload).subscribe((response: any) => {
|
||||
this.repaymentScheduleDetails = response;
|
||||
});
|
||||
}
|
||||
this.loansService.calculateLoanSchedule(payload).subscribe((response: any) => {
|
||||
this.repaymentScheduleDetails = response;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
@mixin loans-view-component-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
|
||||
mifosx-loans-view {
|
||||
.loan-card {
|
||||
.header {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card class="loan-card">
|
||||
<mat-card class="account-card">
|
||||
|
||||
<mat-card-header fxLayout="column" class="header">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mat-typography loan-card-title">
|
||||
<div class="mat-typography account-card-title">
|
||||
<mat-card-title>
|
||||
<div fxLayout="row" fxLayout.lt-md="column">
|
||||
|
||||
@@ -46,24 +46,30 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="loanDetailsData.summary" class="loans-overview mat-typography" fxFlex="40%">
|
||||
<h3> {{"labels.heading.Loan Account OverView" | translate}} </h3>
|
||||
<span>{{"labels.inputs.Current Balance" | translate}}: {{loanDetailsData.currency.displaySymbol}}
|
||||
{{loanDetailsData.summary.totalOutstanding | formatNumber}}</span><br>
|
||||
<div *ngIf="loanDisplayArrearsDelinquency < 2">
|
||||
<span *ngIf="loanDetailsData.inArrears">{{"labels.inputs.Arrears By" | translate}}:
|
||||
{{loanDetailsData.summary.totalOverdue | currency:currencyCode:'symbol-narrow':'1.2-2' }}
|
||||
<span *ngIf="!(loanDetailsData.summary.totalOverdue>=0)">{{"labels.inputs.Not Provided" | translate
|
||||
}}</span>
|
||||
</span><br>
|
||||
<span *ngIf="loanDetailsData.inArrears">{{"labels.inputs.Arrears Since" | translate}}:
|
||||
{{loanDetailsData.summary.overdueSinceDate |
|
||||
dateFormat}}
|
||||
</span>
|
||||
<span *ngIf="loanDetailsData.totalOverpaid && loanDetailsData.totalOverpaid > 0">
|
||||
{{"labels.inputs.Overpaid By" | translate}}: {{loanDetailsData.currency.displaySymbol}}
|
||||
{{loanDetailsData.totalOverpaid | formatNumber }}
|
||||
</span>
|
||||
</div>
|
||||
<h3> {{"labels.heading.Account OverView" | translate}} </h3>
|
||||
<table class="account-overview">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Current Balance" | translate }}</td>
|
||||
<td class="r-amount">{{loanDetailsData.summary.totalOutstanding | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="loanDisplayArrearsDelinquency < 2">
|
||||
<td>{{"labels.inputs.Arrears By" | translate }}</td>
|
||||
<td class="r-amount" *ngIf="loanDetailsData.summary.totalOverdue >= 0">
|
||||
{{loanDetailsData.summary.totalOverdue | currency:currency.code:'symbol-narrow':'1.2-2'}}
|
||||
</td>
|
||||
<td *ngIf="!(loanDetailsData.summary.totalOverdue>=0)">{{"labels.inputs.Not Provided" | translate}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="loanDetailsData.inArrears">
|
||||
<td>{{"labels.inputs.Arrears Since" | translate }}</td>
|
||||
<td> {{loanDetailsData.summary.overdueSinceDate | dateFormat}} </td>
|
||||
</tr>
|
||||
<tr *ngIf="loanDetailsData.totalOverpaid && loanDetailsData.totalOverpaid > 0">
|
||||
<td>{{"labels.inputs.Overpaid By" | translate }}</td>
|
||||
<td class="r-amount">{{loanDetailsData.totalOverpaid | currency:currency.code:'symbol-narrow':'1.2-2'}} </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<span fxFlex="auto"></span>
|
||||
|
||||
@@ -13,6 +13,7 @@ import { LoansAccountButtonConfiguration } from './loan-accounts-button-config';
|
||||
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.model';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-loans-view',
|
||||
@@ -42,6 +43,7 @@ export class LoansViewComponent implements OnInit {
|
||||
disburseTransactionNo = 0;
|
||||
|
||||
loanStatus: LoanStatus;
|
||||
currency: Currency;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@@ -52,6 +54,7 @@ export class LoansViewComponent implements OnInit {
|
||||
this.loanDatatables = data.loanDatatables;
|
||||
this.loanDisplayArrearsDelinquency = data.loanArrearsDelinquencyConfig.value || 0;
|
||||
this.loanStatus = this.loanDetailsData.status;
|
||||
this.currency = this.loanDetailsData.currency;
|
||||
});
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
this.clientId = this.loanDetailsData.clientId;
|
||||
|
||||
+6
-6
@@ -329,6 +329,11 @@
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">Loan Schedule Type:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.loanScheduleType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">Repayment Strategy:</span>
|
||||
<span fxFlex="53%" class="repayment-strategy">{{ loanProduct.transactionProcessingStrategyName }}</span>
|
||||
@@ -346,12 +351,7 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">Loan Schedule Type:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.loanScheduleType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="loanProduct.loanScheduleProcessingType">
|
||||
<div fxFlexFill *ngIf="isAdvancedPaymentAllocationStrategy()">
|
||||
<span fxFlex="47%">Loan Schedule Processing Type:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.loanScheduleProcessingType.value }}</span>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" fxLayoutAlign.gt-sm="start center">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="72%">
|
||||
<mat-label>Product Name</mat-label>
|
||||
<input matInput formControlName="name" matTooltip="The product name is a unique identifier for the lending product." required>
|
||||
<mat-error>
|
||||
@@ -10,7 +10,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="24%">
|
||||
<mat-label>Short Name</mat-label>
|
||||
<input matInput formControlName="shortName" maxlength="4" matTooltip="The short name is a unique identifier for the lending product." required>
|
||||
<mat-error>
|
||||
|
||||
+3
-2
@@ -65,7 +65,8 @@
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Repayment strategy</mat-label>
|
||||
<mat-select formControlName="transactionProcessingStrategyCode" matTooltip="The repayment strategy determines the sequence in which each of the components is paid." required>
|
||||
<mat-select formControlName="transactionProcessingStrategyCode" matTooltip="The repayment strategy determines the sequence in which each of the components is paid."
|
||||
required [disabled]="advancedTransactionProcessingStrategyDisabled">
|
||||
<mat-option *ngFor="let transactionProcessingStrategy of transactionProcessingStrategyData" [value]="transactionProcessingStrategy.code">
|
||||
{{ transactionProcessingStrategy.name }}
|
||||
</mat-option>
|
||||
@@ -75,7 +76,7 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-form-field fxFlex="48%" *ngIf="isAdvancedTransactionProcessingStrategy">
|
||||
<mat-label>Loan Schedule Processing Type</mat-label>
|
||||
<mat-select formControlName="loanScheduleProcessingType" required>
|
||||
<mat-option *ngFor="let loanScheduleProcessingType of loanScheduleProcessingTypeData" [value]="loanScheduleProcessingType.code">
|
||||
|
||||
+23
-3
@@ -40,6 +40,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
delinquencyBucketData: any;
|
||||
loanScheduleTypeData: OptionData[] = [];
|
||||
loanScheduleProcessingTypeData: OptionData[] = [];
|
||||
isAdvancedTransactionProcessingStrategy = false;
|
||||
advancedTransactionProcessingStrategyDisabled = true;
|
||||
|
||||
/** Values to Days for Repayments */
|
||||
defaultConfigValues: GlobalConfiguration[] = [];
|
||||
@@ -78,13 +80,14 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.loanScheduleTypeData = this.loanProductsTemplate.loanScheduleTypeOptions;
|
||||
this.loanScheduleProcessingTypeData = this.loanProductsTemplate.loanScheduleProcessingTypeOptions;
|
||||
|
||||
const transactionProcessingStrategyCode: string = this.loanProductsTemplate.transactionProcessingStrategyCode || this.transactionProcessingStrategyData[0].code;
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'amortizationType': this.loanProductsTemplate.amortizationType.id,
|
||||
'interestType': this.loanProductsTemplate.interestType.id,
|
||||
'isEqualAmortization': this.loanProductsTemplate.isEqualAmortization,
|
||||
'interestCalculationPeriodType': this.loanProductsTemplate.interestCalculationPeriodType.id,
|
||||
'allowPartialPeriodInterestCalcualtion': this.loanProductsTemplate.allowPartialPeriodInterestCalcualtion,
|
||||
'transactionProcessingStrategyCode': this.loanProductsTemplate.transactionProcessingStrategyCode || this.transactionProcessingStrategyData[0].code,
|
||||
'transactionProcessingStrategyCode': transactionProcessingStrategyCode,
|
||||
'graceOnPrincipalPayment': this.loanProductsTemplate.graceOnPrincipalPayment,
|
||||
'graceOnInterestPayment': this.loanProductsTemplate.graceOnInterestPayment,
|
||||
'graceOnInterestCharged': this.loanProductsTemplate.graceOnInterestCharged,
|
||||
@@ -109,9 +112,15 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'enableDownPayment': this.loanProductsTemplate.enableDownPayment,
|
||||
'enableInstallmentLevelDelinquency': this.loanProductsTemplate.enableInstallmentLevelDelinquency,
|
||||
'loanScheduleType': this.loanProductsTemplate.loanScheduleType.code,
|
||||
'loanScheduleProcessingType': this.loanProductsTemplate.loanScheduleProcessingType.code
|
||||
});
|
||||
|
||||
this.isAdvancedTransactionProcessingStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(transactionProcessingStrategyCode);
|
||||
if (this.isAdvancedTransactionProcessingStrategy) {
|
||||
this.loanProductSettingsForm.addControl('loanScheduleProcessingType', new UntypedFormControl(
|
||||
this.loanProductsTemplate.loanScheduleProcessingType.code || LoanProducts.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL,
|
||||
[Validators.required ]));
|
||||
}
|
||||
|
||||
if (this.loanProductsTemplate.dueDaysForRepaymentEvent != null &&
|
||||
this.loanProductsTemplate.overDueDaysForRepaymentEvent != null) {
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
@@ -234,7 +243,6 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'dueDaysForRepaymentEvent': [''],
|
||||
'overDueDaysForRepaymentEvent': [''],
|
||||
'loanScheduleType': [LoanProducts.LOAN_SCHEDULE_TYPE_CUMULATIVE, Validators.required],
|
||||
'loanScheduleProcessingType': [LoanProducts.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL, Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -395,6 +403,13 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.loanProductSettingsForm.get('transactionProcessingStrategyCode').valueChanges
|
||||
.subscribe((transactionProcessingStrategyCode: string) => {
|
||||
this.advancePaymentStrategy.emit(transactionProcessingStrategyCode);
|
||||
this.isAdvancedTransactionProcessingStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(transactionProcessingStrategyCode);
|
||||
if (this.isAdvancedTransactionProcessingStrategy) {
|
||||
this.loanProductSettingsForm.addControl('loanScheduleProcessingType', new UntypedFormControl(
|
||||
LoanProducts.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL, [Validators.required]));
|
||||
} else {
|
||||
this.loanProductSettingsForm.removeControl('loanScheduleProcessingType');
|
||||
}
|
||||
});
|
||||
|
||||
this.loanProductSettingsForm.get('allowAttributeConfiguration').valueChanges
|
||||
@@ -452,6 +467,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'transactionProcessingStrategyCode': this.transactionProcessingStrategyData[0].code
|
||||
});
|
||||
}
|
||||
this.advancedTransactionProcessingStrategyDisabled = false;
|
||||
} else {
|
||||
// Only Advanced Payment Allocation Strategy
|
||||
this.transactionProcessingStrategyDataBase.some(
|
||||
@@ -460,6 +476,10 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.transactionProcessingStrategyData.push(cn);
|
||||
}
|
||||
});
|
||||
this.advancedTransactionProcessingStrategyDisabled = true;
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'transactionProcessingStrategyCode': this.transactionProcessingStrategyData[0].code
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
|
||||
<mat-progress-bar mode="indeterminate" *ngIf="isLoading"></mat-progress-bar>
|
||||
|
||||
<div class="savings-account-tables" fxLayout="row" fxLayoutGap="2%" *ngIf="!isLoading">
|
||||
|
||||
<div fxFlex="49%" fxLayout="column" fxLayoutGap="4%">
|
||||
<div
|
||||
*ngIf="!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval; else alternateDetails">
|
||||
<h4 class="table-headers">{{'labels.heading.Savings Details' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Activated On' | translate}}</td>
|
||||
<td>{{savingsAccountData.timeline.activatedOnDate ? (savingsAccountData.timeline.activatedOnDate |
|
||||
dateFormat) : 'Not Activated'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Field Officer' | translate}}</td>
|
||||
<td>{{savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.External Id' | translate}}</td>
|
||||
<td *ngIf="savingsAccountData.externalId">
|
||||
<mifosx-external-identifier externalId="{{savingsAccountData.externalId}}"></mifosx-external-identifier>
|
||||
</td>
|
||||
<td *ngIf="!savingsAccountData.externalId">{{'labels.inputs.Not Provided' | translate}}</td> </tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Currency' | translate}}</td>
|
||||
<td>{{savingsAccountData.currency.name}} [{{savingsAccountData.currency.code}}]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Nominal Interest Rate' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.nominalAnnualInterestRate | formatNumber}} %</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<ng-template #alternateDetails>
|
||||
<div>
|
||||
<h4 class="table-headers">{{'labels.heading.Savings Details' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Field Officer' | translate}}</td>
|
||||
<td>{{savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Balance' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.accountBalance | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div *ngIf="!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{'labels.heading.Performance History' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr *ngIf="savingsAccountData.summary.totalDeposits">
|
||||
<td>{{'labels.inputs.Total Deposits' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalDeposits | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td>{{'labels.inputs.Total Interest Earned' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalInterestEarned | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="isActive; else alternateSummary">
|
||||
<h4 class="table-headers">{{'labels.heading.Account Summary' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr *ngIf="savingsAccountData.summary.totalWithdrawals">
|
||||
<td>{{'labels.inputs.Total Withdrawls' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalWithdrawals | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalWithdrawalFees">
|
||||
<td>{{'labels.inputs.Withdrawals Fees' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalWithdrawalFees | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalAnnualFees">
|
||||
<td>{{'labels.inputs.Annual Fees' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalAnnualFees | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td>{{'labels.inputs.Interest Earned' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalInterestEarned | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalInterestPosted">
|
||||
<td>{{'labels.inputs.Interest Posted' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.totalInterestPosted | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.interestNotPosted >= 0">
|
||||
<td>{{'labels.inputs.Interest Earned Not Posted' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.interestNotPosted | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalOverdraftInterestDerived">
|
||||
<td>{{'labels.inputs.Interest On Overdraft' | translate}}</td>
|
||||
<td class="r-amount">
|
||||
{{savingsAccountData.summary.totalOverdraftInterestDerived | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.interestNotPosted < 0">
|
||||
<td>{{'labels.inputs.Overdraft Interest Not Posted' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.interestNotPosted | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.nominalAnnualInterestRate">
|
||||
<td>{{'labels.inputs.Nominal Interest Rate' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.nominalAnnualInterestRate | formatNumber}} %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Interest Compounding Period' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestCompoundingPeriodType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Interest Posting Period' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestPostingPeriodType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Interest Calculated Using' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestCalculationType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td># {{'labels.inputs.Days in Year' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestCalculationDaysInYearType.value}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.withdrawalFee">
|
||||
<td>{{'labels.inputs.Withdrawal Fee' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.withdrawalFee.amount | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.lastActiveTransactionDate">
|
||||
<td>{{'labels.inputs.Last Active Transaction Date' | translate}}</td>
|
||||
<td>{{savingsAccountData.lastActiveTransactionDate | dateFormat}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="!(savingsAccountData.subStatus.id === 0)">
|
||||
<td>{{'labels.inputs.Substatus' | translate}}</td>
|
||||
<td>{{savingsAccountData.subStatus.value}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.daysToInactive">
|
||||
<td>{{'labels.inputs.Days to Inactive' | translate}}</td>
|
||||
<td>{{savingsAccountData.daysToInactive}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.daysToDormancy">
|
||||
<td>{{'labels.inputs.Days to Dormancy' | translate}}</td>
|
||||
<td>{{savingsAccountData.daysToDormancy}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.daysToEscheat">
|
||||
<td>{{'labels.inputs.Days to Escheat' | translate}}</td>
|
||||
<td>{{savingsAccountData.daysToEscheat}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.annualFee">
|
||||
<td>{{'labels.inputs.Annual Fee' | translate}}</td>
|
||||
<td class="r-amount">
|
||||
{{savingsAccountData.annualFee.amount | currency:currency.code:'symbol-narrow':'1.2-2'}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.allowOverdraft">
|
||||
<td>{{'labels.inputs.Over Draft Limit' | translate}}</td>
|
||||
<td class="r-amount">{{savingsAccountData.overdraftLimit | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.allowOverdraft">
|
||||
<td>{{'labels.inputs.Min Overdraft Required for Interest Calculation' | translate}}</td>
|
||||
<td>{{savingsAccountData.minOverdraftForInterestCalculation | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.minBalanceForInterestCalculation">
|
||||
<td>{{'labels.inputs.Min Balance Required for Interest Calculation' | translate}}</td>
|
||||
<td>{{savingsAccountData.minBalanceForInterestCalculation | formatNumber}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.minRequiredBalance">
|
||||
<td>{{'labels.inputs.Minimum Required Balance' | translate}}</td>
|
||||
<td>{{savingsAccountData.minRequiredBalance | formatNumber}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.enforceMinRequiredBalance">
|
||||
<td>{{'labels.inputs.Enforce Minimum Required Balance' | translate}}</td>
|
||||
<td>{{savingsAccountData.enforceMinRequiredBalance | formatNumber}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.lastInterestCalculationDate">
|
||||
<td>{{'labels.inputs.Interest Recalculation Date' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.lastInterestCalculationDate | dateFormat}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.onHoldFunds">
|
||||
<td>{{'labels.inputs.On Hold Funds' | translate}}</td>
|
||||
<td><a *mifosxHasPermission="'READ_SAVINGSACCOUNT'">{{savingsAccountData.onHoldFunds | currency:currency.code:'symbol-narrow':'1.2-2'}}</a></td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.withHoldTax">
|
||||
<td>{{'labels.inputs.Withhold Tax Group' | translate}}</td>
|
||||
<td>{{savingsAccountData.taxGroup.name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<ng-template #alternateSummary>
|
||||
<div fxFlex="49%">
|
||||
<h4 class="table-headers">{{'labels.heading.Account Summary' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Activated On' | translate}}</td>
|
||||
<td>{{savingsAccountData.timeline.activatedOnDate ? (savingsAccountData.timeline.activatedOnDate |
|
||||
dateFormat) : 'Not Activated'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Currency' | translate}}</td>
|
||||
<td>{{savingsAccountData.currency.name}} [{{savingsAccountData.currency.code}}]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.External Id' | translate}}</td>
|
||||
<td *ngIf="savingsAccountData.externalId">
|
||||
<mifosx-external-identifier externalId="{{savingsAccountData.externalId}}"></mifosx-external-identifier>
|
||||
</td>
|
||||
<td *ngIf="!savingsAccountData.externalId">{{'labels.inputs.Not Provided' | translate}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
</div>
|
||||
@@ -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,39 @@
|
||||
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 {
|
||||
isLoading = true;
|
||||
isActive = false;
|
||||
entityType: string;
|
||||
|
||||
savingsAccountData: any;
|
||||
currency: Currency;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
this.route.parent.parent.data.subscribe((data: { savingsAccountData: any }) => {
|
||||
this.savingsAccountData = data.savingsAccountData;
|
||||
this.currency = this.savingsAccountData.currency;
|
||||
this.isLoading = false;
|
||||
const status = this.savingsAccountData.status.value;
|
||||
this.isActive = (status === 'Active');
|
||||
});
|
||||
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 {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
@mixin savings-account-view-component-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
mifosx-savings-account-view {
|
||||
.savings-account-card {
|
||||
.header {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
}
|
||||
.table-headers {
|
||||
background-color: mat.get-color-from-palette($primary, 500);
|
||||
color: mat.get-contrast-color-from-palette($primary, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<mat-card class="savings-account-card">
|
||||
<mat-card class="account-card">
|
||||
|
||||
<mat-card-header fxLayout="column" class="header">
|
||||
|
||||
@@ -13,14 +13,42 @@
|
||||
|
||||
<div class="mat-typography account-card-title">
|
||||
<mat-card-title fxLayout="row" fxLayout.lt-md="column">
|
||||
<h3 fxFlex="95%">
|
||||
<i class="fa fa-stop" [ngClass]="savingsAccountData.status.code | statusLookup"
|
||||
[matTooltip]="savingsAccountData.status.value" *ngIf="!savingsAccountData.subStatus.block"></i>
|
||||
<i class="fa fa-stop" [ngClass]="savingsAccountData.subStatus.value | statusLookup"
|
||||
[matTooltip]="savingsAccountData.subStatus.value" *ngIf="savingsAccountData.subStatus.block"></i>
|
||||
{{'labels.inputs.Savings Product' | translate}} : {{savingsAccountData.savingsProductName}}<span class="m-l-10">
|
||||
<mifosx-account-number accountNo="{{savingsAccountData.accountNo}}"></mifosx-account-number></span>
|
||||
</h3>
|
||||
<div fxFlex="60%">
|
||||
<h3>
|
||||
<i class="fa fa-stop" [ngClass]="savingsAccountData.status.code | statusLookup"
|
||||
[matTooltip]="savingsAccountData.status.value" *ngIf="!savingsAccountData.subStatus.block"></i>
|
||||
<i class="fa fa-stop" [ngClass]="savingsAccountData.subStatus.value | statusLookup"
|
||||
[matTooltip]="savingsAccountData.subStatus.value" *ngIf="savingsAccountData.subStatus.block"></i>
|
||||
{{'labels.inputs.Savings Product' | translate}} : {{savingsAccountData.savingsProductName}}<span class="m-l-10">
|
||||
<mifosx-account-number accountNo="{{savingsAccountData.accountNo}}"></mifosx-account-number></span>
|
||||
</h3>
|
||||
<span class="account-overview">
|
||||
{{'labels.text.' + entityType | translate}} {{"labels.inputs.name" | translate}}: {{savingsAccountData.clientName ||
|
||||
savingsAccountData.groupName}}
|
||||
<span class="m-l-10" *ngIf="savingsAccountData.clientAccountNo">
|
||||
<mifosx-account-number accountNo="{{savingsAccountData.clientAccountNo}}"></mifosx-account-number>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval">
|
||||
<h3> {{"labels.heading.Account Overview" | translate}} </h3>
|
||||
<table class="account-overview">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Current Balance" | translate }}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.accountBalance | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{"labels.inputs.Available Balance" | translate }}</td>
|
||||
<td class="r-amount">{{savingsAccountData.summary.availableBalance | currency:currency.code:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<span fxFlex="auto"></span>
|
||||
|
||||
<div fxFlex="5%">
|
||||
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Loan account actions"
|
||||
yPosition="below">
|
||||
@@ -30,20 +58,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
<mat-card-subtitle>
|
||||
<p>
|
||||
{{entityType}} {{'labels.inputs.name' | translate}}: {{savingsAccountData.clientName || savingsAccountData.groupName}}
|
||||
<span class="m-l-10" *ngIf="savingsAccountData.clientAccountNo">({{savingsAccountData.clientAccountNo}})</span><br />
|
||||
<span *ngIf="!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval">
|
||||
{{'labels.inputs.Current Balances' | translate}} :
|
||||
{{savingsAccountData.currency.displaySymbol}}<span class="m-l-10">{{savingsAccountData.summary.accountBalance |
|
||||
number}}</span><br />
|
||||
{{'labels.inputs.Available Balance' | translate}} :
|
||||
{{savingsAccountData.currency.displaySymbol}}<span class="m-l-10">{{savingsAccountData.summary.availableBalance |
|
||||
number}}</span>
|
||||
</span>
|
||||
</p>
|
||||
</mat-card-subtitle>
|
||||
</div>
|
||||
|
||||
<mat-menu #accountMenu="matMenu">
|
||||
@@ -73,232 +87,11 @@
|
||||
|
||||
<mat-card-content class="content">
|
||||
|
||||
<div class="savings-account-tables" fxLayout="row" fxLayoutGap="2%">
|
||||
|
||||
<div fxFlex="49%"
|
||||
*ngIf="isActive; else alternateSummary">
|
||||
<h4 class="table-headers">{{'labels.heading.Account Summary' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr *ngIf="savingsAccountData.summary.totalWithdrawals">
|
||||
<td>{{'labels.inputs.Total Withdrawls' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.totalWithdrawals | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalWithdrawalFees">
|
||||
<td>{{'labels.inputs.Withdrawals Fees' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.totalWithdrawalFees | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalAnnualFees">
|
||||
<td>{{'labels.inputs.Annual Fees' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.totalAnnualFees | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td>{{'labels.inputs.Interest Earned' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.totalInterestEarned | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalInterestPosted">
|
||||
<td>{{'labels.inputs.Interest Posted' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.totalInterestPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.interestNotPosted >= 0">
|
||||
<td>{{'labels.inputs.Interest Earned Not Posted' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.interestNotPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalOverdraftInterestDerived">
|
||||
<td>{{'labels.inputs.Interest On Overdraft' | translate}}</td>
|
||||
<td>
|
||||
{{savingsAccountData.summary.totalOverdraftInterestDerived | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.interestNotPosted < 0">
|
||||
<td>{{'labels.inputs.Overdraft Interest Not Posted' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.interestNotPosted | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.nominalAnnualInterestRate">
|
||||
<td>{{'labels.inputs.Nominal Interest Rate' | translate}}</td>
|
||||
<td>{{savingsAccountData.nominalAnnualInterestRate | formatNumber}} %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Interest Compounding Period' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestCompoundingPeriodType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Interest Posting Period' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestPostingPeriodType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Interest Calculated Using' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestCalculationType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td># {{'labels.inputs.Days in Year' | translate}}</td>
|
||||
<td>{{savingsAccountData.interestCalculationDaysInYearType.value}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.withdrawalFee">
|
||||
<td>{{'labels.inputs.Withdrawal Fee' | translate}}</td>
|
||||
<td>{{savingsAccountData.withdrawalFee.amount | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.lastActiveTransactionDate">
|
||||
<td>{{'labels.inputs.Last Active Transaction Date' | translate}}</td>
|
||||
<td>{{savingsAccountData.lastActiveTransactionDate | dateFormat}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="!(savingsAccountData.subStatus.id === 0)">
|
||||
<td>{{'labels.inputs.Substatus' | translate}}</td>
|
||||
<td>{{savingsAccountData.subStatus.value}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.daysToInactive">
|
||||
<td>{{'labels.inputs.Days to Inactive' | translate}}</td>
|
||||
<td>{{savingsAccountData.daysToInactive}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.daysToDormancy">
|
||||
<td>{{'labels.inputs.Days to Dormancy' | translate}}</td>
|
||||
<td>{{savingsAccountData.daysToDormancy}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.daysToEscheat">
|
||||
<td>{{'labels.inputs.Days to Escheat' | translate}}</td>
|
||||
<td>{{savingsAccountData.daysToEscheat}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.annualFee">
|
||||
<td>{{'labels.inputs.Annual Fee' | translate}}</td>
|
||||
<td>{{savingsAccountData.annualFee.amount | currency:currencyCode:'symbol-narrow':'1.2-2'}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.allowOverdraft">
|
||||
<td>{{'labels.inputs.Over Draft Limit' | translate}}</td>
|
||||
<td>{{savingsAccountData.overdraftLimit | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.allowOverdraft">
|
||||
<td>{{'labels.inputs.Min Overdraft Required for Interest Calculation' | translate}}</td>
|
||||
<td>{{savingsAccountData.minOverdraftForInterestCalculation | currency:currencyCode:'symbol-narrow':'1.2-2'}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.minBalanceForInterestCalculation">
|
||||
<td>{{'labels.inputs.Min Balance Required for Interest Calculation' | translate}}</td>
|
||||
<td>{{savingsAccountData.minBalanceForInterestCalculation | formatNumber}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.minRequiredBalance">
|
||||
<td>{{'labels.inputs.Minimum Required Balance' | translate}}</td>
|
||||
<td>{{savingsAccountData.minRequiredBalance | formatNumber}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.enforceMinRequiredBalance">
|
||||
<td>{{'labels.inputs.Enforce Minimum Required Balance' | translate}}</td>
|
||||
<td>{{savingsAccountData.enforceMinRequiredBalance | formatNumber}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.lastInterestCalculationDate">
|
||||
<td>{{'labels.inputs.Interest Recalculation Date' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.lastInterestCalculationDate | dateFormat}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.onHoldFunds">
|
||||
<td>{{'labels.inputs.On Hold Funds' | translate}}</td>
|
||||
<td><a *mifosxHasPermission="'READ_SAVINGSACCOUNT'">{{savingsAccountData.onHoldFunds | currency:currencyCode:'symbol-narrow':'1.2-2'}}</a></td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.withHoldTax">
|
||||
<td>{{'labels.inputs.Withhold Tax Group' | translate}}</td>
|
||||
<td>{{savingsAccountData.taxGroup.name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<ng-template #alternateSummary>
|
||||
<div fxFlex="49%">
|
||||
<h4 class="table-headers">{{'labels.heading.Account Summary' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Activated On' | translate}}</td>
|
||||
<td>{{savingsAccountData.timeline.activatedOnDate ? (savingsAccountData.timeline.activatedOnDate |
|
||||
dateFormat) : 'Not Activated'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Currency' | translate}}</td>
|
||||
<td>{{savingsAccountData.currency.name}} [{{savingsAccountData.currency.code}}]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.External Id' | translate}}</td>
|
||||
<td *ngIf="savingsAccountData.externalId">
|
||||
<mifosx-external-identifier externalId="{{savingsAccountData.externalId}}"></mifosx-external-identifier>
|
||||
</td>
|
||||
<td *ngIf="!savingsAccountData.externalId">{{'labels.inputs.Not Provided' | translate}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div fxFlex="49%" fxLayout="column" fxLayoutGap="4%">
|
||||
|
||||
<div
|
||||
*ngIf="!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval; else alternateDetails">
|
||||
<h4 class="table-headers">{{'labels.heading.Savings Details' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Activated On' | translate}}</td>
|
||||
<td>{{savingsAccountData.timeline.activatedOnDate ? (savingsAccountData.timeline.activatedOnDate |
|
||||
dateFormat) : 'Not Activated'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Field Officer' | translate}}</td>
|
||||
<td>{{savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.External Id' | translate}}</td>
|
||||
<td *ngIf="savingsAccountData.externalId">
|
||||
<mifosx-external-identifier externalId="{{savingsAccountData.externalId}}"></mifosx-external-identifier>
|
||||
</td>
|
||||
<td *ngIf="!savingsAccountData.externalId">{{'labels.inputs.Not Provided' | translate}}</td> </tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Currency' | translate}}</td>
|
||||
<td>{{savingsAccountData.currency.name}} [{{savingsAccountData.currency.code}}]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Nominal Interest Rate' | translate}}</td>
|
||||
<td>{{savingsAccountData.nominalAnnualInterestRate | formatNumber}} %</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<ng-template #alternateDetails>
|
||||
<div>
|
||||
<h4 class="table-headers">{{'labels.heading.Savings Details' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Field Officer' | translate}}</td>
|
||||
<td>{{savingsAccountData.fieldOfficerName ? savingsAccountData.fieldOfficerName : 'Unassigned'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'labels.inputs.Balance' | translate}}</td>
|
||||
<td>{{savingsAccountData.summary.accountBalance}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div *ngIf="!savingsAccountData.status.rejected && !savingsAccountData.status.submittedAndPendingApproval">
|
||||
<h4 class="table-headers">{{'labels.heading.Performance History' | translate}}</h4>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr *ngIf="savingsAccountData.summary.totalDeposits">
|
||||
<td>{{'labels.inputs.Total Deposits' | translate}}</td>
|
||||
<td>{{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalDeposits |
|
||||
number}}</td>
|
||||
</tr>
|
||||
<tr *ngIf="savingsAccountData.summary.totalInterestEarned >= 0">
|
||||
<td>{{'labels.inputs.Total Interest Earned' | translate}}</td>
|
||||
<td>{{savingsAccountData.currency.displaySymbol}} {{savingsAccountData.summary.totalInterestEarned
|
||||
| formatNumber}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<nav mat-tab-nav-bar class="navigation-tabs" *ngIf="isActive">
|
||||
<a mat-tab-link [routerLink]="['./general']" routerLinkActive #general="routerLinkActive"
|
||||
[active]="general.isActive">
|
||||
{{'labels.inputs.General' | translate}}
|
||||
</a>
|
||||
<a mat-tab-link [routerLink]="['./transactions']" routerLinkActive #transactions="routerLinkActive"
|
||||
[active]="transactions.isActive">
|
||||
{{'labels.inputs.Transactions' | translate}}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
.savings-account-card {
|
||||
margin: 0 auto;
|
||||
max-width: 80rem;
|
||||
width: 90%;
|
||||
padding: 0;
|
||||
.header {
|
||||
padding: 1%;
|
||||
.header-title-group {
|
||||
.account-card-title {
|
||||
color: white;
|
||||
width: 90%;
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
.profile-image-container {
|
||||
margin: 1%;
|
||||
.profile-image {
|
||||
object-fit: cover;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
.account-actions {
|
||||
align-self: flex-end;
|
||||
margin: 0 1%;
|
||||
i {
|
||||
margin-bottom: 2px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigation-tabs {
|
||||
background-color: #f2f2f2;
|
||||
overflow: auto;
|
||||
}
|
||||
.content {
|
||||
.savings-account-tables {
|
||||
padding: 1%;
|
||||
margin: 1%;
|
||||
.table-headers {
|
||||
margin: 0;
|
||||
padding: 6px;
|
||||
}
|
||||
td {
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
i, img:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ToggleWithholdTaxDialogComponent } from './custom-dialogs/toggle-withho
|
||||
import { SavingsButtonsConfiguration } from './savings-buttons.config';
|
||||
import { SavingsService } from '../savings.service';
|
||||
import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
/**
|
||||
* Savings Account View Component
|
||||
@@ -34,7 +35,7 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
entityType: string;
|
||||
|
||||
isActive = false;
|
||||
currencyCode: string;
|
||||
currency: Currency;
|
||||
|
||||
/**
|
||||
* Fetches savings account data from `resolve`
|
||||
@@ -48,7 +49,7 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
public dialog: MatDialog) {
|
||||
this.route.data.subscribe((data: { savingsAccountData: any, savingsDatatables: any }) => {
|
||||
this.savingsAccountData = data.savingsAccountData;
|
||||
this.currencyCode = this.savingsAccountData.currency.code;
|
||||
this.currency = this.savingsAccountData.currency;
|
||||
this.savingsDatatables = data.savingsDatatables;
|
||||
});
|
||||
if (this.router.url.includes('clients')) {
|
||||
|
||||
+4
-4
@@ -51,10 +51,10 @@
|
||||
<i class="fa fa-file" matTooltip="View Reciept"></i>
|
||||
</button>
|
||||
<button class="account-action-button" mat-raised-button color="primary" matTooltip="View Journal Entries"
|
||||
matTooltipPosition="left" (click)="routeEdit($event)"
|
||||
[routerLink]="['/','journal-entry', 'view', 'S'+transaction.id ]">
|
||||
<i class="fa fa-arrow-circle-right"></i>
|
||||
</button>
|
||||
matTooltipPosition="left" (click)="routeEdit($event)"
|
||||
[routerLink]="['/','journal-entry', 'view', 'S'+transaction.id ]">
|
||||
<i class="fa fa-arrow-circle-right"></i>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
.container {
|
||||
max-width: 50rem;
|
||||
max-width: 37rem;
|
||||
.content {
|
||||
div {
|
||||
margin: 1rem 0;
|
||||
|
||||
@@ -42,6 +42,7 @@ import { NotesTabComponent } from './savings-account-view/notes-tab/notes-tab.co
|
||||
import { SavingNotesResolver } from './common-resolvers/saving-notes.resolver';
|
||||
import { SavingDocumentsResolver } from './common-resolvers/saving-documents.resolver';
|
||||
import { SavingsTransactionGeneralTabComponent } from './savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component';
|
||||
import { GeneralTabComponent } from './savings-account-view/general-tab/general-tab.component';
|
||||
|
||||
/** Savings Routes */
|
||||
const routes: Routes = [
|
||||
@@ -68,9 +69,19 @@ const routes: Routes = [
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'transactions',
|
||||
redirectTo: 'general',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'general',
|
||||
data: { title: 'Savings Account Details', breadcrumb: 'General', routeParamBreadcrumb: false },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: GeneralTabComponent
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'transactions',
|
||||
data: { title: 'Savings Account Transactions', breadcrumb: 'Transactions', routeParamBreadcrumb: false },
|
||||
|
||||
@@ -52,6 +52,7 @@ import { NotesTabComponent } from './savings-account-view/notes-tab/notes-tab.co
|
||||
import { DatatableTransactionTabComponent } from './savings-account-view/transactions/view-transaction/datatable-transaction-tab/datatable-transaction-tab.component';
|
||||
import { SavingsTransactionGeneralTabComponent } from './savings-account-view/transactions/view-transaction/savings-transaction-general-tab/savings-transaction-general-tab.component';
|
||||
import { SavingsTransactionDatatableTabComponent } from './savings-account-view/transactions/view-transaction/savings-transaction-datatable-tab/savings-transaction-datatable-tab.component';
|
||||
import { GeneralTabComponent } from './savings-account-view/general-tab/general-tab.component';
|
||||
|
||||
|
||||
/**
|
||||
@@ -110,7 +111,8 @@ import { SavingsTransactionDatatableTabComponent } from './savings-account-view/
|
||||
NotesTabComponent,
|
||||
DatatableTransactionTabComponent,
|
||||
SavingsTransactionGeneralTabComponent,
|
||||
SavingsTransactionDatatableTabComponent
|
||||
SavingsTransactionDatatableTabComponent,
|
||||
GeneralTabComponent
|
||||
],
|
||||
providers: [ ]
|
||||
})
|
||||
|
||||
+77
-52
@@ -1,13 +1,16 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" class="container m-b-20" *ngIf="dataSource?.data[0].manualEntry">
|
||||
<button mat-raised-button color="primary" (click)="revertTransaction()" *mifosxHasPermission="'REVERSE_JOURNALENTRY'" [disabled]="dataSource?.data[0].reversed">
|
||||
<span *ngIf="!dataSource.data[0].reversed">
|
||||
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Revert Transaction' | translate }}
|
||||
</span>
|
||||
<span *ngIf="dataSource.data[0].reversed">{{ 'labels.buttons.Transaction Reverted' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="isJournalEntryLoaded">
|
||||
|
||||
<div class="container m-b-20" *ngIf="isViewTransaction()">
|
||||
<div fxLayout="row" fxLayoutAlign="end" class="container m-b-20" *ngIf="dataSource?.data[0].manualEntry">
|
||||
<button mat-raised-button color="primary" (click)="revertTransaction()"
|
||||
*mifosxHasPermission="'REVERSE_JOURNALENTRY'" [disabled]="dataSource?.data[0].reversed">
|
||||
<span *ngIf="!dataSource.data[0].reversed">
|
||||
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Revert Transaction' | translate }}
|
||||
</span>
|
||||
<span *ngIf="dataSource.data[0].reversed">{{ 'labels.buttons.Transaction Reverted' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container m-b-20" *ngIf="isViewTransaction()">
|
||||
|
||||
<mat-card class="mat-elevation-z8" *ngIf="dataSource">
|
||||
|
||||
@@ -53,49 +56,71 @@
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mat-elevation-z8 container" fxLayoutAlign="center" fxLayout="row wrap">
|
||||
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Entry ID' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountType">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Type' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountType.value }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountCode">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Code' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountCode }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountName">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Name' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountName }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="debit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Debit' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }} </span></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="credit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Credit' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }} </span></td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="viewJournalEntry(row)" class="select-row"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" class="m-t-15 m-b-15">
|
||||
<button type="button" color="primary" mat-raised-button (click)="goBack()">{{ 'labels.buttons.Back' | translate }}</button>
|
||||
</div>
|
||||
|
||||
<div class="mat-elevation-z8 container" fxLayoutAlign="center" fxLayout="row wrap">
|
||||
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Entry ID' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountType">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Type' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountType.value }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountCode">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Code' |
|
||||
translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountCode }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountName">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Name' |
|
||||
translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountName }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="debit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Debit' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{
|
||||
(transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }}
|
||||
</span></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="credit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Credit' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{
|
||||
(transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }}
|
||||
</span></td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="viewJournalEntry(row)" class="select-row">
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" class="m-t-15 m-b-15">
|
||||
<button type="button" color="primary" mat-raised-button (click)="goBack()">{{ 'labels.buttons.Back' | translate
|
||||
}}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container m-b-20" *ngIf="!isJournalEntryLoaded">
|
||||
<div class="alert">
|
||||
<div class="message">
|
||||
<i class="fa fa-exclamation-circle alert-check"></i>
|
||||
{{"labels.text.No data found" | translate}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+8
-1
@@ -32,6 +32,8 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
/** Sorter for transaction table. */
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
|
||||
isJournalEntryLoaded = false;
|
||||
|
||||
/**
|
||||
* @param {AccountingService} accountingService Accounting Service.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -50,11 +52,16 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { title: string, transaction: any, transferJournalEntryData: any }) => {
|
||||
this.title = data.title;
|
||||
this.isJournalEntryLoaded = false;
|
||||
if (this.isViewTransaction()) {
|
||||
this.transaction = data.transaction;
|
||||
this.transactionId = data.transaction.pageItems[0].transactionId;
|
||||
if (data.transaction.pageItems.length > 0) {
|
||||
this.isJournalEntryLoaded = true;
|
||||
this.transactionId = data.transaction.pageItems[0].transactionId;
|
||||
}
|
||||
} else if (this.isViewTransfer()) {
|
||||
this.journalEntriesData = data.transferJournalEntryData.journalEntryData.content;
|
||||
this.isJournalEntryLoaded = true;
|
||||
}
|
||||
this.setTransaction();
|
||||
});
|
||||
|
||||
@@ -105,7 +105,9 @@ import {
|
||||
faCoins,
|
||||
faPiggyBank,
|
||||
faFileExcel,
|
||||
faFileExport
|
||||
faFileExport,
|
||||
faCalculator,
|
||||
faCalendarCheck
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
/**
|
||||
@@ -124,13 +126,16 @@ export class IconsModule {
|
||||
faArchive,
|
||||
faArrowLeft,
|
||||
faArrowRight,
|
||||
faBan,
|
||||
faBars,
|
||||
faBell,
|
||||
faBook,
|
||||
faBriefcase,
|
||||
faBuilding,
|
||||
faCalculator,
|
||||
faCalendar,
|
||||
faCalendarAlt,
|
||||
faCalendarCheck,
|
||||
faChartBar,
|
||||
faCheck,
|
||||
faCheckCircle,
|
||||
|
||||
Reference in New Issue
Block a user