Smart Filters & Dashboard Customization (#2282)

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo 2023-09-12 11:24:47 -07:00 committed by GitHub
parent 3d501c9532
commit 84f85b4f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
92 changed files with 7149 additions and 555 deletions

View file

@ -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');
}
}