From ba0b01798c07b914698572ebfa3e70fae5578b58 Mon Sep 17 00:00:00 2001 From: Michael Villarruel Date: Wed, 2 Feb 2022 13:02:28 -0500 Subject: [PATCH] fix: TT-529 sort by date not working correctly on reports --- .../time-entries-table/time-entries-table.component.ts | 3 ++- src/app/modules/time-clock/store/entry.effects.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts b/src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts index 5658a972e..9e6dcb415 100644 --- a/src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts +++ b/src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts @@ -50,7 +50,8 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn text: 'CSV', filename: `time-entries-${formatDate(new Date(), 'MM_dd_yyyy-HH_mm', 'en')}` }, - ] + ], + columnDefs: [{ type: 'date', targets: 2 }] }; dtTrigger: Subject = new Subject(); @ViewChild(DataTableDirective, { static: false }) diff --git a/src/app/modules/time-clock/store/entry.effects.ts b/src/app/modules/time-clock/store/entry.effects.ts index 98527cc58..40c1cb1c9 100644 --- a/src/app/modules/time-clock/store/entry.effects.ts +++ b/src/app/modules/time-clock/store/entry.effects.ts @@ -143,7 +143,7 @@ export class EntryEffects { if (error.status === 404) { return of(new actions.CreateEntry(entry)); } else { - this.toastrService.error('We could not clock in you, try again later.'); + this.toastrService.error('We could not clock you in, try again later.'); return of(new actions.CreateEntryFail('Error')); } })