From d2f3276c2dc1b96becacb642531d76561540314c Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Mon, 6 Nov 2023 18:38:48 -0800 Subject: [PATCH] Fixing time not saving correctly in edit event dialog (#3946) --- .../dispatch/src/incident/EditEventDialog.vue | 9 ++++++++- .../static/dispatch/src/incident/TimelineTab.vue | 13 +++++++++---- src/dispatch/static/dispatch/src/incident/store.js | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/dispatch/static/dispatch/src/incident/EditEventDialog.vue b/src/dispatch/static/dispatch/src/incident/EditEventDialog.vue index e3d7c41355b4..8ed3d98b2908 100644 --- a/src/dispatch/static/dispatch/src/incident/EditEventDialog.vue +++ b/src/dispatch/static/dispatch/src/incident/EditEventDialog.vue @@ -14,12 +14,13 @@ v-model="started_at" class="time-picker" :timezone="timezone" + @update:modelValue="update_started_at" /> - Time in UTC is {{ formatToUTC(started_at) }} + Time in UTC is {{ formatToUTC(started_at_in_utc) }} @@ -77,6 +78,7 @@ export default { return { timezones: ["UTC", "America/Los_Angeles"], timezone: "UTC", + started_at_in_utc: "", } }, @@ -109,9 +111,14 @@ export default { setTimeToNow() { this.eventStart = new Date() }, + update_started_at(val) { + this.started_at = val + this.started_at_in_utc = val + } }, mounted() { this.init() + this.started_at_in_utc = this.started_at }, } diff --git a/src/dispatch/static/dispatch/src/incident/TimelineTab.vue b/src/dispatch/static/dispatch/src/incident/TimelineTab.vue index 68434af44250..e632518309a3 100644 --- a/src/dispatch/static/dispatch/src/incident/TimelineTab.vue +++ b/src/dispatch/static/dispatch/src/incident/TimelineTab.vue @@ -11,7 +11,7 @@ Export - +