Add reflection icon

This commit is contained in:
Christian Cueni 2024-01-08 14:08:23 +01:00
parent 578ece34ab
commit 4910eb00d0
2 changed files with 15 additions and 2 deletions

View File

@ -1,5 +1,9 @@
import type { LearningContent } from "@/types"; import type { LearningContent } from "@/types";
import { assertUnreachable, getAssignmentTypeTitle } from "@/utils/utils"; import {
assertUnreachable,
getAssignmentTypeIcon,
getAssignmentTypeTitle,
} from "@/utils/utils";
import { useTranslation } from "i18next-vue"; import { useTranslation } from "i18next-vue";
export interface LearningContentIdentifier { export interface LearningContentIdentifier {
@ -15,7 +19,7 @@ export function learningContentTypeData(
case "learnpath.LearningContentAssignment": { case "learnpath.LearningContentAssignment": {
return { return {
title: getAssignmentTypeTitle(lc.assignment_type), title: getAssignmentTypeTitle(lc.assignment_type),
icon: "it-icon-lc-assignment", icon: getAssignmentTypeIcon(lc.assignment_type),
}; };
} }
case "learnpath.LearningContentAttendanceCourse": case "learnpath.LearningContentAttendanceCourse":

View File

@ -60,3 +60,12 @@ export function getAssignmentTypeTitle(assignmentType: AssignmentType): string {
return "unknown"; return "unknown";
} }
} }
export function getAssignmentTypeIcon(assignmentType: AssignmentType): string {
switch (assignmentType) {
case "REFLECTION":
return "it-icon-lc-reflection";
default:
return "it-icon-lc-assignment";
}
}