Smart Filters & Dashboard Customization (#2282)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
3d501c9532
commit
84f85b4f24
92 changed files with 7149 additions and 555 deletions
|
@ -1,6 +1,6 @@
|
|||
import {inject, Pipe, PipeTransform} from '@angular/core';
|
||||
import { DayOfWeek } from 'src/app/_services/statistics.service';
|
||||
import {TranslocoService} from "@ngneat/transloco";
|
||||
import {translate, TranslocoService} from "@ngneat/transloco";
|
||||
|
||||
@Pipe({
|
||||
name: 'dayOfWeek',
|
||||
|
@ -8,24 +8,22 @@ import {TranslocoService} from "@ngneat/transloco";
|
|||
})
|
||||
export class DayOfWeekPipe implements PipeTransform {
|
||||
|
||||
translocoService = inject(TranslocoService);
|
||||
|
||||
transform(value: DayOfWeek): string {
|
||||
switch(value) {
|
||||
case DayOfWeek.Monday:
|
||||
return this.translocoService.translate('day-of-week-pipe.monday');
|
||||
return translate('day-of-week-pipe.monday');
|
||||
case DayOfWeek.Tuesday:
|
||||
return this.translocoService.translate('day-of-week-pipe.tuesday');
|
||||
return translate('day-of-week-pipe.tuesday');
|
||||
case DayOfWeek.Wednesday:
|
||||
return this.translocoService.translate('day-of-week-pipe.wednesday');
|
||||
return translate('day-of-week-pipe.wednesday');
|
||||
case DayOfWeek.Thursday:
|
||||
return this.translocoService.translate('day-of-week-pipe.thursday');
|
||||
return translate('day-of-week-pipe.thursday');
|
||||
case DayOfWeek.Friday:
|
||||
return this.translocoService.translate('day-of-week-pipe.friday');
|
||||
return translate('day-of-week-pipe.friday');
|
||||
case DayOfWeek.Saturday:
|
||||
return this.translocoService.translate('day-of-week-pipe.saturday');
|
||||
return translate('day-of-week-pipe.saturday');
|
||||
case DayOfWeek.Sunday:
|
||||
return this.translocoService.translate('day-of-week-pipe.sunday');
|
||||
return translate('day-of-week-pipe.sunday');
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue