WEB-746: Fix GSIM deposit and withdrawal routing duplication causing 404 (#3204)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user