Migrate from the deprecated TSLint to Angluar ESLint. Also fix current linting issues in the code, in particular: - Use strict equals operators (=== and !==) - Remove empty lifecycle methods (mostly ngOnInit) - Output bindings including aliases should not be named as standard dom events (submit) - Async pipe results should not be negated
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { Component, Input } from '@angular/core';
|
|
import { Accounting } from 'app/core/utils/accounting';
|
|
import { OptionData } from 'app/shared/models/option-data.model';
|
|
|
|
@Component({
|
|
selector: 'mifosx-view-savings-accounting-details',
|
|
templateUrl: './view-savings-accounting-details.component.html',
|
|
styleUrls: ['./view-savings-accounting-details.component.scss']
|
|
})
|
|
export class ViewSavingsAccountingDetailsComponent {
|
|
|
|
@Input() accountingRule: OptionData;
|
|
@Input() accountingMappings: any[] = [];
|
|
|
|
constructor(private accounting: Accounting) { }
|
|
|
|
isCashOrAccrualAccounting(): boolean {
|
|
if (this.accountingRule) {
|
|
return this.accounting.isCashOrAccrualAccounting(this.accountingRule);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
isAccrualAccounting(): boolean {
|
|
if (this.accountingRule) {
|
|
return this.accounting.isAccrualAccounting(this.accountingRule);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
getAccountingRuleName(value: string): string {
|
|
return this.accounting.getAccountRuleName(value.toUpperCase());
|
|
}
|
|
|
|
}
|