Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ describe('Reports Page', () => {

it('the sume of hours of entries selected is equal to {hours:0, minutes:0, seconds:0}', () => {
let checked = true;
let {hours, minutes, seconds}:TotalHours = component.sumHoursEntriesSelected(timeEntryList[0], checked);
let {hours, minutes, seconds}: TotalHours = component.sumHoursEntriesSelected(timeEntryList[0], checked);
checked = false;
({hours, minutes,seconds} = component.sumHoursEntriesSelected(timeEntryList[0], checked));
expect({hours, minutes, seconds}).toEqual({hours:0, minutes:0, seconds:0});
({hours, minutes, seconds} = component.sumHoursEntriesSelected(timeEntryList[0], checked));
expect({hours, minutes, seconds}).toEqual({hours: 0, minutes: 0, seconds: 0});
});

it('should export data with the correct format', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
},
],
columnDefs: [{ type: 'date', targets: 2}, {orderable: false, targets: [0]}],
order: [[1,'asc'],[2,'desc'],[4,'desc']]
order: [[1, 'asc'], [2, 'desc'], [4, 'desc']]
};
dtTrigger: Subject<any> = new Subject();
@ViewChild(DataTableDirective, { static: false })
Expand All @@ -79,7 +79,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
rerenderTableSubscription: Subscription;
resultSum: TotalHours;
resultSumEntriesSelected: TotalHours;
resultSumEntriesSelected$:Observable<TotalHours>;
resultSumEntriesSelected$: Observable<TotalHours>;
totalHoursSubscription: Subscription;
dateTimeOffset: ParseDateTimeOffset;

Expand All @@ -96,7 +96,9 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
this.actionsSubject$
.pipe(filter((action: any) => action.type === UserActionTypes.LOAD_USERS_SUCCESS))
.subscribe((action) => {
this.users = action.payload;
const sortUsers = [...action.payload];
sortUsers.sort((a, b) => a.name.localeCompare(b.name));
this.users = sortUsers;
});
}

Expand Down