Skip to content

Commit

Permalink
Merge pull request #10539 from nextcloud/backport/9639/stable3.7
Browse files Browse the repository at this point in the history
[stable3.7] fix: create tasks from emails
  • Loading branch information
st3iny authored Dec 30, 2024
2 parents 07dc254 + 416073b commit 204c2c0
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/components/TaskModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
</label>
</div>
<!-- FIXME: is broken due to upstream select component serializing options to JSON -->
<NcSelect v-model="selectedCalendar"
<NcSelect v-model="selectedCalendarChoice"
label="displayname"
input-id="url"
:placeholder="t('mail', 'Select calendar')"
:aria-label-combobox="t('mail', 'Select calendar')"
:allow-empty="false"
:options="calendars">
:options="calendarChoices">
<template #option="{ id }">
<CalendarPickerOption :color="getCalendarById(id).color"
:displayname="getCalendarById(id).displayname" />
Expand Down Expand Up @@ -102,7 +102,7 @@ export default {
startTimezoneId: defaultTimezoneId,
endTimezoneId: defaultTimezoneId,
saving: false,
selectedCalendar: undefined,
selectedCalendarChoice: undefined,
note: this.envelope.previewText,
}
},
Expand All @@ -120,7 +120,21 @@ export default {
return this.$store.getters.getAllTags
},
calendars() {
return this.$store.getters.getTaskCalendarsForCurrentUser.map(calendar => ({ id: calendar.id, color: calendar.color, displayname: calendar.displayname }))
return this.$store.getters.getTaskCalendarsForCurrentUser
},
calendarChoices() {
return this.calendars.map(calendar => ({
id: calendar.id,
color: calendar.color,
displayname: calendar.displayname,
}))
},
selectedCalendar() {
if (!this.selectedCalendarChoice) {
return undefined
}
return this.calendars.find((cal) => cal.id === this.selectedCalendarChoice.id)
},
},
created() {
Expand All @@ -129,9 +143,8 @@ export default {
})
},
async mounted() {
if (this.calendars.length) {
this.selectedCalendar = this.calendars[0]
this.selectedCalendarChoice = this.calendarChoices[0]
}
},
methods: {
Expand Down

0 comments on commit 204c2c0

Please sign in to comment.