Remove Objectives Code from Module Component

This commit is contained in:
Lorenz Padberg 2024-05-01 10:44:44 +02:00
parent 830ca5edca
commit a832598054
1 changed files with 0 additions and 48 deletions

View File

@ -60,33 +60,6 @@
/>
</div>
<h3
v-if="$flavor.showObjectivesTitle && module.objectiveGroups?.length && showObjectives"
id="objectives"
>
<span>Lernziele</span>
</h3>
<div
class="module__objective-groups"
v-if="module.objectiveGroups?.length && showObjectives"
>
<objective-groups
:groups="languageCommunicationObjectiveGroups"
v-if="languageCommunicationObjectiveGroups.length"
/>
<objective-groups
:groups="societyObjectiveGroups"
v-if="societyObjectiveGroups.length"
/>
<objective-groups
:groups="interdisciplinaryObjectiveGroups"
v-if="interdisciplinaryObjectiveGroups.length"
/>
</div>
<chapter
:chapter="chapter"
:index="index"
@ -98,7 +71,6 @@
</template>
<script setup lang="ts">
import ObjectiveGroups from '@/components/objective-groups/ObjectiveGroups.vue';
import Chapter from '@/components/Chapter.vue';
import BookmarkActions from '@/components/notes/BookmarkActions.vue';
import Pill from '@/components/ui/Pill.vue';
@ -223,24 +195,7 @@ const note = computed(() => {
return props.module.bookmark.note;
});
const filterObjectiveGroup = (title: string) => {
return props.module.objectiveGroups
? props.module.objectiveGroups.filter((group) => group.title.toLowerCase() === title)
: [];
};
const languageCommunicationObjectiveGroups = computed(() => {
return filterObjectiveGroup('language_communication');
});
const societyObjectiveGroups = computed(() => {
return filterObjectiveGroup('society');
});
const interdisciplinaryObjectiveGroups = computed(() => {
return filterObjectiveGroup('interdisciplinary');
});
const showObjectives = computed(() => {
return route && route.query['show-objectives'] !== undefined;
});
</script>
<style scoped lang="scss">
@ -315,8 +270,5 @@ const showObjectives = computed(() => {
margin-top: 3px;
}
&__objective-groups {
margin-bottom: 2 * $large-spacing;
}
}
</style>