Fix: Missing labels in the report views
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
e09fccf14b
commit
cdc9d74122
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user