build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
import { UntypedFormGroup, ValidatorFn, ValidationErrors } from '@angular/forms';
|
||||
|
||||
/** Validates that one of the fields for debit or credit is filled for a given accounting rule type. */
|
||||
export const oneOfTheFieldsIsRequiredValidator: ValidatorFn = (accountingRuleForm: UntypedFormGroup): ValidationErrors | null => {
|
||||
export const oneOfTheFieldsIsRequiredValidator: ValidatorFn = (
|
||||
accountingRuleForm: UntypedFormGroup
|
||||
): ValidationErrors | null => {
|
||||
const accountToDebit = accountingRuleForm.controls.accountToDebit.value;
|
||||
const debitTags = accountingRuleForm.controls.debitTags.value;
|
||||
const accountToCredit = accountingRuleForm.controls.accountToCredit.value;
|
||||
const creditTags = accountingRuleForm.controls.creditTags.value;
|
||||
return ((accountToDebit || debitTags) && (accountToCredit || creditTags)) ? null : { 'error': true };
|
||||
return (accountToDebit || debitTags) && (accountToCredit || creditTags) ? null : { error: true };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user