Fix: Display Savings account transactions reversed

This commit is contained in:
Jose Alberto Hernandez
2024-03-08 17:15:08 -06:00
committed by Jose Alberto Hernandez
parent 3d6b36bb8f
commit fcbbb03acb
9 changed files with 42 additions and 14 deletions
@@ -92,7 +92,7 @@ export class TransactionsTabComponent implements OnInit {
*/
showTransactions(transactionsData: any) {
if (transactionsData.transfer) {
this.router.navigate([`account-transfers/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route });
this.router.navigate([`../transfer-funds/account-transfers/${transactionsData.transfer.id}`], { relativeTo: this.route });
} else {
this.router.navigate([transactionsData.id], { relativeTo: this.route });
}
@@ -21,6 +21,8 @@
<mat-card-content>
<div fxLayout="row wrap" class="content">
<div fxFlex="100%" [ngClass]="transactionColor()">
</div>
<div fxFlex="50%" class="mat-body-strong">
{{"labels.inputs.Transaction Id" | translate }}
@@ -126,6 +128,9 @@
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" class="m-b-20">
<button type="button" color="primary" mat-raised-button (click)="goBack()">{{ "labels.buttons.Back" | translate}}</button>
</mat-card-actions>
</mat-card>
</div>
@@ -11,6 +11,7 @@ import { SettingsService } from 'app/settings/settings.service';
import { RecurringDepositConfirmationDialogComponent } from '../../custom-dialogs/recurring-deposit-confirmation-dialog/recurring-deposit-confirmation-dialog.component';
import { Dates } from 'app/core/utils/dates';
import { TranslateService } from '@ngx-translate/core';
import { Location } from '@angular/common';
/**
* View Transaction Component.
@@ -37,6 +38,7 @@ export class ViewTransactionComponent {
*/
constructor(private recurringDepositsService: RecurringDepositsService,
private route: ActivatedRoute,
private location: Location,
private dateUtils: Dates,
private router: Router,
public dialog: MatDialog,
@@ -70,4 +72,14 @@ export class ViewTransactionComponent {
});
}
transactionColor(): string {
if (this.transactionData.manuallyReversed) {
return 'undo';
}
return 'active';
}
goBack(): void {
this.location.back();
}
}
@@ -130,10 +130,6 @@ const routes: Routes = [
resolve: {
recurringDepositsAccountTransactionTemplate: RecurringDepositsAccountTransactionTemplateResolver
}
},
{
path: 'account-transfers',
loadChildren: () => import('../../account-transfers/account-transfers.module').then(m => m.AccountTransfersModule)
}
]
}
@@ -148,6 +144,10 @@ const routes: Routes = [
}
}
]
},
{
path: ':recurringDepositAccountId/transfer-funds',
loadChildren: () => import('../../account-transfers/account-transfers.module').then(m => m.AccountTransfersModule)
}
]
},