Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor: #385 Renaming variable name
  • Loading branch information
Juan Gabriel Guzman committed Jun 23, 2020
commit d6ce9828430b0c86f82e422a9c99c2773f4c7b6a
4 changes: 2 additions & 2 deletions src/app/modules/time-entries/pages/time-entries.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export class TimeEntriesComponent implements OnInit {
if (this.activeTimeEntry !== null && this.activeTimeEntry !== undefined) {
const entryDateAsIso = new Date(event.entry.start_date).toISOString();
const entryDateAsLocalDate = new Date(entryDateAsIso);
const activeEntryAsLocaldate = new Date(this.activeTimeEntry.start_date);
const activeEntryAsLocalDate = new Date(this.activeTimeEntry.start_date);
const isEditingActiveEntry = this.entryId === this.activeTimeEntry.id;
if (!isEditingActiveEntry && entryDateAsLocalDate > activeEntryAsLocaldate) {
if (!isEditingActiveEntry && entryDateAsLocalDate > activeEntryAsLocalDate) {
this.toastrService.error('You are on the clock and this entry overlaps it, try with earlier times.');
} else {
this.doSave(event);
Expand Down