Upgrading to Angular 20:

Replaced checked in package-lock.json by regenerated one.
Ran ng update @angular/core@20 @angular/cli@20
Ran npm install @angular-builders/jest@^20.0.0 @fortawesome/angular-fontawesome@^3.0.0 @swimlane/ngx-graph@^11
Ran npm install ngx-mat-select-search@^8.0.2.
Ran ng update @angular/material@20.
Updated all eslint and typescript to the latest versions.
Removed @angular-devkit/schematics.
Updated fontawesome.
Updated rxjs and tslib.
Moved required node version from 16 to 20.
Updated jest-preset-angular.
Set preserveWhitespaces to false.
Corrected two type declarations in two typescript files to make ng serve run without errors.
Removed unused angular-devkit/schematics from view-user.component.ts .
Updated list of supported browsers.
Upgraded prettier.
Ran prettier . --write the first time.
Ran prettier . --write the second time.
Ran ng generate @angular/core:inject with defaults, excepted a handful of files.
Fixed remaining eslint problems.
Added dist directory to ignores in eslint.config.js.
Let prettier fix formatting, almost everything is just line breaks.
Made htmlhint ignore @if and @for Angular constructs.
Updated node version in Github workflow to 22.12.0 (build.yml).
Updated .env.ts.
Updated Angular datetime format strings from YYYY-MM-DD to yyyy-MM-dd.
Merged changes from dev into angular20 branch.
This commit is contained in:
Felix van Hove
2025-12-08 11:01:01 +01:00
parent f1b4ec2cf2
commit 7fd1486c08
1516 changed files with 39367 additions and 36037 deletions
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
/** rxjs Imports */
@@ -16,7 +16,7 @@ import { switchMap } from 'rxjs/operators';
providedIn: 'root'
})
export class AccountTransfersService {
constructor(private http: HttpClient) {}
private http = inject(HttpClient);
/**
* @params standingInstructionsId
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -14,14 +14,8 @@ import { SettingsService } from 'app/settings/settings.service';
*/
@Injectable()
export class ListTransactionsResolver {
/**
* @param {AccountTransfersService} accountTransfersService Account Transfers service.
* @param {SettingsService} settingsService Settings Service.
*/
constructor(
private accountTransfersService: AccountTransfersService,
private settingsService: SettingsService
) {}
private accountTransfersService = inject(AccountTransfersService);
private settingsService = inject(SettingsService);
/**
* Returns the Standing Instructions Data.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -13,12 +13,10 @@ import { AccountTransfersService } from '../account-transfers.service';
*/
@Injectable()
export class MakeAccountTransferTemplateResolver {
private accountTransfersService = inject(AccountTransfersService);
accountTypeId: string;
id: any;
/**
* @param {accountTransfersService} AccountTransfersService Account Transfers service.
*/
constructor(private accountTransfersService: AccountTransfersService) {}
/**
* Returns the Standing Instructions Data.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -13,10 +13,7 @@ import { AccountTransfersService } from '../account-transfers.service';
*/
@Injectable()
export class StandingInstructionsDataAndTemplateResolver {
/**
* @param {accountTransfersService} AccountTransfersService Account Transfers service.
*/
constructor(private accountTransfersService: AccountTransfersService) {}
private accountTransfersService = inject(AccountTransfersService);
/**
* Returns the Standing Instructions Data.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -13,12 +13,9 @@ import { AccountTransfersService } from '../account-transfers.service';
*/
@Injectable()
export class StandingInstructionsTemplateResolver {
accountTypeId: string;
private accountTransfersService = inject(AccountTransfersService);
/**
* @param {accountTransfersService} AccountTransfersService Account Transfers service.
*/
constructor(private accountTransfersService: AccountTransfersService) {}
accountTypeId: string;
/**
* Returns the Standing Instructions Data.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -13,10 +13,7 @@ import { AccountTransfersService } from '../account-transfers.service';
*/
@Injectable()
export class ViewAccountTransferResolver {
/**
* @param {AccountTransfersService} AccountTransfersService Savings service.
*/
constructor(private accountTransfersService: AccountTransfersService) {}
private accountTransfersService = inject(AccountTransfersService);
/**
* Returns the View Account Transfer data.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -13,10 +13,7 @@ import { AccountTransfersService } from '../account-transfers.service';
*/
@Injectable()
export class ViewStandingInstructionsResolver {
/**
* @param {accountTransfersService} AccountTransfersService Account Transfers service.
*/
constructor(private accountTransfersService: AccountTransfersService) {}
private accountTransfersService = inject(AccountTransfersService);
/**
* Returns the Standing Instructions Data.
@@ -6,10 +6,12 @@
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
<input matInput required formControlName="name" />
<mat-error *ngIf="createStandingInstructionsForm.controls.name.hasError('required')">
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.inputs.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.name.hasError('required')) {
<mat-error>
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.inputs.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
@@ -20,153 +22,199 @@
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Type' | translate }}</mat-label>
<mat-select required formControlName="transferType" (selectionChange)="changeEvent()">
<mat-option *ngFor="let transferType of transferTypeData" [value]="transferType.id">
{{ transferType.value }}
</mat-option>
@for (transferType of transferTypeData; track transferType) {
<mat-option [value]="transferType.id">
{{ transferType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.transferType.hasError('required')">
{{ 'labels.inputs.Transfer Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.inputs.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.transferType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transfer Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.inputs.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Priority' | translate }}</mat-label>
<mat-select required formControlName="priority">
<mat-option *ngFor="let priorityType of priorityTypeData" [value]="priorityType.id">
{{ priorityType.value }}
</mat-option>
@for (priorityType of priorityTypeData; track priorityType) {
<mat-option [value]="priorityType.id">
{{ priorityType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.priority.hasError('required')">
{{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.priority.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Status' | translate }}</mat-label>
<mat-select required formControlName="status">
<mat-option *ngFor="let statusType of statusTypeData" [value]="statusType.id">
{{ statusType.value }}
</mat-option>
@for (statusType of statusTypeData; track statusType) {
<mat-option [value]="statusType.id">
{{ statusType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.status.hasError('required')">
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.status.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.From Account Type' | translate }}</mat-label>
<mat-select required formControlName="fromAccountType" (selectionChange)="changeEvent()">
<mat-option *ngFor="let fromAccountType of fromAccountTypeData" [value]="fromAccountType.id">
{{ fromAccountType.value }}
</mat-option>
@for (fromAccountType of fromAccountTypeData; track fromAccountType) {
<mat-option [value]="fromAccountType.id">
{{ fromAccountType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.fromAccountType.hasError('required')">
{{ 'labels.inputs.From Account Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.fromAccountType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.From Account Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.From Account' | translate }}</mat-label>
<mat-select required formControlName="fromAccountId" (selectionChange)="changeEvent()">
<mat-option *ngFor="let fromAccount of fromAccountData" [value]="fromAccount.id">
{{ fromAccount.productName }} - {{ fromAccount.accountNo }}
</mat-option>
@for (fromAccount of fromAccountData; track fromAccount) {
<mat-option [value]="fromAccount.id">
{{ fromAccount.productName }} - {{ fromAccount.accountNo }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.fromAccountId.hasError('required')">
{{ 'labels.inputs.From Account' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.fromAccountId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.From Account' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Destination' | translate }}</mat-label>
<mat-select required formControlName="destination">
<mat-option *ngFor="let destinationType of destinationTypeData" [value]="destinationType.id">
{{ destinationType.value }}
</mat-option>
@for (destinationType of destinationTypeData; track destinationType) {
<mat-option [value]="destinationType.id">
{{ destinationType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.destination.hasError('required')">
{{ 'labels.inputs.Destination' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.destination.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Destination' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.To Office' | translate }}</mat-label>
<mat-select [disabled]="ToOfficeId" required formControlName="toOfficeId" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toOfficeType of toOfficeTypeData" [value]="toOfficeType.id">
{{ toOfficeType.name }}
</mat-option>
@for (toOfficeType of toOfficeTypeData; track toOfficeType) {
<mat-option [value]="toOfficeType.id">
{{ toOfficeType.name }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.toOfficeId.hasError('required')">
{{ 'labels.inputs.To Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.toOfficeId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.To Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Beneficiary' | translate }}</mat-label>
<mat-select [disabled]="ToClientId" required formControlName="toClientId" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toClientType of toClientTypeData" [value]="toClientType.id">
{{ toClientType.displayName }}
</mat-option>
@for (toClientType of toClientTypeData; track toClientType) {
<mat-option [value]="toClientType.id">
{{ toClientType.displayName }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.toClientId.hasError('required')">
{{ 'labels.inputs.Beneficiary' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.toClientId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Beneficiary' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.To Account Type' | translate }}</mat-label>
<mat-select required formControlName="toAccountType" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toAccountType of toAccountTypeData" [value]="toAccountType.id">
{{ toAccountType.value }}
</mat-option>
@for (toAccountType of toAccountTypeData; track toAccountType) {
<mat-option [value]="toAccountType.id">
{{ toAccountType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.toAccountType.hasError('required')">
{{ 'labels.inputs.To Account Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.toAccountType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.To Account Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.To Account' | translate }}</mat-label>
<mat-select required formControlName="toAccountId" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toAccount of toAccountData" [value]="toAccount.id">
{{ toAccount.productName }} - {{ toAccount.accountNo }}
</mat-option>
@for (toAccount of toAccountData; track toAccount) {
<mat-option [value]="toAccount.id">
{{ toAccount.productName }} - {{ toAccount.accountNo }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.toAccountId.hasError('required')">
{{ 'labels.inputs.To Account' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.toAccountId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.To Account' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Standing Instruction Type' | translate }}</mat-label>
<mat-select formControlName="instructionType">
<mat-option *ngFor="let instructionsType of instructionTypeData" [value]="instructionsType.id">
{{ instructionsType.value }}
</mat-option>
@for (instructionsType of instructionTypeData; track instructionsType) {
<mat-option [value]="instructionsType.id">
{{ instructionsType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.instructionType.hasError('required')">
{{ 'labels.inputs.Standing Instruction Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.instructionType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Standing Instruction Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
<input type="number" matInput required formControlName="amount" />
<mat-error *ngIf="createStandingInstructionsForm.controls.amount.hasError('required')">
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.amount.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48" (click)="validFromDatePicker.open()">
@@ -181,10 +229,12 @@
/>
<mat-datepicker-toggle matSuffix [for]="validFromDatePicker"></mat-datepicker-toggle>
<mat-datepicker #validFromDatePicker></mat-datepicker>
<mat-error *ngIf="createStandingInstructionsForm.controls.validFrom.hasError('required')">
{{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.validFrom.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48" (click)="validTillDatePicker.open()">
@@ -199,48 +249,57 @@
/>
<mat-datepicker-toggle matSuffix [for]="validTillDatePicker"></mat-datepicker-toggle>
<mat-datepicker #validTillDatePicker></mat-datepicker>
<mat-error *ngIf="createStandingInstructionsForm.controls.validTill.hasError('required')">
{{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.validTill.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Recurrence Type' | translate }}</mat-label>
<mat-select required formControlName="recurrenceType">
<mat-option *ngFor="let recurrenceType of recurrenceTypeData" [value]="recurrenceType.id">
{{ recurrenceType.value }}
</mat-option>
@for (recurrenceType of recurrenceTypeData; track recurrenceType) {
<mat-option [value]="recurrenceType.id">
{{ recurrenceType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.recurrenceType.hasError('required')">
{{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.recurrenceType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Interval' | translate }}</mat-label>
<input type="number" matInput required formControlName="recurrenceInterval" />
<mat-error *ngIf="createStandingInstructionsForm.controls.recurrenceInterval.hasError('required')">
{{ 'labels.inputs.Recurrence Interval' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.recurrenceInterval.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Recurrence Interval' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Recurrence Frequency' | translate }}</mat-label>
<mat-select required formControlName="recurrenceFrequency">
<mat-option
*ngFor="let recurrenceFrequencyType of recurrenceFrequencyTypeData"
[value]="recurrenceFrequencyType.id"
>
{{ recurrenceFrequencyType.value }}
</mat-option>
@for (recurrenceFrequencyType of recurrenceFrequencyTypeData; track recurrenceFrequencyType) {
<mat-option [value]="recurrenceFrequencyType.id">
{{ recurrenceFrequencyType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createStandingInstructionsForm.controls.recurrenceFrequency.hasError('required')">
{{ 'labels.inputs.Recurrence Frequency' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.recurrenceFrequency.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Recurrence Frequency' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48" (click)="recurrenceOnMonthDayDatePicker.open()">
@@ -255,10 +314,12 @@
/>
<mat-datepicker-toggle matSuffix [for]="recurrenceOnMonthDayDatePicker"></mat-datepicker-toggle>
<mat-datepicker #recurrenceOnMonthDayDatePicker></mat-datepicker>
<mat-error *ngIf="createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError('required')">
{{ 'labels.inputs.On Month Day' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError('required')) {
<mat-error>
{{ 'labels.inputs.On Month Day' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
</div>
</mat-card-content>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { UntypedFormBuilder, UntypedFormGroup, Validators, FormControl, ReactiveFormsModule } from '@angular/forms';
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class CreateStandingInstructionsComponent implements OnInit {
private formBuilder = inject(UntypedFormBuilder);
private route = inject(ActivatedRoute);
private router = inject(Router);
private accountTransfersService = inject(AccountTransfersService);
private settingsService = inject(SettingsService);
private dateUtils = inject(Dates);
/** Standing Instructions Data */
standingIntructionsTemplate: any;
/** Minimum date allowed. */
@@ -79,14 +86,7 @@ export class CreateStandingInstructionsComponent implements OnInit {
* @param {SettingsService} settingsService Settings Service
* @param {Dates} dateUtils Date Utils
*/
constructor(
private formBuilder: UntypedFormBuilder,
private route: ActivatedRoute,
private router: Router,
private accountTransfersService: AccountTransfersService,
private settingsService: SettingsService,
private dateUtils: Dates
) {
constructor() {
this.route.data.subscribe((data: { standingIntructionsTemplate: any }) => {
this.standingIntructionsTemplate = data.standingIntructionsTemplate;
this.setParams();
@@ -26,27 +26,35 @@
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Priority' | translate }}</mat-label>
<mat-select required formControlName="priority">
<mat-option *ngFor="let priorityType of priorityTypeData" [value]="priorityType.id">
{{ priorityType.value }}
</mat-option>
@for (priorityType of priorityTypeData; track priorityType) {
<mat-option [value]="priorityType.id">
{{ priorityType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="editStandingInstructionsForm.controls.priority.hasError('required')">
{{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (editStandingInstructionsForm.controls.priority.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Priority' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Status' | translate }}</mat-label>
<mat-select required formControlName="status">
<mat-option *ngFor="let statusType of statusTypeData" [value]="statusType.id">
{{ statusType.value }}
</mat-option>
@for (statusType of statusTypeData; track statusType) {
<mat-option [value]="statusType.id">
{{ statusType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="editStandingInstructionsForm.controls.status.hasError('required')">
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (editStandingInstructionsForm.controls.status.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
@@ -82,9 +90,11 @@
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Standing Instruction Type' | translate }}</mat-label>
<mat-select formControlName="instructionType">
<mat-option *ngFor="let instructionsType of instructionTypeData" [value]="instructionsType.id">
{{ instructionsType.value }}
</mat-option>
@for (instructionsType of instructionTypeData; track instructionsType) {
<mat-option [value]="instructionsType.id">
{{ instructionsType.value }}
</mat-option>
}
</mat-select>
</mat-form-field>
@@ -105,10 +115,12 @@
/>
<mat-datepicker-toggle matSuffix [for]="validFromDatePicker"></mat-datepicker-toggle>
<mat-datepicker #validFromDatePicker></mat-datepicker>
<mat-error *ngIf="editStandingInstructionsForm.controls.validFrom.hasError('required')">
{{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (editStandingInstructionsForm.controls.validFrom.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Valid From Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48" (click)="validTillDatePicker.open()">
@@ -123,23 +135,29 @@
/>
<mat-datepicker-toggle matSuffix [for]="validTillDatePicker"></mat-datepicker-toggle>
<mat-datepicker #validTillDatePicker></mat-datepicker>
<mat-error *ngIf="editStandingInstructionsForm.controls.validTill.hasError('required')">
{{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (editStandingInstructionsForm.controls.validTill.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Valid Till Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Recurrence Type' | translate }}</mat-label>
<mat-select required formControlName="recurrenceType">
<mat-option *ngFor="let recurrenceType of recurrenceTypeData" [value]="recurrenceType.id">
{{ recurrenceType.value }}
</mat-option>
@for (recurrenceType of recurrenceTypeData; track recurrenceType) {
<mat-option [value]="recurrenceType.id">
{{ recurrenceType.value }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="editStandingInstructionsForm.controls.recurrenceType.hasError('required')">
{{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (editStandingInstructionsForm.controls.recurrenceType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Recurrence Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48">
@@ -150,12 +168,11 @@
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Recurrence Frequency' | translate }}</mat-label>
<mat-select formControlName="recurrenceFrequency">
<mat-option
*ngFor="let recurrenceFrequencyType of recurrenceFrequencyTypeData"
[value]="recurrenceFrequencyType.id"
>
{{ recurrenceFrequencyType.value }}
</mat-option>
@for (recurrenceFrequencyType of recurrenceFrequencyTypeData; track recurrenceFrequencyType) {
<mat-option [value]="recurrenceFrequencyType.id">
{{ recurrenceFrequencyType.value }}
</mat-option>
}
</mat-select>
</mat-form-field>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { UntypedFormBuilder, UntypedFormGroup, Validators, FormControl, ReactiveFormsModule } from '@angular/forms';
@@ -21,6 +21,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class EditStandingInstructionsComponent implements OnInit {
private formBuilder = inject(UntypedFormBuilder);
private route = inject(ActivatedRoute);
private router = inject(Router);
private accountTransfersService = inject(AccountTransfersService);
private settingsService = inject(SettingsService);
private dateUtils = inject(Dates);
/** Standing Instructions Data */
standingInstructionsData: any;
/** Standing Instructions Id */
@@ -53,14 +60,7 @@ export class EditStandingInstructionsComponent implements OnInit {
* @param {SettingsService} settingsService Settings Service
* @param {Dates} dateUtils Date Utils
*/
constructor(
private formBuilder: UntypedFormBuilder,
private route: ActivatedRoute,
private router: Router,
private accountTransfersService: AccountTransfersService,
private settingsService: SettingsService,
private dateUtils: Dates
) {
constructor() {
this.route.data.subscribe((data: { standingInstructionsDataAndTemplate: any }) => {
this.standingInstructionsData = data.standingInstructionsDataAndTemplate;
this.standingInstructionsId = data.standingInstructionsDataAndTemplate.id;
@@ -2,32 +2,38 @@
<mat-card class="container">
<div class="layout-row-wrap gap-2px responsive-column">
<div class="flex-fill" *ngIf="isFromClient">
<span class="flex-40">
<h3 class="mat-h3">{{ 'labels.heading.Client Type' | translate }}</h3>
</span>
<span class="client-Name">
<h3 class="mat-h3">{{ clientName }}</h3>
</span>
</div>
@if (isFromClient) {
<div class="flex-fill">
<span class="flex-40">
<h3 class="mat-h3">{{ 'labels.heading.Client Type' | translate }}</h3>
</span>
<span class="client-Name">
<h3 class="mat-h3">{{ clientName }}</h3>
</span>
</div>
}
<div *ngIf="!isFromClient" class="flex-fill">
<mat-form-field class="flex-30">
<input matInput placeholder="ClientName" [formControl]="clientNameControl" />
</mat-form-field>
<mat-form-field class="flex-30">
<input matInput placeholder="From Client Id" [formControl]="fromClientId" />
</mat-form-field>
</div>
@if (!isFromClient) {
<div class="flex-fill">
<mat-form-field class="flex-30">
<input matInput placeholder="ClientName" [formControl]="clientNameControl" />
</mat-form-field>
<mat-form-field class="flex-30">
<input matInput placeholder="From Client Id" [formControl]="fromClientId" />
</mat-form-field>
</div>
}
<mat-divider [inset]="true"></mat-divider>
<mat-form-field class="type-field">
<mat-label>{{ 'labels.inputs.Type' | translate }}</mat-label>
<mat-select [formControl]="transferType">
<mat-option *ngFor="let transferTypeData of transferTypeDatas" [value]="transferTypeData.id">
{{ transferTypeData.value }}
</mat-option>
@for (transferTypeData of transferTypeDatas; track transferTypeData) {
<mat-option [value]="transferTypeData.id">
{{ transferTypeData.value }}
</mat-option>
}
</mat-select>
</mat-form-field>
@@ -88,30 +94,34 @@
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let instruction">
<span *ngIf="instruction.status.value !== 'Deleted'">
<button
class="account-action-button"
mat-raised-button
color="primary"
matTooltip="{{ 'tooltips.Edit Standing Instruction' | translate }}"
*mifosxHasPermission="'UPDATE_STANDINGINSTRUCTION'"
[routerLink]="['../', instruction.id, 'edit']"
>
<i class="fa fa-edit"></i>
</button>
</span>
<span *ngIf="instruction.status.value !== 'Deleted'">
<button
class="account-action-button"
mat-raised-button
color="warn"
matTooltip="{{ 'tooltips.Delete Standing Instruction' | translate }}"
*mifosxHasPermission="'DELETE_STANDINGINSTRUCTION'"
(click)="deleteStandingInstruction(instruction.id)"
>
<i class="fa fa-times"></i>
</button>
</span>
@if (instruction.status.value !== 'Deleted') {
<span>
<button
class="account-action-button"
mat-raised-button
color="primary"
matTooltip="{{ 'tooltips.Edit Standing Instruction' | translate }}"
*mifosxHasPermission="'UPDATE_STANDINGINSTRUCTION'"
[routerLink]="['../', instruction.id, 'edit']"
>
<i class="fa fa-edit"></i>
</button>
</span>
}
@if (instruction.status.value !== 'Deleted') {
<span>
<button
class="account-action-button"
mat-raised-button
color="warn"
matTooltip="{{ 'tooltips.Delete Standing Instruction' | translate }}"
*mifosxHasPermission="'DELETE_STANDINGINSTRUCTION'"
(click)="deleteStandingInstruction(instruction.id)"
>
<i class="fa fa-times"></i>
</button>
</span>
}
<button
class="account-action-button"
mat-raised-button
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, ViewChild } from '@angular/core';
import { Component, ViewChild, inject } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatPaginator } from '@angular/material/paginator';
import {
@@ -55,6 +55,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class ListStandingInstructionsComponent {
private route = inject(ActivatedRoute);
private accountTransfersService = inject(AccountTransfersService);
private settingsService = inject(SettingsService);
private dialog = inject(MatDialog);
/** Recurring Deposits Data */
standingIntructionsTemplateData: any;
/** Instructions Data */
@@ -104,12 +109,7 @@ export class ListStandingInstructionsComponent {
* @param {SettingsService} settingsService Settings Service
* @param {AccountTransfersService} accountTransfersService Account Transfers Service
*/
constructor(
private route: ActivatedRoute,
private accountTransfersService: AccountTransfersService,
private settingsService: SettingsService,
private dialog: MatDialog
) {
constructor() {
this.route.data.subscribe((data: { standingIntructionsTemplate: any }) => {
this.standingIntructionsTemplateData = data.standingIntructionsTemplate;
if (data.standingIntructionsTemplate.fromClient) {
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, ViewChild } from '@angular/core';
import { Component, ViewChild, inject } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import {
@@ -46,6 +46,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class ListTransactionsComponent {
private route = inject(ActivatedRoute);
/** List Transactions Data */
listTransactionData: any;
/** Data source for instructions table. */
@@ -65,7 +67,7 @@ export class ListTransactionsComponent {
* Retrieves Recurring Deposits Account Data from `resolve`.
* @param {ActivatedRoute} route Activated Route.
*/
constructor(private route: ActivatedRoute) {
constructor() {
this.route.data.subscribe((data: { listTransactionData: any }) => {
this.listTransactionData = data.listTransactionData;
this.dataSource = new MatTableDataSource(this.listTransactionData.transactions.pageItems);
@@ -12,10 +12,12 @@
/>
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transferDatePicker></mat-datepicker>
<mat-error *ngIf="makeAccountTransferForm.controls.transferDate.hasError('required')">
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (makeAccountTransferForm.controls.transferDate.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-98">
@@ -41,23 +43,29 @@
<mat-form-field class="flex-98 error-warn">
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
<input #amntInput type="number" matInput required formControlName="transferAmount" />
<mat-error *ngIf="makeAccountTransferForm.controls.transferAmount.hasError('required')">
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
<mat-error *ngIf="makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')">
<fa-icon icon="exclamation-triangle" size="md"></fa-icon>
{{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
</mat-error>
@if (makeAccountTransferForm.controls.transferAmount.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')) {
<mat-error>
<fa-icon icon="exclamation-triangle" size="md"></fa-icon>
{{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-98">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea matInput formControlName="transferDescription" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
<mat-error *ngIf="makeAccountTransferForm.controls.transferDescription.hasError('required')">
{{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (makeAccountTransferForm.controls.transferDescription.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
</div>
</form>
@@ -1,343 +1,364 @@
<div class="container">
<div *ngIf="isLoading" class="loader-wrapper">
<div class="bottom triangle"></div>
<div class="top triangle"></div>
<div class="left triangle"></div>
<div class="right triangle"></div>
</div>
@if (isLoading) {
<div class="loader-wrapper">
<div class="bottom triangle"></div>
<div class="top triangle"></div>
<div class="left triangle"></div>
<div class="right triangle"></div>
</div>
}
<mat-card *ngIf="!isLoading" class="transfer-card">
<mat-card-content>
<!-- Source Account Details Section -->
<div class="section-container">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transferring From Details' | translate }}</h3>
<mat-divider></mat-divider>
<div class="info-grid">
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.Applicant' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.fromClient.displayName }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.Office' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.fromOffice.name }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.From Account' | translate }}</div>
<div class="info-value">
{{ accountTransferTemplateData.fromAccount.productName }}&nbsp;-&nbsp;#{{
accountTransferTemplateData.fromAccount.accountNo
}}
@if (!isLoading) {
<mat-card class="transfer-card">
<mat-card-content>
<!-- Source Account Details Section -->
<div class="section-container">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transferring From Details' | translate }}</h3>
<mat-divider></mat-divider>
<div class="info-grid">
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.Applicant' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.fromClient.displayName }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.Office' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.fromOffice.name }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.From Account' | translate }}</div>
<div class="info-value">
{{ accountTransferTemplateData.fromAccount.productName }}&nbsp;-&nbsp;#{{
accountTransferTemplateData.fromAccount.accountNo
}}
</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.From Account Type' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.fromAccountType.value }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.Currency' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.currency.name }}</div>
</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.From Account Type' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.fromAccountType.value }}</div>
</div>
<div class="info-row">
<div class="info-label">{{ 'labels.inputs.Currency' | translate }}</div>
<div class="info-value">{{ accountTransferTemplateData.currency.name }}</div>
</div>
</div>
</div>
<!-- Interbank Section -->
<div *ngIf="interbank" class="section-container">
<div class="interbank-section">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transferred To' | translate }}</h3>
<mat-form-field class="full-width">
<mat-label>{{ 'labels.inputs.Phone Number' | translate }}</mat-label>
<input
matInput
[readonly]="interbankTransferForm"
type="tel"
#input
[(ngModel)]="phoneAccount"
maxlength="10"
required
placeholder="Enter phone number"
title="Phone number"
/>
<mat-hint align="end">{{ phoneAccount.length || 0 }}/10</mat-hint>
</mat-form-field>
</div>
<!--interbank -->
<mat-card-actions *ngIf="!interbankTransferForm" class="action-buttons">
<!-- Interbank Section -->
@if (interbank) {
<div class="section-container">
<div class="interbank-section">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transferred To' | translate }}</h3>
<mat-form-field class="full-width">
<mat-label>{{ 'labels.inputs.Phone Number' | translate }}</mat-label>
<input
matInput
[readonly]="interbankTransferForm"
type="tel"
#input
[(ngModel)]="phoneAccount"
maxlength="10"
required
placeholder="Enter phone number"
title="Phone number"
/>
<mat-hint align="end">{{ phoneAccount.length || 0 }}/10</mat-hint>
</mat-form-field>
</div>
<!--interbank -->
@if (!interbankTransferForm) {
<mat-card-actions class="action-buttons">
<ng-container *mifosxHasPermission="'CREATE_ACCOUNTTRANSFER'">
<button
mat-raised-button
color="primary"
[disabled]="phoneAccount.length !== 10"
(click)="searchAccountByNumber()"
id="search-button"
class="primary-button"
>
{{ 'labels.buttons.Search' | translate }}
</button>
</ng-container>
</mat-card-actions>
}
</div>
}
@if (!interbank) {
<mat-divider></mat-divider>
}
<!-- Transfer Form Section (Normal) -->
@if (!interbank && makeAccountTransferForm) {
<form [formGroup]="makeAccountTransferForm" class="transfer-form">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transfer Details' | translate }}</h3>
<div class="form-grid">
<mat-form-field class="form-field" (click)="transferDatePicker.open()">
<mat-label>{{ 'labels.inputs.Transaction Date' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="transferDatePicker"
required
formControlName="transferDate"
placeholder="Select date"
title="Transaction Date"
/>
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transferDatePicker></mat-datepicker>
@if (makeAccountTransferForm.controls.transferDate.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<mat-select required formControlName="toOfficeId" (selectionChange)="changeEvent()">
@for (toOfficeType of toOfficeTypeData; track toOfficeType) {
<mat-option [value]="toOfficeType.id">
{{ toOfficeType.name }}
</mat-option>
}
</mat-select>
@if (makeAccountTransferForm.controls.toOfficeId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Client' | translate }}</mat-label>
<input
matInput
formControlName="toClientId"
[matAutocomplete]="clientsAutocomplete"
placeholder="Select or type client name"
title="Client name"
/>
@if (makeAccountTransferForm.controls.toClientId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Client' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-autocomplete
autoActiveFirstOption
#clientsAutocomplete="matAutocomplete"
[displayWith]="displayClient"
>
@for (client of clientsData; track client) {
<mat-option [value]="client"> {{ client.id }} - {{ client.displayName }} </mat-option>
}
</mat-autocomplete>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account Type' | translate }}</mat-label>
<mat-select required formControlName="toAccountType" (selectionChange)="changeEvent()">
@for (toAccountType of toAccountTypeData; track toAccountType) {
<mat-option [value]="toAccountType.id">
{{ toAccountType.value }}
</mat-option>
}
</mat-select>
@if (makeAccountTransferForm.controls.toAccountType.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account' | translate }}</mat-label>
<mat-select required formControlName="toAccountId" (selectionChange)="changeEvent()">
@for (toAccount of toAccountData; track toAccount) {
<mat-option [value]="toAccount.id">
{{ toAccount.productName }} - {{ toAccount.accountNo }}
</mat-option>
}
</mat-select>
@if (makeAccountTransferForm.controls.toAccountId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
<input
type="number"
matInput
required
formControlName="transferAmount"
placeholder="Enter amount"
title="Transfer amount"
min="0.01"
step="0.01"
/>
@if (makeAccountTransferForm.controls.transferAmount.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')) {
<mat-error>
<fa-icon icon="exclamation-triangle" size="md"></fa-icon>
{{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field description-field">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea
matInput
formControlName="transferDescription"
cdkTextareaAutosize
cdkAutosizeMinRows="2"
placeholder="Enter transfer description"
title="Transfer description"
></textarea>
@if (makeAccountTransferForm.controls.transferDescription.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
</div>
</form>
}
<!-- Interbank Transfer Form Section -->
@if (interbank && interbankTransferForm && makeAccountTransferForm) {
<form [formGroup]="makeAccountTransferForm" class="transfer-form">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transfer Details' | translate }}</h3>
<div class="form-grid">
<mat-form-field class="form-field" (click)="transferDatePicker.open()">
<mat-label>{{ 'labels.inputs.Transaction Date' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="transferDatePicker"
required
formControlName="transferDate"
placeholder="Select date"
title="Transaction Date"
/>
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transferDatePicker></mat-datepicker>
@if (makeAccountTransferForm.controls.transferDate.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Bank' | translate }}</mat-label>
<input matInput formControlName="toBank" [readonly]="true" placeholder="Bank" title="Bank" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Client' | translate }}</mat-label>
<input matInput formControlName="toClientId" [readonly]="true" placeholder="Client" title="Client" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account Type' | translate }}</mat-label>
<input
matInput
formControlName="toAccountType"
[readonly]="true"
placeholder="Account Type"
title="Account Type"
/>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account' | translate }}</mat-label>
<input matInput formControlName="toAccountId" [readonly]="true" placeholder="Account" title="Account" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
<input
type="number"
matInput
required
formControlName="transferAmount"
placeholder="Enter amount"
title="Transfer amount"
min="0.01"
step="0.01"
/>
@if (makeAccountTransferForm.controls.transferAmount.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
@if (makeAccountTransferForm.controls.transferAmount.hasError('min')) {
<mat-error>
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.mustBeAtLeast' | translate }} 0.01
</mat-error>
}
@if (makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')) {
<mat-error>
<fa-icon icon="exclamation-triangle" size="md"></fa-icon>
{{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
</mat-error>
}
</mat-form-field>
<mat-form-field class="form-field description-field">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea
matInput
formControlName="transferDescription"
cdkTextareaAutosize
cdkAutosizeMinRows="2"
placeholder="Enter transfer description"
title="Transfer description"
></textarea>
@if (makeAccountTransferForm.controls.transferDescription.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
</div>
</form>
}
</mat-card-content>
@if (!isLoading && makeAccountTransferForm) {
<mat-card-actions class="action-buttons">
<button type="button" mat-raised-button [routerLink]="['../..']" class="cancel-button">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<ng-container *mifosxHasPermission="'CREATE_ACCOUNTTRANSFER'">
<button
mat-raised-button
color="primary"
[disabled]="phoneAccount.length !== 10"
(click)="searchAccountByNumber()"
id="search-button"
class="primary-button"
>
{{ 'labels.buttons.Search' | translate }}
</button>
@if (interbank && interbankTransferForm) {
<button
mat-raised-button
color="primary"
[disabled]="!makeAccountTransferForm.valid"
(click)="submit()"
class="primary-button"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
}
@if (!interbank) {
<button
mat-raised-button
color="primary"
[disabled]="!makeAccountTransferForm.valid"
(click)="submit()"
class="primary-button"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
}
</ng-container>
</mat-card-actions>
</div>
<mat-divider *ngIf="!interbank"></mat-divider>
<!-- Transfer Form Section (Normal) -->
<form *ngIf="!interbank && makeAccountTransferForm" [formGroup]="makeAccountTransferForm" class="transfer-form">
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transfer Details' | translate }}</h3>
<div class="form-grid">
<mat-form-field class="form-field" (click)="transferDatePicker.open()">
<mat-label>{{ 'labels.inputs.Transaction Date' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="transferDatePicker"
required
formControlName="transferDate"
placeholder="Select date"
title="Transaction Date"
/>
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transferDatePicker></mat-datepicker>
<mat-error *ngIf="makeAccountTransferForm.controls.transferDate.hasError('required')">
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<mat-select required formControlName="toOfficeId" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toOfficeType of toOfficeTypeData" [value]="toOfficeType.id">
{{ toOfficeType.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="makeAccountTransferForm.controls.toOfficeId.hasError('required')">
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Client' | translate }}</mat-label>
<input
matInput
formControlName="toClientId"
[matAutocomplete]="clientsAutocomplete"
placeholder="Select or type client name"
title="Client name"
/>
<mat-error *ngIf="makeAccountTransferForm.controls.toClientId.hasError('required')">
{{ 'labels.inputs.Client' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-autocomplete autoActiveFirstOption #clientsAutocomplete="matAutocomplete" [displayWith]="displayClient">
<mat-option *ngFor="let client of clientsData" [value]="client">
{{ client.id }} - {{ client.displayName }}
</mat-option>
</mat-autocomplete>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account Type' | translate }}</mat-label>
<mat-select required formControlName="toAccountType" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toAccountType of toAccountTypeData" [value]="toAccountType.id">
{{ toAccountType.value }}
</mat-option>
</mat-select>
<mat-error *ngIf="makeAccountTransferForm.controls.toAccountType.hasError('required')">
{{ 'labels.inputs.Account Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account' | translate }}</mat-label>
<mat-select required formControlName="toAccountId" (selectionChange)="changeEvent()">
<mat-option *ngFor="let toAccount of toAccountData" [value]="toAccount.id">
{{ toAccount.productName }} - {{ toAccount.accountNo }}
</mat-option>
</mat-select>
<mat-error *ngIf="makeAccountTransferForm.controls.toAccountId.hasError('required')">
{{ 'labels.inputs.Account' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
<input
type="number"
matInput
required
formControlName="transferAmount"
placeholder="Enter amount"
title="Transfer amount"
min="0.01"
step="0.01"
/>
<mat-error *ngIf="makeAccountTransferForm.controls.transferAmount.hasError('required')">
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
<mat-error *ngIf="makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')">
<fa-icon icon="exclamation-triangle" size="md"></fa-icon>
{{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
</mat-error>
</mat-form-field>
<mat-form-field class="form-field description-field">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea
matInput
formControlName="transferDescription"
cdkTextareaAutosize
cdkAutosizeMinRows="2"
placeholder="Enter transfer description"
title="Transfer description"
></textarea>
<mat-error *ngIf="makeAccountTransferForm.controls.transferDescription.hasError('required')">
{{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
</form>
<!-- Interbank Transfer Form Section -->
<form
*ngIf="interbank && interbankTransferForm && makeAccountTransferForm"
[formGroup]="makeAccountTransferForm"
class="transfer-form"
>
<h3 class="section-title transfer-heading">{{ 'labels.heading.Transfer Details' | translate }}</h3>
<div class="form-grid">
<mat-form-field class="form-field" (click)="transferDatePicker.open()">
<mat-label>{{ 'labels.inputs.Transaction Date' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="transferDatePicker"
required
formControlName="transferDate"
placeholder="Select date"
title="Transaction Date"
/>
<mat-datepicker-toggle matSuffix [for]="transferDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transferDatePicker></mat-datepicker>
<mat-error *ngIf="makeAccountTransferForm.controls.transferDate.hasError('required')">
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Bank' | translate }}</mat-label>
<input matInput formControlName="toBank" [readonly]="true" placeholder="Bank" title="Bank" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Client' | translate }}</mat-label>
<input matInput formControlName="toClientId" [readonly]="true" placeholder="Client" title="Client" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account Type' | translate }}</mat-label>
<input
matInput
formControlName="toAccountType"
[readonly]="true"
placeholder="Account Type"
title="Account Type"
/>
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Account' | translate }}</mat-label>
<input matInput formControlName="toAccountId" [readonly]="true" placeholder="Account" title="Account" />
</mat-form-field>
<mat-form-field class="form-field">
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
<input
type="number"
matInput
required
formControlName="transferAmount"
placeholder="Enter amount"
title="Transfer amount"
min="0.01"
step="0.01"
/>
<mat-error *ngIf="makeAccountTransferForm.controls.transferAmount.hasError('required')">
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
<mat-error *ngIf="makeAccountTransferForm.controls.transferAmount.hasError('min')">
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.mustBeAtLeast' | translate }} 0.01
</mat-error>
<mat-error *ngIf="makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance')">
<fa-icon icon="exclamation-triangle" size="md"></fa-icon>
{{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
</mat-error>
</mat-form-field>
<mat-form-field class="form-field description-field">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea
matInput
formControlName="transferDescription"
cdkTextareaAutosize
cdkAutosizeMinRows="2"
placeholder="Enter transfer description"
title="Transfer description"
></textarea>
<mat-error *ngIf="makeAccountTransferForm.controls.transferDescription.hasError('required')">
{{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
</form>
</mat-card-content>
<mat-card-actions *ngIf="!isLoading && makeAccountTransferForm" class="action-buttons">
<button type="button" mat-raised-button [routerLink]="['../..']" class="cancel-button">
{{ 'labels.buttons.Cancel' | translate }}
</button>
<ng-container *mifosxHasPermission="'CREATE_ACCOUNTTRANSFER'">
<button
*ngIf="interbank && interbankTransferForm"
mat-raised-button
color="primary"
[disabled]="!makeAccountTransferForm.valid"
(click)="submit()"
class="primary-button"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
<button
*ngIf="!interbank"
mat-raised-button
color="primary"
[disabled]="!makeAccountTransferForm.valid"
(click)="submit()"
class="primary-button"
>
{{ 'labels.buttons.Submit' | translate }}
</button>
</ng-container>
</mat-card-actions>
</mat-card>
}
</mat-card>
}
</div>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { Component, OnInit, AfterViewInit, inject } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import {
AbstractControl,
@@ -44,6 +44,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
private formBuilder = inject(UntypedFormBuilder);
private route = inject(ActivatedRoute);
private router = inject(Router);
private accountTransfersService = inject(AccountTransfersService);
private dateUtils = inject(Dates);
private settingsService = inject(SettingsService);
private clientsService = inject(ClientsService);
/** Standing Instructions Data */
accountTransferTemplateData: any;
/** Minimum date allowed. */
@@ -87,15 +95,7 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
* @param {SettingsService} settingsService Settings Service
* @param {ClientsService} clientsService Clients Service
*/
constructor(
private formBuilder: UntypedFormBuilder,
private route: ActivatedRoute,
private router: Router,
private accountTransfersService: AccountTransfersService,
private dateUtils: Dates,
private settingsService: SettingsService,
private clientsService: ClientsService
) {
constructor() {
this.route.data.subscribe((data: { accountTransferTemplate: any }) => {
this.accountTransferTemplateData = data.accountTransferTemplate;
this.setParams();
@@ -117,7 +117,7 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
this.accountTypeId = '2';
this.id = this.route.snapshot.queryParams['savingsId'];
this.interbank = this.route.snapshot.queryParams['interbank'] === 'true';
const navigationBalance = this.router.getCurrentNavigation()?.extras?.state?.balance;
const navigationBalance = this.router.currentNavigation()?.extras?.state?.balance;
const templateBalance =
this.accountTransferTemplateData?.fromAccount?.availableBalance ??
this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance ??
@@ -168,7 +168,8 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
[
Validators.required,
Validators.min(0.01),
this.amountExceedsBalanceValidator.bind(this)]
this.amountExceedsBalanceValidator.bind(this)
]
],
transferDate: [
this.settingsService.businessDate,
@@ -207,7 +208,8 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
[
Validators.required,
Validators.min(0.01),
this.amountExceedsBalanceValidator.bind(this)]
this.amountExceedsBalanceValidator.bind(this)
]
],
transferDate: [
this.settingsService.businessDate,
@@ -252,7 +254,8 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
[
Validators.required,
Validators.min(0.01),
this.amountExceedsBalanceValidator.bind(this)]
this.amountExceedsBalanceValidator.bind(this)
]
],
transferDate: [
this.settingsService.businessDate,
@@ -1,10 +1,12 @@
<div class="container">
<div class="container m-b-20 align-end gap-2px">
<span *ngIf="!viewAccountTransferData.reversed">
<button mat-raised-button color="warn" *mifosxHasPermission="'ADJUST_ACCOUNTTRANSFER'">
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Undo' | translate }}
</button>
</span>
@if (!viewAccountTransferData.reversed) {
<span>
<button mat-raised-button color="warn" *mifosxHasPermission="'ADJUST_ACCOUNTTRANSFER'">
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Undo' | translate }}
</button>
</span>
}
</div>
<mat-card>
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Location, NgIf, NgClass } from '@angular/common';
import { Component } from '@angular/core';
import { Component, inject } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatDivider } from '@angular/material/divider';
@@ -22,16 +22,16 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class ViewAccountTransferComponent {
private route = inject(ActivatedRoute);
private location = inject(Location);
viewAccountTransferData: any;
/**
* Retrieves the view account transfer data from `resolve`.
* @param {ActivatedRoute} route Activated Route.
* @param {Location} location Location.
*/
constructor(
private route: ActivatedRoute,
private location: Location
) {
constructor() {
this.route.data.subscribe((data: { viewAccountTransferData: any }) => {
this.viewAccountTransferData = data.viewAccountTransferData;
});
@@ -57,8 +57,12 @@
<div class="flex-fill">
<span class="flex-40">{{ 'labels.inputs.Destination' | translate }}:</span>
<span class="flex-60">
<span *ngIf="allowclientedit"> {{ 'labels.inputs.Within Bank' | translate }} </span>
<span *ngIf="!allowclientedit"> {{ 'labels.inputs.Own Account' | translate }} </span>
@if (allowclientedit) {
<span> {{ 'labels.inputs.Within Bank' | translate }} </span>
}
@if (!allowclientedit) {
<span> {{ 'labels.inputs.Own Account' | translate }} </span>
}
</span>
</div>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component } from '@angular/core';
import { Component, inject } from '@angular/core';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatDivider } from '@angular/material/divider';
@@ -18,6 +18,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class ViewStandingInstructionsComponent {
private route = inject(ActivatedRoute);
/** Standing Instructions Data */
standingInstructionsData: any;
/** Allow Client Edit */
@@ -27,7 +29,7 @@ export class ViewStandingInstructionsComponent {
* Retrieves the standing instructions data from `resolve`.
* @param {ActivatedRoute} route Activated Route.
*/
constructor(private route: ActivatedRoute) {
constructor() {
this.route.data.subscribe((data: { standingInstructionsData: any }) => {
this.standingInstructionsData = data.standingInstructionsData;
if (this.standingInstructionsData.fromClient.id === this.standingInstructionsData.toClient.id) {