cic-staff-client/src/app/pages/transactions/transaction-details/transaction-details.compone...

25 lines
626 B
TypeScript
Raw Normal View History

import {Component, Input, OnInit} from '@angular/core';
import {Router} from '@angular/router';
@Component({
selector: 'app-transaction-details',
templateUrl: './transaction-details.component.html',
styleUrls: ['./transaction-details.component.scss']
})
export class TransactionDetailsComponent implements OnInit {
@Input() transaction;
constructor(private router: Router) { }
ngOnInit(): void {
}
viewSender(): void {
this.router.navigateByUrl(`/accounts/${this.transaction.from}`).then();
}
viewRecipient(): void {
this.router.navigateByUrl(`/accounts/${this.transaction.to}`).then();
}
}