diff --git a/client/src/components/learningPath/CircleDiagram.vue b/client/src/components/learningPath/CircleDiagram.vue index f38e91c6..30269f1b 100644 --- a/client/src/components/learningPath/CircleDiagram.vue +++ b/client/src/components/learningPath/CircleDiagram.vue @@ -5,6 +5,7 @@ import * as d3 from "d3"; import pick from "lodash/pick"; import * as log from "loglevel"; import { computed, onMounted } from "vue"; +import { showIcon } from "./learningSequenceUtils"; // @ts-ignore import colors from "@/colors.json"; @@ -208,7 +209,10 @@ function render() { const learningSequenceIcon = learningSequences .append("svg:image") .attr("xlink:href", (d) => { - return "/static/icons/" + d.icon.replace("it-", "") + ".svg"; + if (showIcon(d.icon)) { + return "/static/icons/" + d.icon.replace("it-", "") + ".svg"; + } + return ""; }) .attr("width", iconWidth) .attr("height", iconWidth) diff --git a/client/src/components/learningPath/LearningSequence.vue b/client/src/components/learningPath/LearningSequence.vue index 6f57cd46..eb10152b 100644 --- a/client/src/components/learningPath/LearningSequence.vue +++ b/client/src/components/learningPath/LearningSequence.vue @@ -10,11 +10,12 @@ import { humanizeDuration } from "@/utils/humanizeDuration"; import findLast from "lodash/findLast"; import { computed } from "vue"; import LearningContentBadge from "./LearningContentTypeBadge.vue"; +import { showIcon } from "./learningSequenceUtils"; -interface Props { +type Props = { learningSequence: LearningSequence; readonly?: boolean; -} +}; const props = withDefaults(defineProps(), { readonly: false, @@ -91,7 +92,7 @@ const learningSequenceBorderClass = computed(() => {