Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 0ee4db2

Browse files
authored
Use local event to prevent slow down (#5444)
1 parent 2f17948 commit 0ee4db2

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/dispatch/static/dispatch/src/incident/EditEventDialog.vue

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<v-col cols="5">
1212
<date-time-picker-menu
1313
label="Reported At"
14-
v-model="started_at"
14+
v-model="local_started_at"
1515
class="time-picker"
1616
:timezone="timezone"
1717
@update:model-value="update_started_at"
@@ -40,7 +40,7 @@
4040
<v-row>
4141
<v-col cols="12">
4242
<v-textarea
43-
v-model="description"
43+
v-model="local_description"
4444
class="mt-3"
4545
label="Description"
4646
hint="Description of the event."
@@ -54,10 +54,8 @@
5454
<v-card-actions>
5555
<v-spacer />
5656
<v-btn variant="text" @click="closeEditEventDialog()"> Cancel </v-btn>
57-
<v-btn v-if="uuid" color="green en-1" variant="text" @click="updateExistingEvent()">
58-
OK
59-
</v-btn>
60-
<v-btn v-else color="green en-1" variant="text" @click="storeNewEvent()"> OK </v-btn>
57+
<v-btn v-if="uuid" color="green en-1" variant="text" @click="updateEvent()"> OK </v-btn>
58+
<v-btn v-else color="green en-1" variant="text" @click="newEvent()"> OK </v-btn>
6159
</v-card-actions>
6260
</v-card>
6361
</v-dialog>
@@ -79,6 +77,8 @@ export default {
7977
timezones: ["UTC", "America/Los_Angeles"],
8078
timezone: "UTC",
8179
started_at_in_utc: "",
80+
local_started_at: null,
81+
local_description: "",
8282
}
8383
},
8484
@@ -112,13 +112,24 @@ export default {
112112
this.eventStart = new Date()
113113
},
114114
update_started_at(val) {
115-
this.started_at = val
115+
this.local_started_at = val
116116
this.started_at_in_utc = val
117117
},
118+
updateEvent() {
119+
this.description = this.local_description
120+
this.started_at = this.local_started_at
121+
this.updateExistingEvent()
122+
},
123+
newEvent() {
124+
this.description = this.local_description
125+
this.started_at = this.local_started_at
126+
this.storeNewEvent()
127+
},
118128
},
119129
mounted() {
120130
this.init()
121-
this.started_at_in_utc = this.started_at
131+
this.local_description = this.description
132+
this.local_started_at = this.started_at
122133
},
123134
}
124135
</script>

0 commit comments

Comments
 (0)