Fix some type errors
This commit is contained in:
parent
bdae082550
commit
659684f25b
|
|
@ -3,7 +3,7 @@ import type { Circle } from '@/services/circle'
|
||||||
import ItFullScreenModal from '@/components/ui/ItFullScreenModal.vue'
|
import ItFullScreenModal from '@/components/ui/ItFullScreenModal.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
circle: Circle
|
circle: Circle | undefined
|
||||||
show: boolean
|
show: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ const props = defineProps<{
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ItFullScreenModal :show="show" @closemodal="$emit('closemodal')">
|
<ItFullScreenModal :show="show" @closemodal="$emit('closemodal')">
|
||||||
<div class="container-medium">
|
<div class="container-medium" v-if="circle">
|
||||||
<h1 class="">Überblick: Circle "{{ circle.title }}"</h1>
|
<h1 class="">Überblick: Circle "{{ circle.title }}"</h1>
|
||||||
|
|
||||||
<p class="mt-8 text-xl">Hier zeigen wir dir, was du in diesem Circle lernen wirst.</p>
|
<p class="mt-8 text-xl">Hier zeigen wir dir, was du in diesem Circle lernen wirst.</p>
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,6 @@ const block = computed(() => {
|
||||||
</iframe>
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="block.type === 'podcast'">
|
|
||||||
<iframe width="100%" height="300" scrolling="no" frameborder="no" allow="" :src="block.value.url"></iframe>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import { useLearningPathStore } from '@/stores/learningPath'
|
||||||
|
|
||||||
export type CircleStoreState = {
|
export type CircleStoreState = {
|
||||||
circle: Circle | undefined
|
circle: Circle | undefined
|
||||||
|
page: 'INDEX' | 'OVERVIEW'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useCircleStore = defineStore({
|
export const useCircleStore = defineStore({
|
||||||
|
|
@ -16,6 +17,7 @@ export const useCircleStore = defineStore({
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
circle: undefined,
|
circle: undefined,
|
||||||
|
page: 'INDEX',
|
||||||
} as CircleStoreState;
|
} as CircleStoreState;
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { LearningPath } from '@/services/learningPath'
|
||||||
|
|
||||||
export type LearningPathStoreState = {
|
export type LearningPathStoreState = {
|
||||||
learningPath: LearningPath | undefined
|
learningPath: LearningPath | undefined
|
||||||
|
page: 'INDEX' | 'OVERVIEW'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useLearningPathStore = defineStore({
|
export const useLearningPathStore = defineStore({
|
||||||
|
|
@ -11,6 +12,7 @@ export const useLearningPathStore = defineStore({
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
learningPath: undefined,
|
learningPath: undefined,
|
||||||
|
page: 'INDEX',
|
||||||
} as LearningPathStoreState;
|
} as LearningPathStoreState;
|
||||||
},
|
},
|
||||||
getters: {},
|
getters: {},
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import * as log from 'loglevel'
|
||||||
import LearningSequence from '@/components/circle/LearningSequence.vue'
|
import LearningSequence from '@/components/circle/LearningSequence.vue'
|
||||||
import CircleOverview from '@/components/circle/CircleOverview.vue'
|
import CircleOverview from '@/components/circle/CircleOverview.vue'
|
||||||
import CircleDiagram from '@/components/circle/CircleDiagram.vue'
|
import CircleDiagram from '@/components/circle/CircleDiagram.vue'
|
||||||
import LearningContent from '@/components/circle/LearningContent.vue'
|
|
||||||
|
|
||||||
import { computed, onMounted } from 'vue'
|
import { computed, onMounted } from 'vue'
|
||||||
import { useCircleStore } from '@/stores/circle'
|
import { useCircleStore } from '@/stores/circle'
|
||||||
|
|
@ -65,10 +64,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<Transition mode="out-in">
|
<Transition mode="out-in">
|
||||||
<div v-if="circleStore.page === 'LEARNING_CONTENT'">
|
<div>
|
||||||
<LearningContent :key="circleStore.currentLearningContent.translation_key" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<div class="circle-container bg-gray-200">
|
<div class="circle-container bg-gray-200">
|
||||||
<div class="circle max-w-9xl">
|
<div class="circle max-w-9xl">
|
||||||
<div class="flex flex-col lg:flex-row">
|
<div class="flex flex-col lg:flex-row">
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { useUserStore } from '@/stores/user'
|
||||||
|
|
||||||
import LearningPathDiagram from '@/components/circle/LearningPathDiagram.vue'
|
import LearningPathDiagram from '@/components/circle/LearningPathDiagram.vue'
|
||||||
import LearningPathViewVertical from '@/views/LearningPathViewVertical.vue'
|
import LearningPathViewVertical from '@/views/LearningPathViewVertical.vue'
|
||||||
import { LearningPath } from '@/services/learningPath'
|
import type { LearningPath } from '@/services/learningPath'
|
||||||
|
|
||||||
log.debug('LearningPathView created')
|
log.debug('LearningPathView created')
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const createContinueUrl = (learningPath: LearningPath) => {
|
const createContinueUrl = (learningPath: LearningPath): [string, boolean] => {
|
||||||
if (learningPath.nextLearningContent) {
|
if (learningPath.nextLearningContent) {
|
||||||
const circle = learningPath.nextLearningContent.parentCircle
|
const circle = learningPath.nextLearningContent.parentCircle
|
||||||
const lsShortSlug = learningPath.nextLearningContent.parentLearningSequence?.slug.replace(`${circle.slug}-`, '')
|
const lsShortSlug = learningPath.nextLearningContent.parentLearningSequence?.slug.replace(`${circle.slug}-`, '')
|
||||||
|
|
@ -77,14 +77,14 @@ const createContinueUrl = (learningPath: LearningPath) => {
|
||||||
class="bg-white m-6 lg:m-12 p-8 flex flex-col lg:flex-row divide-y lg:divide-y-0 lg:divide-x divide-gray-500 justify-start"
|
class="bg-white m-6 lg:m-12 p-8 flex flex-col lg:flex-row divide-y lg:divide-y-0 lg:divide-x divide-gray-500 justify-start"
|
||||||
>
|
>
|
||||||
<div class="p-4 lg:p-8 flex-auto">
|
<div class="p-4 lg:p-8 flex-auto">
|
||||||
<h2 translate>Willkommmen zurück, {{ userStore.first_name }}</h2>
|
<h2>Willkommmen zurück, {{ userStore.first_name }}</h2>
|
||||||
<p class="mt-4 text-xl"></p>
|
<p class="mt-4 text-xl"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-4 lg:p-8 flex-2" v-if="learningPathStore.learningPath.nextLearningContent" translate>
|
<div class="p-4 lg:p-8 flex-2" v-if="learningPathStore.learningPath.nextLearningContent">
|
||||||
Nächster Schritt
|
Nächster Schritt
|
||||||
<h3>
|
<h3>
|
||||||
{{ learningPathStore.learningPath.nextLearningContent.parentCircle.title }}:
|
{{ learningPathStore.learningPath.nextLearningContent.parentCircle.title }}:
|
||||||
{{ learningPathStore.learningPath.nextLearningContent.parentLearningSequence.title }}
|
{{ learningPathStore.learningPath.nextLearningContent.parentLearningSequence?.title }}
|
||||||
</h3>
|
</h3>
|
||||||
<router-link
|
<router-link
|
||||||
class="mt-4 btn-blue"
|
class="mt-4 btn-blue"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue