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"
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."
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