Files
cbsnexora/src/app/loans/loans-view/datatable-tab/datatable-tab.component.ts
T
Ralph HopmanandAdam Saghy cac1d11ad7 build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
2025-01-15 11:59:30 +00:00

29 lines
936 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'mifosx-datatable-tab',
templateUrl: './datatable-tab.component.html',
styleUrls: ['./datatable-tab.component.scss']
})
export class DatatableTabComponent {
entityId: string;
/** Loan Datatable */
entityDatatable: any = null;
/** Multi Row Datatable Flag */
multiRowDatatableFlag: boolean;
/**
* Fetches data table data from `resolve`
* @param {ActivatedRoute} route Activated Route.
*/
constructor(private route: ActivatedRoute) {
this.entityId = this.route.parent.parent.snapshot.paramMap.get('loanId');
this.entityDatatable = null;
this.route.data.subscribe((data: { loanDatatable: any }) => {
this.entityDatatable = data.loanDatatable;
this.multiRowDatatableFlag = this.entityDatatable.columnHeaders[0].columnName === 'id' ? true : false;
});
}
}