diff --git a/src/components/Editor/InvitationResponseButtons.vue b/src/components/Editor/InvitationResponseButtons.vue index 0247030d38..7ea7d18267 100644 --- a/src/components/Editor/InvitationResponseButtons.vue +++ b/src/components/Editor/InvitationResponseButtons.vue @@ -156,7 +156,7 @@ export default { // TODO: What about recurring events? Add new buttons like "Accept this and all future"? // Currently, this will only accept a single occurrence. await this.calendarObjectInstanceStore.saveCalendarObjectInstance({ - thisAndAllFuture: false, + mode: 'all', calendarId: this.calendarId, }) } catch (error) { diff --git a/src/components/Editor/SaveButtons.vue b/src/components/Editor/SaveButtons.vue index c82075c32e..222ccc74d0 100644 --- a/src/components/Editor/SaveButtons.vue +++ b/src/components/Editor/SaveButtons.vue @@ -32,12 +32,19 @@ {{ $t('calendar', 'Update') }} + + {{ $t('calendar', 'Update all occurrences') }} + - {{ $t('calendar', 'Update this and all future') }} + {{ $t('calendar', 'Update this and all future occurrences') }} + + + {{ $t('calendar', 'Update all occurrences') }} + - {{ $t('calendar', 'Update this and all future') }} + {{ $t('calendar', 'Update this and all future occurrences') }} {{ $t('calendar', 'Export') }} - + {{ $t('calendar', 'Duplicate') }} - + {{ $t('calendar', 'Delete') }} - + {{ $t('calendar', 'Delete this occurrence') }} - - + - {{ $t('calendar', 'Delete this and all future') }} + {{ $t('calendar', 'Delete this and all future occurrences') }} + + + + {{ $t('calendar', 'Delete all occurrences') }} @@ -291,7 +297,7 @@ + @click="acceptAttachmentsModal()"> {{ t('calendar', 'Invite') }} @@ -423,7 +429,7 @@ export default { data() { return { - thisAndAllFuture: false, + saveMode: 'single', doNotShare: false, showModal: false, showModalNewAttachments: [], @@ -687,7 +693,7 @@ export default { this.showModal = false this.showModalNewAttachments = [] this.showModalUsers = [] - this.saveEvent(this.thisAndAllFuture) + this.saveEvent(this.saveMode) }, 500) // trigger save event after make each attachment access // 1) if !isPrivate get attachments NOT SHARED and SharedType is empry -> API ADD SHARE @@ -711,8 +717,8 @@ export default { return name.split('/').pop() }, - prepareAccessForAttachments(thisAndAllFuture = false) { - this.thisAndAllFuture = thisAndAllFuture + prepareAccessForAttachments(mode = false) { + this.saveMode = mode const newAttachments = this.calendarObjectInstance.attachments.filter((attachment) => { // get only new attachments // TODO get NOT only new attachments =) Maybe we should filter all attachments without share-type, 'cause event can be private and AFTER save owner could add new participant @@ -732,14 +738,14 @@ export default { return false }) } else { - this.saveEvent(thisAndAllFuture) + this.saveEvent(this.saveMode) } }, - saveEvent(thisAndAllFuture = false) { + saveEvent(mode = 'single') { // if there is new attachments and !private, then make modal with users and files/ // maybe check shared access before add file - this.saveAndLeave(thisAndAllFuture) + this.saveAndLeave(mode) this.calendarObjectInstance.attachments = this.calendarObjectInstance.attachments.map((attachment) => { if (attachment.isNew) { delete attachment.isNew diff --git a/src/views/EditSimple.vue b/src/views/EditSimple.vue index 651a845211..31ef8d28ec 100644 --- a/src/views/EditSimple.vue +++ b/src/views/EditSimple.vue @@ -84,24 +84,30 @@ {{ $t('calendar', 'Duplicate') }} - + {{ $t('calendar', 'Delete') }} - + {{ $t('calendar', 'Delete this occurrence') }} - + - {{ $t('calendar', 'Delete this and all future') }} + {{ $t('calendar', 'Delete this and future occurrences') }} + + + + {{ $t('calendar', 'Delete all occurrences') }} @@ -234,8 +240,9 @@ :showMoreButton="true" :moreButtonType="isViewing ? 'tertiary' : undefined" :disabled="isSaving" - @saveThisOnly="saveAndView(false)" - @saveThisAndAllFuture="saveAndView(true)" + @saveThisOnly="saveAndView('single')" + @saveThisAndAllFuture="saveAndView('future')" + @saveSeries="saveAndView('all')" @showMore="showMore"> } */ - async saveAndView(thisAndAllFuture) { + async saveAndView(mode) { // Transitioning from new to edit routes is not implemented for now if (this.isNew) { - await this.saveAndLeave(thisAndAllFuture) + await this.saveAndLeave(mode) return }