feat: Nexora grouped action menu for Current Account, FD, and RD views

- Non-individual clients: hide Nomination Facility & Nominees in create flow,
  skip nominee validation on submit, hide Nominees tab in account view
- Current Account view: replace flat kebab menu with Nexora grouped menu
  (Transact / Restrict / Interest / Admin / Danger zone), scrollable body,
  pinned header, colour-coded icons; add kindOf/iconOf/hasKind helpers
- Fixed Deposit view: same grouped menu using shared cur-action-menu styles
- Recurring Deposit view: same grouped menu with permission directives
- main.scss: add cur-action-menu / cur-menu global styles with MDC flex fix
  for Material 20 (.mat-mdc-menu-item-text)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jaanu423
2026-05-25 13:11:02 +05:30
co-authored by Claude Sonnet 4.6
parent 38c4a7d9e9
commit 547cfd581e
11 changed files with 838 additions and 78 deletions
@@ -20,6 +20,7 @@ import { ToggleWithholdTaxDialogComponent } from './custom-dialogs/toggle-withho
/** Custom Buttons Configuration */
import { CurrentAccountButtonsConfiguration } from './current-accounts-buttons.config';
import { CurrentAccountsService } from '../current-accounts.service';
import { ClientsService } from 'app/clients/clients.service';
import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component';
import { Currency } from 'app/shared/models/general.model';
import { TranslateService } from '@ngx-translate/core';
@@ -40,7 +41,6 @@ import { LongTextComponent } from '../../shared/long-text/long-text.component';
import { AccountNumberComponent } from '../../shared/account-number/account-number.component';
import { MatIconButton } from '@angular/material/button';
import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu';
import { MatIcon } from '@angular/material/icon';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs';
import { StatusLookupPipe } from '../../pipes/status-lookup.pipe';
@@ -65,7 +65,6 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
AccountNumberComponent,
MatIconButton,
MatMenuTrigger,
MatIcon,
FaIconComponent,
MatMenu,
MatMenuItem,
@@ -82,6 +81,7 @@ export class CurrentAccountViewComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private currentAccountsService = inject(CurrentAccountsService);
private clientsService = inject(ClientsService);
private translateService = inject(TranslateService);
dialog = inject(MatDialog);
@@ -95,8 +95,87 @@ export class CurrentAccountViewComponent implements OnInit {
entityType: string;
isActive = false;
isNonIndividualClient = false;
currency: Currency;
private readonly ACTION_KIND: Record<string, 'transact' | 'block' | 'interest' | 'admin' | 'danger'> = {
Deposit: 'transact',
Withdrawal: 'transact',
'Hold Amount': 'transact',
'Transfer Funds': 'transact',
'Interbank Transfer': 'transact',
'Block Deposit': 'block',
'Unblock Deposit': 'block',
'Block Withdrawal': 'block',
'Unblock Withdrawal': 'block',
'Block Account': 'block',
'Unblock Account': 'block',
'Calculate Interest': 'interest',
'Post Interest': 'interest',
'Post Interest As On': 'interest',
'Enable Withhold Tax': 'interest',
'Disable Withhold Tax': 'interest',
'Add Charge': 'admin',
'Apply Annual Fees': 'admin',
'Modify Application': 'admin',
'Assign Staff': 'admin',
'Unassign Staff': 'admin',
Approve: 'admin',
Activate: 'admin',
'Undo Approval': 'admin',
Close: 'danger',
Reject: 'danger',
Delete: 'danger',
'Withdrawn by Client': 'danger'
};
private readonly ACTION_ICON: Record<string, string> = {
Deposit: 'arrow-down',
Withdrawal: 'arrow-up',
'Hold Amount': 'pause',
'Transfer Funds': 'exchange-alt',
'Interbank Transfer': 'random',
'Block Deposit': 'lock',
'Unblock Deposit': 'lock-open',
'Block Withdrawal': 'lock',
'Unblock Withdrawal': 'lock-open',
'Block Account': 'lock',
'Unblock Account': 'lock-open',
'Calculate Interest': 'calculator',
'Post Interest': 'percentage',
'Post Interest As On': 'calendar-day',
'Enable Withhold Tax': 'percentage',
'Disable Withhold Tax': 'percentage',
'Add Charge': 'plus-circle',
'Apply Annual Fees': 'receipt',
'Modify Application': 'edit',
'Assign Staff': 'user-plus',
'Unassign Staff': 'user-slash',
Approve: 'check-circle',
Activate: 'check',
'Undo Approval': 'undo',
Close: 'times-circle',
Reject: 'ban',
Delete: 'trash',
'Withdrawn by Client': 'user-slash'
};
kindOf(name: string): 'transact' | 'block' | 'interest' | 'admin' | 'danger' {
return this.ACTION_KIND[name] ?? 'admin';
}
iconOf(name: string, fallback?: string): string {
return this.ACTION_ICON[name] ?? fallback ?? 'circle';
}
hasKind(kind: 'transact' | 'block' | 'interest' | 'admin' | 'danger'): boolean {
const all = [
...(this.buttonConfig?.singleButtons ?? []),
...(this.buttonConfig?.options ?? [])
];
return all.some((item) => this.kindOf(item.name) === kind);
}
/**
* Fetches current account data from `resolve`
* @param {ActivatedRoute} route Activated Route
@@ -120,6 +199,11 @@ export class CurrentAccountViewComponent implements OnInit {
ngOnInit() {
this.setConditionalButtons();
if (this.currentAccountData.clientId) {
this.clientsService.getClientData(String(this.currentAccountData.clientId)).subscribe((client: any) => {
this.isNonIndividualClient = client?.legalForm?.id === 2;
});
}
}
/**