feat: standing instructions UI - view redesign, edit pre-fill fix, current account tab improvements

- Redesign view-standing-instructions with sectioned layout (General Info, From Account,
  To Account, Transfer Settings, Recurrence) using info-grid/info-row CSS pattern with
  color-coded status badge
- Fix edit-standing-instructions: remove buggy recurrenceOnMonthDay.push() crash that
  caused all form fields to be empty; add parseISODate() and parseMonthDay() helpers
  handling both ISO string and array formats; add null safety with ?. guards on all fields
- Fix edit form patchValue: fromAccount and toAccount show as 'productName - accountNo'
- Improve current account standing-instructions-tab HTML with ?. null guards
- Add missing i18n keys: General Information, From Account, To Account, Transfer Settings,
  Recurrence Settings, Valid From, Valid Till

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jaanu423
2026-05-26 10:53:52 +05:30
co-authored by Claude Sonnet 4.6
parent 1779591b7a
commit ae414c620e
10 changed files with 379 additions and 168 deletions
@@ -16,32 +16,43 @@
<ng-container matColumnDef="client">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Client' | translate }}</th>
<td mat-cell *matCellDef="let instruction">
{{ instruction.fromClient.displayName }}-{{ instruction.fromClient.id }}
{{ instruction.fromClient?.displayName }}-{{ instruction.fromClient?.id }}
</td>
</ng-container>
<ng-container matColumnDef="fromAccount">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.From Account' | translate }}</th>
<td mat-cell *matCellDef="let instruction">
{{ instruction.fromAccount.accountNo }} ({{ instruction.fromAccountType.value }})
{{ instruction.fromAccount?.accountNo }}
@if (instruction.fromAccountType?.value) {
({{ instruction.fromAccountType.value }})
}
</td>
</ng-container>
<ng-container matColumnDef="beneficiary">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Beneficiary' | translate }}</th>
<td mat-cell *matCellDef="let instruction">{{ instruction.toClient.displayName }}</td>
<td mat-cell *matCellDef="let instruction">{{ instruction.toClient?.displayName }}</td>
</ng-container>
<ng-container matColumnDef="toAccount">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.To Account' | translate }}</th>
<td mat-cell *matCellDef="let instruction">
{{ instruction.toAccount.accountNo }} ({{ instruction.toAccountType.value }})
{{ instruction.toAccount?.accountNo }}
@if (instruction.toAccountType?.value) {
({{ instruction.toAccountType.value }})
}
</td>
</ng-container>
<ng-container matColumnDef="amount">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
<td mat-cell *matCellDef="let instruction">{{ instruction.instructionType.value }}/{{ instruction.amount }}</td>
<td mat-cell *matCellDef="let instruction">
@if (instruction.instructionType?.value) {
{{ instruction.instructionType.value }}/
}
{{ instruction.amount }}
</td>
</ng-container>
<ng-container matColumnDef="validity">
@@ -55,7 +66,7 @@
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let instruction">
@if (instruction.status.value !== 'Deleted') {
@if (instruction.status?.value !== 'Deleted') {
<span>
<button
class="account-action-button"
@@ -68,7 +79,7 @@
</button>
</span>
}
@if (instruction.status.value !== 'Deleted') {
@if (instruction.status?.value !== 'Deleted') {
<span>
<button
class="account-action-button"
@@ -101,7 +101,7 @@ export class CurrentAccountsService {
.set('clientId', clientId)
.set('clientName', clientName)
.set('fromAccountId', fromAccountId)
.set('fromAccountType', '2')
.set('fromAccountType', '3')
.set('locale', locale)
.set('dateFormat', dateFormat);
return this.http.get(`/standinginstructions`, { params: httpParams });