diff --git a/print/components/story/StoryPeriod.vue b/print/components/story/StoryPeriod.vue index b121da1f1a..0f8f65f0be 100644 --- a/print/components/story/StoryPeriod.vue +++ b/print/components/story/StoryPeriod.vue @@ -30,27 +30,30 @@ const props = defineProps({ const { $api } = useNuxtApp() -const { data, error } = await useAsyncData('StoryPeriod', async () => { - const contentTypeStorycontext = ( - await $api.get().contentTypes().$loadItems() - ).items.find((contentType) => contentType.name === 'Storycontext') +const { data, error } = await useAsyncData( + `StoryPeriod-${props.period._meta.self}`, + async () => { + const contentTypeStorycontext = ( + await $api.get().contentTypes().$loadItems() + ).items.find((contentType) => contentType.name === 'Storycontext') - const [periodStoryChapters] = await Promise.all([ - $api - .get() - .contentNodes({ - period: props.period._meta.self, - contentType: contentTypeStorycontext._meta.self, - }) - .$loadItems(), - props.period.days().$loadItems(), - props.period.scheduleEntries().$loadItems(), - props.period.camp().categories().$loadItems(), - ]) + const [periodStoryChapters] = await Promise.all([ + $api + .get() + .contentNodes({ + period: props.period._meta.self, + contentType: contentTypeStorycontext._meta.self, + }) + .$loadItems(), + props.period.days().$loadItems(), + props.period.scheduleEntries().$loadItems(), + props.period.camp().categories().$loadItems(), + ]) - return { - days: props.period.days().items, - periodStoryChapters: periodStoryChapters.items, + return { + days: props.period.days().items, + periodStoryChapters: periodStoryChapters.items, + } } -}) +)