39 lines
1012 B
TypeScript
39 lines
1012 B
TypeScript
/** Angular Imports */
|
|
import { Component } from '@angular/core';
|
|
import { ActivatedRoute } from '@angular/router';
|
|
import { MatDialog } from '@angular/material/dialog';
|
|
|
|
/**
|
|
* View Transaction Component.
|
|
*/
|
|
@Component({
|
|
selector: 'mifosx-view-transaction',
|
|
templateUrl: './view-transaction.component.html',
|
|
styleUrls: ['./view-transaction.component.scss']
|
|
})
|
|
export class ViewTransactionComponent {
|
|
|
|
/** Transaction data. */
|
|
transactionData: any;
|
|
|
|
/**
|
|
* Retrieves the Transaction data from `resolve`.
|
|
* @param {ActivatedRoute} route Activated Route.
|
|
* @param {MatDialog} dialog Dialog reference.
|
|
*/
|
|
constructor(private route: ActivatedRoute,
|
|
public dialog: MatDialog) {
|
|
this.route.data.subscribe((data: { fixedDepositsAccountTransaction: any }) => {
|
|
this.transactionData = data.fixedDepositsAccountTransaction;
|
|
});
|
|
}
|
|
|
|
transactionColor(): string {
|
|
if (this.transactionData.manuallyReversed) {
|
|
return 'undo';
|
|
}
|
|
return 'active';
|
|
}
|
|
|
|
}
|