Set dav on mocked tasks so we get an uri

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
Raimund Schlüßler 2019-10-30 20:12:12 +01:00
parent 0c86fe6a50
commit 5cd822fde4
No known key found for this signature in database
GPG key ID: 036FA7EB1A599178

View file

@ -107,7 +107,12 @@ END:VCALENDAR`
calendarsData.forEach(calendarData => {
const calendar = mapDavCollectionToCalendar(calendarData)
const tasks = calendarData.tasks.map(taskData => {
return new Task(taskData, calendar)
const task = new Task(taskData, calendar)
const response = {
url: `${calendar.id}/${task.uid}.ics`
}
localVue.set(task, 'dav', response)
return task
})
store.commit('addCalendar', calendar)
store.commit('appendTasksToCalendar', { calendar, tasks })