diff --git a/src/app/savings/gsim-account/gsim-account.component.html b/src/app/savings/gsim-account/gsim-account.component.html
index c69bfce47..315ff3eb1 100644
--- a/src/app/savings/gsim-account/gsim-account.component.html
+++ b/src/app/savings/gsim-account/gsim-account.component.html
@@ -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']"
>
@@ -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']"
>
diff --git a/src/app/savings/gsim-account/gsim-account.component.ts b/src/app/savings/gsim-account/gsim-account.component.ts
index d16af4988..353b59e67 100644
--- a/src/app/savings/gsim-account/gsim-account.component.ts
+++ b/src/app/savings/gsim-account/gsim-account.component.ts
@@ -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;