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
-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: [ ]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user