diff --git a/frontend/src/components/activity/DaySwitcher.vue b/frontend/src/components/activity/DaySwitcher.vue index 1034f02590..2235af6b0a 100644 --- a/frontend/src/components/activity/DaySwitcher.vue +++ b/frontend/src/components/activity/DaySwitcher.vue @@ -82,7 +82,7 @@ export default { name: 'DaySwitcher', components: { AvatarRow }, props: { - camp: { type: Function, required: true }, + camp: { type: Object, required: true }, daySelection: { type: Object, required: true }, loading: { type: Boolean }, }, @@ -104,7 +104,7 @@ export default { ) }, periods() { - return sortBy(this.camp().periods().items, 'start') + return sortBy(this.camp.periods().items, 'start') }, }, methods: { diff --git a/frontend/src/components/activity/ScheduleEntry.vue b/frontend/src/components/activity/ScheduleEntry.vue index 650e80b8ae..75b9afa3ee 100644 --- a/frontend/src/components/activity/ScheduleEntry.vue +++ b/frontend/src/components/activity/ScheduleEntry.vue @@ -7,13 +7,13 @@ Displays a single scheduleEntry class="ec-schedule-entry" toolbar back - :loaded="!scheduleEntry()._meta.loading && !activity.camp()._meta.loading" + :loaded="!scheduleEntry._meta.loading && !activity.camp()._meta.loading" :max-width="isPaperDisplaySize ? '944px' : ''" > @@ -286,13 +286,13 @@ export default { return { preferredContentTypes: () => this.preferredContentTypes, allContentNodes: () => this.contentNodes, - camp: () => this.camp, + camp: this.camp, isPaperDisplaySize: () => this.isPaperDisplaySize, } }, props: { scheduleEntry: { - type: Function, + type: Object, required: true, }, }, @@ -306,7 +306,7 @@ export default { }, computed: { activity() { - return this.scheduleEntry().activity() + return this.scheduleEntry.activity() }, camp() { return this.activity.camp() @@ -319,7 +319,7 @@ export default { }, activityName() { return ( - (this.scheduleEntry().number ? this.scheduleEntry().number + ' ' : '') + + (this.scheduleEntry.number ? this.scheduleEntry.number + ' ' : '') + (this.category.short ? this.category.short + ': ' : '') + this.activity.title ) @@ -347,7 +347,7 @@ export default { type: 'Activity', options: { activity: this.activity._meta.self, - scheduleEntry: this.scheduleEntry()._meta.self, + scheduleEntry: this.scheduleEntry._meta.self, }, }, ], @@ -369,11 +369,11 @@ export default { // reload data every time user navigates to Activity view async mounted() { this.loading = true - await this.scheduleEntry().activity()._meta.load // wait if activity is being loaded as part of a collection + await this.scheduleEntry.activity()._meta.load // wait if activity is being loaded as part of a collection this.loading = false // to avoid stale data, trigger reload (which includes embedded contentNode data). However, don't await in order to render early with cached data. - this.scheduleEntry().activity().$reload() + this.scheduleEntry.activity().$reload() }, methods: { @@ -410,7 +410,7 @@ export default { console.warn('clipboard permission not requestable') } - const scheduleEntry = scheduleEntryRoute(this.scheduleEntry()) + const scheduleEntry = scheduleEntryRoute(this.scheduleEntry) const url = window.location.origin + router.resolve(scheduleEntry).href await navigator.clipboard.writeText(url) @@ -423,7 +423,7 @@ export default { }, onDelete() { // redirect to Picasso - this.$router.push(periodRoute(this.scheduleEntry().period())) + this.$router.push(periodRoute(this.scheduleEntry.period())) }, }, } diff --git a/frontend/src/components/activity/content/Material.vue b/frontend/src/components/activity/content/Material.vue index 62eb316bf5..db78fe5c85 100644 --- a/frontend/src/components/activity/content/Material.vue +++ b/frontend/src/components/activity/content/Material.vue @@ -1,7 +1,7 @@