mirror of https://github.com/nextcloud/calendar
fix(editor): switching to sidebar after creating a new event
Fix #5840 Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
d28d1a5ccd
commit
c3df245dcc
|
@ -384,12 +384,19 @@ export default {
|
||||||
this.$refs.popover.$children[0].$refs.popper.init()
|
this.$refs.popover.$children[0].$refs.popper.init()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Save changes and return to viewing mode or stay in editing mode if an error occurrs
|
* Save changes and leave when creating a new event or return to viewing mode when editing
|
||||||
|
* an existing event. Stay in editing mode if an error occurrs.
|
||||||
*
|
*
|
||||||
* @param {boolean} thisAndAllFuture Modify this and all future events
|
* @param {boolean} thisAndAllFuture Modify this and all future events
|
||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
async saveAndView(thisAndAllFuture) {
|
async saveAndView(thisAndAllFuture) {
|
||||||
|
// Transitioning from new to edit routes is not implemented for now
|
||||||
|
if (this.isNew) {
|
||||||
|
await this.saveAndLeave(thisAndAllFuture)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.isViewing = true
|
this.isViewing = true
|
||||||
try {
|
try {
|
||||||
await this.save(thisAndAllFuture)
|
await this.save(thisAndAllFuture)
|
||||||
|
|
Loading…
Reference in New Issue