Skip to content

Commit 2640ba2

Browse files
fix: TT-529 sort by date not working correctly on reports
1 parent 3aff2e5 commit 2640ba2

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.env

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
AUTHORITY=https://ioetec.b2clogin.com/ioetec.onmicrosoft.com/B2C_1_ioetec-implicit-grant-flow
2+
CLIENT_ID=367d0d98-7085-46c7-9d43-0c1b65e101c8
3+
SCOPES=https://ioetec.onmicrosoft.com/login
4+
STACK_EXCHANGE_ID=IrvYA3VnTtSujA*4GXNNZw((
5+
STACK_EXCHANGE_ACCESS_TOKEN=1aTdIEmS4Iau8nlIhKcIew))
6+
AZURE_APP_CONFIGURATION_CONNECTION_STRING=Endpoint=https://time-tracker-config.azconfig.io;Id=vaG9-l5-s0:+XSPivZr//ln4WYn17Oj;Secret=Czai5chycYKcdjDXNJBhe54jVu64NJJAUAAADcGzCes=
7+
8+
AUTHORITY_JSON=https://securityioet.b2clogin.com/securityioet.onmicrosoft.com/B2C_1_securityioetweb
9+
CLIENT_ID_JSON=b7e72a5b-c054-4bf8-99e7-f11bbf99a6b1
10+
SCOPES_JSON=https://securityioet.onmicrosoft.com/login

src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { formatDate } from '@angular/common';
2-
import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
2+
import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
33
import { select, Store } from '@ngrx/store';
44
import { DataTableDirective } from 'angular-datatables';
55
import * as moment from 'moment';
@@ -50,7 +50,8 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
5050
text: 'CSV',
5151
filename: `time-entries-${formatDate(new Date(), 'MM_dd_yyyy-HH_mm', 'en')}`
5252
},
53-
]
53+
],
54+
columnDefs: [{ type: 'date', targets: 2 }]
5455
};
5556
dtTrigger: Subject<any> = new Subject();
5657
@ViewChild(DataTableDirective, { static: false })
@@ -81,11 +82,11 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
8182
private rerenderDataTable(): void {
8283
if (this.dtElement && this.dtElement.dtInstance) {
8384
this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => {
84-
dtInstance.destroy();
85-
this.dtTrigger.next();
85+
dtInstance.destroy();
86+
this.dtTrigger.next();
8687
});
8788
} else {
88-
this.dtTrigger.next();
89+
this.dtTrigger.next();
8990
}
9091
}
9192

@@ -98,7 +99,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
9899
return regex.test(uri);
99100
}
100101

101-
bodyExportOptions(data, row, column, node){
102+
bodyExportOptions(data, row, column, node) {
102103
const dataFormated = data.toString().replace(/<((.|\n){0,200}?)>/gi, '');
103104
const durationColumnIndex = 3;
104105
return column === durationColumnIndex ? moment.duration(dataFormated).asHours().toFixed(2) : dataFormated;

src/app/modules/time-clock/store/entry.effects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class EntryEffects {
143143
if (error.status === 404) {
144144
return of(new actions.CreateEntry(entry));
145145
} else {
146-
this.toastrService.error('We could not clock in you, try again later.');
146+
this.toastrService.error('We could not clock you in, try again later.');
147147
return of(new actions.CreateEntryFail('Error'));
148148
}
149149
})

0 commit comments

Comments
 (0)