Merged in feature/VBV-384-remove-uk-duration (pull request #98)
Set duration default to 0, hide duration info if 0 Approved-by: Elia Bieri
This commit is contained in:
commit
dcb5e0a8ab
|
|
@ -40,6 +40,12 @@ const duration = computed(() => {
|
|||
return "";
|
||||
});
|
||||
|
||||
const showDuration = computed(() => {
|
||||
return (
|
||||
circleStore.circle && sumBy(circleStore.circle.learningSequences, "minutes") > 0
|
||||
);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
log.debug(
|
||||
"CirclePage mounted",
|
||||
|
|
@ -136,7 +142,10 @@ onMounted(async () => {
|
|||
{{ circleStore.circle?.title }}
|
||||
</h1>
|
||||
|
||||
<div class="mt-2">{{ $t("circlePage.duration") }}: {{ duration }}</div>
|
||||
<div v-if="showDuration" class="mt-2">
|
||||
{{ $t("circlePage.duration") }}:
|
||||
{{ duration }}
|
||||
</div>
|
||||
|
||||
<div class="mt-8 w-full">
|
||||
<CircleDiagram></CircleDiagram>
|
||||
|
|
|
|||
|
|
@ -96,7 +96,9 @@ const learningSequenceBorderClass = computed(() => {
|
|||
<h3 class="text-large font-semibold">
|
||||
{{ learningSequence.title }}
|
||||
</h3>
|
||||
<div>{{ humanizeDuration(learningSequence.minutes) }}</div>
|
||||
<div v-if="learningSequence.minutes === 0">
|
||||
{{ humanizeDuration(learningSequence.minutes) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ol class="border bg-white px-4 lg:px-6" :class="learningSequenceBorderClass">
|
||||
|
|
@ -108,7 +110,7 @@ const learningSequenceBorderClass = computed(() => {
|
|||
>
|
||||
<div v-if="learningUnit.title" class="lg:pg-6 flex gap-4 pb-3 text-blue-900">
|
||||
<div class="font-semibold">{{ learningUnit.title }}</div>
|
||||
<div class="whitespace-nowrap">
|
||||
<div v-if="learningUnit.minutes === 0" class="whitespace-nowrap">
|
||||
{{ humanizeDuration(learningUnit.minutes) }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class LearningUnitFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentAttendanceCourseFactory(wagtail_factories.PageFactory):
|
||||
title = "Platzhalter Inhalt"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
description = RichText("Platzhalter Beschreibung")
|
||||
content_url = ""
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class LearningContentAttendanceCourseFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentVideoFactory(wagtail_factories.PageFactory):
|
||||
title = "Platzhalter Video"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = "https://www.youtube.com/embed/qhPIfxS2hvI"
|
||||
description = RichText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ class LearningContentVideoFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentPlaceholderFactory(wagtail_factories.PageFactory):
|
||||
title = "Platzhalter Video"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("Platzhalter")
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ class LearningContentPlaceholderFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentFeedbackFactory(wagtail_factories.PageFactory):
|
||||
title = "Feedback"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("")
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ class LearningContentFeedbackFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentLearningModuleFactory(wagtail_factories.PageFactory):
|
||||
title = "Beispiel Lernmodul"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("")
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ class LearningContentLearningModuleFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentMediaLibraryFactory(wagtail_factories.PageFactory):
|
||||
title = "Mediathek"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("")
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ class LearningContentMediaLibraryFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentTestFactory(wagtail_factories.PageFactory):
|
||||
title = "Fachcheck"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("")
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ class LearningContentTestFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentRichTextFactory(wagtail_factories.PageFactory):
|
||||
title = "Rich Text"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("")
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ class LearningContentRichTextFactory(wagtail_factories.PageFactory):
|
|||
|
||||
class LearningContentAssignmentFactory(wagtail_factories.PageFactory):
|
||||
title = "Geleitete Fallarbeit"
|
||||
minutes = 15
|
||||
minutes = 0
|
||||
content_url = ""
|
||||
description = RichText("")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue