diff --git a/client/src/components/learningPath/LearningContent.vue b/client/src/components/learningPath/LearningContent.vue index d0e57c41..1c8e6d83 100644 --- a/client/src/components/learningPath/LearningContent.vue +++ b/client/src/components/learningPath/LearningContent.vue @@ -29,7 +29,8 @@ const block = computed(() => { }); // can't use the type as component name, as some are reserved HTML components, e.g. video -const COMPONENTS: Record> = { +const COMPONENTS: Record = { + // todo: can we find a better type here than any? ^ placeholder: PlaceholderBlock, video: VideoBlock, assignment: DescriptionTextBlock, diff --git a/client/src/components/ui/ItCheckbox.vue b/client/src/components/ui/ItCheckbox.vue index 906e9094..aca889dd 100644 --- a/client/src/components/ui/ItCheckbox.vue +++ b/client/src/components/ui/ItCheckbox.vue @@ -25,7 +25,8 @@ const keydown = (e: KeyboardEvent) => { } }; const input = (e: Event) => { - log.debug("input", e.type, e.target.checked, e.target.value); + const target = e.target as HTMLInputElement; + log.debug("input", e.type, target.checked, target.value); emit("toggle"); }; diff --git a/client/src/components/ui/ItRadioGroup.vue b/client/src/components/ui/ItRadioGroup.vue index f95d3572..bf8629ce 100644 --- a/client/src/components/ui/ItRadioGroup.vue +++ b/client/src/components/ui/ItRadioGroup.vue @@ -10,7 +10,7 @@
@@ -14,5 +14,10 @@ defineProps<{ modelValue: string; label: string; }>(); -defineEmits(["update:modelValue"]); +const emit = defineEmits(["update:modelValue"]); + +const onInput = (event: Event) => { + const target = event.target as HTMLInputElement; + emit("update:modelValue", target.value); +}; diff --git a/client/src/stores/cockpit.ts b/client/src/stores/cockpit.ts index 6c9a9cc6..9dc0339e 100644 --- a/client/src/stores/cockpit.ts +++ b/client/src/stores/cockpit.ts @@ -29,12 +29,15 @@ export const useCockpitStore = defineStore({ actions: { async loadCourseSessionUsers(courseSlug: string, reload = false) { log.debug("loadCockpitData called"); - const data = await itGetCached(`/api/course/sessions/${courseSlug}/users/`, { - reload: reload, - }); + const { users, cockpit_user: cockpitUser } = await itGetCached( + `/api/course/sessions/${courseSlug}/users/`, + { + reload: reload, + } + ); - this.courseSessionUsers = data.users; - this.cockpitSessionUser = data.cockpit_user; + this.courseSessionUsers = users; + this.cockpitSessionUser = cockpitUser; if (this.cockpitSessionUser && this.cockpitSessionUser.circles?.length > 0) { this.selectedCircles = [this.cockpitSessionUser.circles[0].translation_key];