Merge pull request #5866 from nextcloud/fix/editor/more-details-sidebar

fix(editor): switching to sidebar after creating a new event
This commit is contained in:
Richard Steinmetz 2024-03-21 10:23:45 +01:00 committed by GitHub
commit 74523ae8f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -384,12 +384,19 @@ export default {
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
* @return {Promise<void>}
*/
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
try {
await this.save(thisAndAllFuture)