Skip to content

Commit 562e828

Browse files
feat: Allow shared calendars as appointment conflict calendars
Signed-off-by: SebastianKrupinski <[email protected]>
1 parent b6b9919 commit 562e828

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/components/AppointmentConfigModal.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<label>{{ t('calendar', 'Calendar') }}</label>
3939
<CalendarPicker v-if="calendar !== undefined"
4040
:value="calendar"
41-
:calendars="ownSortedCalendars"
41+
:calendars="sortedCalendars"
4242
:show-calendar-on-select="false"
4343
@select-calendar="changeCalendar" />
4444
</div>
@@ -195,7 +195,7 @@ export default {
195195
...mapState(useSettingsStore, {
196196
isTalkEnabled: 'talkEnabled',
197197
}),
198-
...mapState(useCalendarsStore, ['ownSortedCalendars']),
198+
...mapState(useCalendarsStore, ['sortedCalendars']),
199199
...mapStores(useAppointmentConfigsStore, useCalendarsStore, useSettingsStore),
200200
formTitle() {
201201
if (this.isNew) {
@@ -213,26 +213,26 @@ export default {
213213
},
214214
calendar() {
215215
if (!this.editing.targetCalendarUri) {
216-
return this.ownSortedCalendars[0]
216+
return this.sortedCalendars[0]
217217
}
218218
219219
const uri = this.editing.targetCalendarUri
220-
const calendar = this.ownSortedCalendars.find(cal => this.calendarUrlToUri(cal.url) === uri)
221-
return calendar || this.ownSortedCalendars[0]
220+
const calendar = this.sortedCalendars.find(cal => this.calendarUrlToUri(cal.url) === uri)
221+
return calendar || this.sortedCalendars[0]
222222
},
223223
selectableConflictCalendars() {
224224
// The target calendar is always a conflict calendar, remove it from additional conflict calendars
225-
return this.ownSortedCalendars.filter(calendar => calendar.url !== this.calendar.url)
225+
return this.sortedCalendars.filter(calendar => calendar.url !== this.calendar.url)
226226
},
227227
conflictCalendars() {
228228
const freebusyUris = this.editing.calendarFreeBusyUris ?? []
229229
return freebusyUris.map(uri => {
230-
return this.ownSortedCalendars.find(cal => this.calendarUrlToUri(cal.url) === uri)
230+
return this.sortedCalendars.find(cal => this.calendarUrlToUri(cal.url) === uri)
231231
})
232232
},
233233
defaultConfig() {
234234
return AppointmentConfig.createDefault(
235-
this.calendarUrlToUri(this.ownSortedCalendars[0].url),
235+
this.calendarUrlToUri(this.sortedCalendars[0].url),
236236
this.calendarsStore.scheduleInbox,
237237
this.settingsStore.getResolvedTimezone,
238238
)

0 commit comments

Comments
 (0)