Skip to content

Commit 7e0fce1

Browse files
committed
fix: TT-653 Add conditions when an user is currently working on a task
1 parent 995c504 commit 7e0fce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/modules/shared/components/details-fields/details-fields.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
361361

362362
const isStartDateInTheFuture = moment(startDateToSubmit).isAfter(moment());
363363
const isEndDateInTheFuture = moment(endDateToSubmit).isAfter(moment());
364-
const timeEntryIsInTheFuture = isStartDateInTheFuture || isEndDateInTheFuture;
364+
const timeEntryIsInTheFuture = isStartDateInTheFuture || (isEndDateInTheFuture && !this.goingToWorkOnThis);
365365

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

0 commit comments

Comments
 (0)