280 lines
12 KiB
HTML
280 lines
12 KiB
HTML
<!--
|
|
Copyright since 2025 Mifos Initiative
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
|
|
<div class="fd-view">
|
|
<!-- ─── Dormancy risk alert (only when subStatus has left Active) ──── -->
|
|
<mifosx-dormancy-alert-panel [accountData]="fixedDepositsAccountData"></mifosx-dormancy-alert-panel>
|
|
|
|
<!-- ─── Gradient hero header ─────────────────────────────────────── -->
|
|
<header class="fd-hero">
|
|
<div class="fd-hero__left">
|
|
<div class="fd-hero__avatar">
|
|
<fa-icon icon="piggy-bank"></fa-icon>
|
|
</div>
|
|
|
|
<div class="fd-hero__info">
|
|
<div class="fd-hero__status-row">
|
|
<span
|
|
class="fd-status-pill"
|
|
[ngClass]="fixedDepositsAccountData.status.code | statusLookup"
|
|
[matTooltip]="fixedDepositsAccountData.status.value"
|
|
>
|
|
<span class="fd-status-pill__dot"></span>
|
|
{{ fixedDepositsAccountData.status.value }}
|
|
</span>
|
|
</div>
|
|
|
|
<h2 class="fd-hero__title">
|
|
<mifosx-long-text textValue="{{ fixedDepositsAccountData.depositProductName }}"></mifosx-long-text>
|
|
</h2>
|
|
|
|
<div class="fd-hero__meta">
|
|
<span class="fd-hero__meta-item">
|
|
<span class="fd-hero__meta-label">{{ 'labels.inputs.Account Number' | translate }}</span>
|
|
<mifosx-account-number
|
|
accountNo="{{ fixedDepositsAccountData.accountNo }}"
|
|
display="left"
|
|
></mifosx-account-number>
|
|
</span>
|
|
|
|
<span class="fd-hero__meta-item">
|
|
<span class="fd-hero__meta-label">
|
|
{{ 'labels.text.' + entityType | translate }} {{ 'labels.inputs.name' | translate }}
|
|
</span>
|
|
<span class="fd-hero__meta-value">
|
|
{{ fixedDepositsAccountData.clientName || fixedDepositsAccountData.groupName }}
|
|
@if (fixedDepositsAccountData.clientAccountNo) {
|
|
<mifosx-account-number
|
|
accountNo="{{ fixedDepositsAccountData.clientAccountNo }}"
|
|
></mifosx-account-number>
|
|
}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Balance KPI strip -->
|
|
@if (!fixedDepositsAccountData.status.rejected && !fixedDepositsAccountData.status.submittedAndPendingApproval) {
|
|
<div class="fd-hero__kpis">
|
|
<div class="fd-kpi">
|
|
<span class="fd-kpi__label">{{ 'labels.inputs.Current Balance' | translate }}</span>
|
|
<span class="fd-kpi__value">
|
|
{{ fixedDepositsAccountData.summary.accountBalance | currency: currency.code : 'symbol-narrow' : '1.2-2' }}
|
|
</span>
|
|
</div>
|
|
<div class="fd-kpi fd-kpi--deposit">
|
|
<span class="fd-kpi__label">{{ 'labels.inputs.Deposit Amount' | translate }}</span>
|
|
<span class="fd-kpi__value">
|
|
{{ fixedDepositsAccountData.depositAmount | currency: currency.code : 'symbol-narrow' : '1.2-2' }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<!-- Action menu (kebab) -->
|
|
<div class="fd-hero__actions">
|
|
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Account actions" yPosition="below">
|
|
<fa-icon icon="ellipsis-v"></fa-icon>
|
|
</button>
|
|
</div>
|
|
|
|
<mat-menu #accountMenu="matMenu" class="cur-action-menu" xPosition="before">
|
|
<div class="cur-menu" (click)="$event.stopPropagation()">
|
|
<header class="cur-menu__head">
|
|
<fa-icon icon="bolt" class="cur-menu__head-ico"></fa-icon>
|
|
<div>
|
|
<div class="cur-menu__head-title">Account Actions</div>
|
|
<div class="cur-menu__head-sub">Manage deposits, interest & more</div>
|
|
</div>
|
|
</header>
|
|
<div class="cur-menu__body">
|
|
@if (hasKind('transact')) {
|
|
<div class="cur-menu__group">
|
|
<div class="cur-menu__group-title">Transact</div>
|
|
@for (item of buttonConfig.singleButtons; track item.name) {
|
|
@if (kindOf(item.name) === 'transact') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--transact" (click)="doAction(item.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(item.name, item.icon)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ item.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
@for (option of buttonConfig.options; track option.name) {
|
|
@if (kindOf(option.name) === 'transact') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--transact" (click)="doAction(option.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(option.name)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ option.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
@if (hasKind('interest')) {
|
|
<div class="cur-menu__group">
|
|
<div class="cur-menu__group-title">Interest</div>
|
|
@for (item of buttonConfig.singleButtons; track item.name) {
|
|
@if (kindOf(item.name) === 'interest') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--interest" (click)="doAction(item.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(item.name, item.icon)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ item.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
@for (option of buttonConfig.options; track option.name) {
|
|
@if (kindOf(option.name) === 'interest') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--interest" (click)="doAction(option.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(option.name)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ option.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
@if (hasKind('admin')) {
|
|
<div class="cur-menu__group">
|
|
<div class="cur-menu__group-title">Admin</div>
|
|
@for (item of buttonConfig.singleButtons; track item.name) {
|
|
@if (kindOf(item.name) === 'admin') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--admin" (click)="doAction(item.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(item.name, item.icon)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ item.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
@for (option of buttonConfig.options; track option.name) {
|
|
@if (kindOf(option.name) === 'admin') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--admin" (click)="doAction(option.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(option.name)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ option.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
@if (hasKind('danger')) {
|
|
<div class="cur-menu__group cur-menu__group--danger">
|
|
<div class="cur-menu__group-title">Danger zone</div>
|
|
@for (item of buttonConfig.singleButtons; track item.name) {
|
|
@if (kindOf(item.name) === 'danger') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--danger" (click)="doAction(item.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(item.name, item.icon)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ item.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
@for (option of buttonConfig.options; track option.name) {
|
|
@if (kindOf(option.name) === 'danger') {
|
|
<button mat-menu-item class="cur-menu__item cur-menu__item--danger" (click)="doAction(option.name)">
|
|
<span class="cur-menu__ico"><fa-icon [icon]="iconOf(option.name)"></fa-icon></span>
|
|
<span class="cur-menu__label">{{ option.name | translateKey: 'menus' }}</span>
|
|
</button>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</mat-menu>
|
|
</header>
|
|
|
|
<!-- ─── Pill-style tab navigation ─────────────────────────────────── -->
|
|
<nav mat-tab-nav-bar class="fd-tabs" [tabPanel]="tabPanel">
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
[routerLink]="['./general']"
|
|
routerLinkActive
|
|
#general="routerLinkActive"
|
|
[active]="general.isActive"
|
|
>
|
|
<fa-icon icon="info-circle" class="fd-tab__ic"></fa-icon>
|
|
<span>{{ 'labels.inputs.General' | translate }}</span>
|
|
</a>
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
[routerLink]="['./interest-rate-chart']"
|
|
routerLinkActive
|
|
#IRC="routerLinkActive"
|
|
[active]="IRC.isActive"
|
|
>
|
|
<fa-icon icon="chart-line" class="fd-tab__ic"></fa-icon>
|
|
<span>{{ 'labels.inputs.Interest Rate Chart' | translate }}</span>
|
|
</a>
|
|
@if (showTransactions) {
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
[routerLink]="['./transactions']"
|
|
routerLinkActive
|
|
#transactions="routerLinkActive"
|
|
[active]="transactions.isActive"
|
|
>
|
|
<fa-icon icon="exchange-alt" class="fd-tab__ic"></fa-icon>
|
|
<span>{{ 'labels.inputs.Transactions' | translate }}</span>
|
|
</a>
|
|
}
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
[routerLink]="['./charges']"
|
|
routerLinkActive
|
|
#charges="routerLinkActive"
|
|
[active]="charges.isActive"
|
|
>
|
|
<fa-icon icon="receipt" class="fd-tab__ic"></fa-icon>
|
|
<span>{{ 'labels.inputs.Charges' | translate }}</span>
|
|
</a>
|
|
@if (fixedDepositsAccountData.clientId) {
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
[routerLink]="['./standing-instructions']"
|
|
routerLinkActive
|
|
#standingInstructions="routerLinkActive"
|
|
[active]="standingInstructions.isActive"
|
|
>
|
|
<fa-icon icon="calendar-check" class="fd-tab__ic"></fa-icon>
|
|
<span>{{ 'labels.inputs.Standing Instructions' | translate }}</span>
|
|
</a>
|
|
}
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
[routerLink]="['./nominees']"
|
|
routerLinkActive
|
|
#nominees="routerLinkActive"
|
|
[active]="nominees.isActive"
|
|
>
|
|
<fa-icon icon="user-shield" class="fd-tab__ic"></fa-icon>
|
|
<span>Nominees</span>
|
|
</a>
|
|
@for (savingsDatatable of savingsDatatables; track savingsDatatable) {
|
|
<a
|
|
mat-tab-link
|
|
class="fd-tab"
|
|
*mifosxHasPermission="'READ_' + savingsDatatable.registeredTableName"
|
|
[routerLink]="['./datatables', savingsDatatable.registeredTableName]"
|
|
routerLinkActive
|
|
#datatable="routerLinkActive"
|
|
[active]="datatable.isActive"
|
|
>
|
|
<fa-icon icon="table" class="fd-tab__ic"></fa-icon>
|
|
<span>{{ savingsDatatable.registeredTableName }}</span>
|
|
</a>
|
|
}
|
|
</nav>
|
|
|
|
<mat-tab-nav-panel #tabPanel>
|
|
<div class="fd-body">
|
|
<router-outlet></router-outlet>
|
|
</div>
|
|
</mat-tab-nav-panel>
|
|
</div>
|