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 @@ -190,7 +190,7 @@ describe('Reports Page', () => {

it('Should populate the users with the payload from the action executed', () => {
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
const usersArray = []
const usersArray = [];
const action = {
type: UserActionTypes.LOAD_USERS_SUCCESS,
payload: usersArray
Expand All @@ -201,7 +201,7 @@ describe('Reports Page', () => {

expect(component.users).toEqual(usersArray);
});

it('The sum of the data dates is equal to {"hours": 3, "minutes":20,"seconds":0}', () => {
let {hours,minutes,seconds}: TotalHours = component.sumDates(timeEntryList);
expect({hours, minutes, seconds}).toEqual({hours:3,minutes:20,seconds:0});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {

const isStartDateInTheFuture = moment(startDateToSubmit).isAfter(moment());
const isEndDateInTheFuture = moment(endDateToSubmit).isAfter(moment());
const timeEntryIsInTheFuture = isStartDateInTheFuture || isEndDateInTheFuture;
const timeEntryIsInTheFuture = isStartDateInTheFuture || (isEndDateInTheFuture && !this.goingToWorkOnThis);

if (timeEntryIsInTheFuture) {
this.toastrService.error('You cannot start a time-entry in the future');
Expand Down