Fix: Missing labels in the report views

This commit is contained in:
Jose Alberto Hernandez
2024-04-15 09:05:09 -06:00
committed by Jose Alberto Hernandez
parent e09fccf14b
commit cdc9d74122
26 changed files with 46 additions and 26 deletions
+5 -1
View File
@@ -1,15 +1,19 @@
import { Pipe, PipeTransform } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
@Pipe({
name: 'yesNo'
})
export class YesnoPipe implements PipeTransform {
constructor(private translateService: TranslateService) { }
transform(value: boolean, ...args: unknown[]): string {
if (value == null) {
return null;
}
return value ? 'Yes' : 'No';
const result = value ? 'Yes' : 'No';
return this.translateService.instant('labels.buttons.' + result);
}
}