From b420d6580b69bca86ad134236c6eac258fbf9e62 Mon Sep 17 00:00:00 2001 From: Rene Enriquez Date: Tue, 9 Jun 2020 10:41:53 -0500 Subject: [PATCH] fix: #360 trim times and avoid reloading that is not needed --- .../components/details-fields/details-fields.component.ts | 4 ++-- src/app/modules/time-entries/pages/time-entries.component.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/modules/shared/components/details-fields/details-fields.component.ts b/src/app/modules/shared/components/details-fields/details-fields.component.ts index 6537c3182..ddad46a6e 100644 --- a/src/app/modules/shared/components/details-fields/details-fields.component.ts +++ b/src/app/modules/shared/components/details-fields/details-fields.component.ts @@ -152,8 +152,8 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { activity_id: this.entryForm.value.activity_id, technologies: this.selectedTechnologies ? this.selectedTechnologies : [], description: this.entryForm.value.description, - start_date: `${entryDate}T${this.entryForm.value.start_hour}`, - end_date: `${entryDate}T${this.entryForm.value.end_hour}`, + start_date: `${entryDate}T${this.entryForm.value.start_hour.trim()}`, + end_date: `${entryDate}T${this.entryForm.value.end_hour.trim()}`, uri: this.entryForm.value.uri, }; this.saveEntry.emit(entry); diff --git a/src/app/modules/time-entries/pages/time-entries.component.ts b/src/app/modules/time-entries/pages/time-entries.component.ts index f5f480b98..84012aa36 100644 --- a/src/app/modules/time-entries/pages/time-entries.component.ts +++ b/src/app/modules/time-entries/pages/time-entries.component.ts @@ -56,7 +56,6 @@ export class TimeEntriesComponent implements OnInit { } else { this.doSave(entry); } - this.store.dispatch(new entryActions.LoadEntries(new Date().getMonth() + 1)); } doSave(entry) {