136 lines
4.9 KiB
HTML
136 lines
4.9 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="csa-container">
|
|
<!-- Hero -->
|
|
<div class="csa-header">
|
|
<fa-icon icon="piggy-bank" class="csa-header__icon"></fa-icon>
|
|
<div>
|
|
<h2 class="csa-header__title">Create Savings Account</h2>
|
|
<div class="csa-header__sub">
|
|
Pick a product, confirm currency, set digital channels and review before submit.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Wizard tabs -->
|
|
<mat-tab-group
|
|
class="csa-tabs"
|
|
animationDuration="200ms"
|
|
[preserveContent]="true"
|
|
[(selectedIndex)]="selectedTabIndex"
|
|
>
|
|
<!-- Tab 1: Product Classification + Details -->
|
|
<mat-tab>
|
|
<ng-template mat-tab-label>
|
|
<fa-icon icon="check-square" class="csa-tab__icon"></fa-icon>
|
|
Product
|
|
</ng-template>
|
|
<div class="csa-tab-body">
|
|
<mifosx-savings-account-details-step
|
|
[savingsAccountTemplate]="savingsAccountTemplate"
|
|
(savingsAccountProductTemplate)="setTemplate($event)"
|
|
>
|
|
</mifosx-savings-account-details-step>
|
|
|
|
<div class="csa-actions">
|
|
<span class="csa-actions__spacer"></span>
|
|
<button mat-raised-button color="primary" [disabled]="!savingsAccountProductTemplate" (click)="next()">
|
|
{{ 'labels.buttons.Next' | translate }}
|
|
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</mat-tab>
|
|
|
|
<!-- Tab 2: Currency -->
|
|
<mat-tab [disabled]="!savingsAccountProductTemplate">
|
|
<ng-template mat-tab-label>
|
|
<fa-icon icon="dollar-sign" class="csa-tab__icon"></fa-icon>
|
|
Currency
|
|
</ng-template>
|
|
<div class="csa-tab-body">
|
|
@if (savingsAccountProductTemplate) {
|
|
<mifosx-savings-account-currency-step
|
|
[savingsAccountProductTemplate]="savingsAccountProductTemplate"
|
|
[primaryClientId]="savingsAccountTemplate?.clientId ?? null"
|
|
></mifosx-savings-account-currency-step>
|
|
}
|
|
|
|
<div class="csa-actions">
|
|
<button mat-stroked-button (click)="prev()">
|
|
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
|
{{ 'labels.buttons.Previous' | translate }}
|
|
</button>
|
|
<span class="csa-actions__spacer"></span>
|
|
<button mat-raised-button color="primary" (click)="next()">
|
|
{{ 'labels.buttons.Next' | translate }}
|
|
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</mat-tab>
|
|
|
|
<!-- Tab 3: Digital -->
|
|
<mat-tab [disabled]="!savingsAccountProductTemplate">
|
|
<ng-template mat-tab-label>
|
|
<fa-icon icon="mobile-alt" class="csa-tab__icon"></fa-icon>
|
|
Digital
|
|
</ng-template>
|
|
<div class="csa-tab-body">
|
|
@if (savingsAccountProductTemplate) {
|
|
<mifosx-savings-account-digital-step [savingsAccountProductTemplate]="savingsAccountProductTemplate">
|
|
</mifosx-savings-account-digital-step>
|
|
}
|
|
|
|
<div class="csa-actions">
|
|
<button mat-stroked-button (click)="prev()">
|
|
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
|
{{ 'labels.buttons.Previous' | translate }}
|
|
</button>
|
|
<span class="csa-actions__spacer"></span>
|
|
<button mat-raised-button color="primary" (click)="next()">
|
|
{{ 'labels.buttons.Next' | translate }}
|
|
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</mat-tab>
|
|
|
|
<!-- Tab 4: Preview / Submit -->
|
|
<mat-tab [disabled]="!savingsAccountProductTemplate">
|
|
<ng-template mat-tab-label>
|
|
<fa-icon icon="eye" class="csa-tab__icon"></fa-icon>
|
|
{{ 'labels.inputs.PREVIEW' | translate }}
|
|
</ng-template>
|
|
<div class="csa-tab-body">
|
|
@if (savingsAccountProductTemplate) {
|
|
<mifosx-savings-account-preview-step
|
|
[savingsAccountProductTemplate]="savingsAccountProductTemplate"
|
|
[savingsAccountTemplate]="savingsAccountTemplate"
|
|
[savingsAccountTermsForm]="savingsAccountTermsForm"
|
|
[savingsAccount]="savingsAccount"
|
|
[savingsAccountDigital]="savingsAccountDigital"
|
|
[savingsAccountNominees]="savingsAccountCurrencyStep?.nominees ?? []"
|
|
[submitting]="submitting"
|
|
(submitEvent)="submit()"
|
|
>
|
|
</mifosx-savings-account-preview-step>
|
|
}
|
|
|
|
<div class="csa-actions">
|
|
<button mat-stroked-button (click)="prev()">
|
|
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
|
{{ 'labels.buttons.Previous' | translate }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</mat-tab>
|
|
</mat-tab-group>
|
|
</div>
|