VBV-80: Umgesetzt Circle-Ansicht "weiter gehts"
This commit is contained in:
parent
6b0cf9effd
commit
a57ef84ed8
|
|
@ -30,6 +30,26 @@ const allFinished = computed(() => {
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const continueTranslationKey = computed(() => {
|
||||||
|
if (props.learningSequence && circleStore.circle) {
|
||||||
|
const childrenReversed = [...circleStore.circle.flatLearningContents].reverse()
|
||||||
|
const lastFinished = childrenReversed.find((learningContent) => {
|
||||||
|
return learningContent.completed
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!lastFinished) {
|
||||||
|
// must be the first
|
||||||
|
return circleStore.circle.flatLearningContents[0].translation_key
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastFinished && lastFinished.nextLearningContent) {
|
||||||
|
return lastFinished.nextLearningContent.translation_key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ''
|
||||||
|
})
|
||||||
|
|
||||||
const learningSequenceBorderClass = computed(() => {
|
const learningSequenceBorderClass = computed(() => {
|
||||||
let result = []
|
let result = []
|
||||||
if (props.learningSequence && circleStore.circle) {
|
if (props.learningSequence && circleStore.circle) {
|
||||||
|
|
@ -77,6 +97,14 @@ const learningSequenceBorderClass = computed(() => {
|
||||||
>{{ learningContent.contents[0].type }}: {{ learningContent.title }}</span
|
>{{ learningContent.contents[0].type }}: {{ learningContent.title }}</span
|
||||||
>
|
>
|
||||||
</ItCheckbox>
|
</ItCheckbox>
|
||||||
|
|
||||||
|
<button
|
||||||
|
v-if="learningContent.translation_key === continueTranslationKey"
|
||||||
|
class="btn-blue -my-4"
|
||||||
|
@click.stop="circleStore.openLearningContent(learningContent)"
|
||||||
|
>
|
||||||
|
Weiter gehts
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="learningUnit.id" class="hover:cursor-pointer" @click="circleStore.openSelfEvaluation(learningUnit)">
|
<div v-if="learningUnit.id" class="hover:cursor-pointer" @click="circleStore.openSelfEvaluation(learningUnit)">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue