WEB-746: Fix GSIM deposit and withdrawal routing duplication causing 404 (#3204)

This commit is contained in:
manasvi_gupta
2026-02-22 15:14:22 -06:00
committed by GitHub
parent 0a992913ad
commit f425affb9c
2 changed files with 9 additions and 2 deletions
@@ -86,7 +86,7 @@
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['/savings-accounts', element.id, 'actions', 'Deposit']"
[routerLink]="['/groups', groupId, 'savings-accounts', element.id, 'actions', 'Deposit']"
>
<i class="fa fa-arrow-up" matTooltip="{{ 'tooltips.Deposit' | translate }}"></i>
</button>
@@ -97,7 +97,7 @@
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['/savings-accounts', element.id, 'actions', 'Withdrawal']"
[routerLink]="['/groups', groupId, 'savings-accounts', element.id, 'actions', 'Withdrawal']"
>
<i class="fa fa-arrow-down" matTooltip="{{ 'tooltips.Withdraw' | translate }}"></i>
</button>
@@ -95,6 +95,8 @@ export class GsimAccountComponent implements OnInit {
groupsData: GroupData | null = null;
groupId: string;
/** Paginator for charge overview table. */
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
@@ -104,6 +106,11 @@ export class GsimAccountComponent implements OnInit {
* @param {MatDialog} dialog Dialog reference.
*/
constructor() {
// Get groupId from route params
this.route.parent?.parent?.params.subscribe((params) => {
this.groupId = params['groupId'];
});
this.route.data.subscribe((data: { gsimData: any; savingAccountData: any; groupsData: any }) => {
this.gsimOverviewData = data.gsimData[0].childGSIMAccounts;
this.savingAccountData = data.savingAccountData;