Merge pull request #23026 from tcollins2011/tool_form_tutorial

Tool form tutorial bug fix
This commit is contained in:
Marius van den Beek
2026-07-07 16:33:32 +02:00
committed by GitHub
@@ -2,7 +2,7 @@
import { faCaretDown } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BButton } from "bootstrap-vue";
import { computed, reactive, ref } from "vue";
import { computed, reactive, ref, set } from "vue";
import { useToolTrainingMaterial } from "@/composables/toolTrainingMaterial";
@@ -34,6 +34,10 @@ const tutorialText = computed(() => {
return "There is 1 tutorial available which uses this tool.";
}
});
function toggleCategory(category: string) {
set(categoryOpen, category, !categoryOpen[category]);
}
</script>
<template>
@@ -58,7 +62,7 @@ const tutorialText = computed(() => {
</BButton>
<GCollapse v-model="mainOpen">
<div v-for="category in trainingCategories" :key="category">
<BButton class="ui-link ml-3" @click="categoryOpen[category] = !categoryOpen[category]">
<BButton class="ui-link ml-3" @click="toggleCategory(category)">
{{ category }} ({{ tutorialsInCategory(category).length }})
<FontAwesomeIcon :icon="faCaretDown" />
</BButton>