Fix typecheck error
This commit is contained in:
parent
e8073753be
commit
134d1f05d6
|
|
@ -18,7 +18,7 @@ function setIsOpen(value: boolean) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Dialog :open="modelValue" @close="setIsOpen" class="relative z-50">
|
<Dialog :open="modelValue" class="relative z-50" @close="setIsOpen">
|
||||||
<div class="fixed inset-0 bg-black/30" aria-hidden="true"></div>
|
<div class="fixed inset-0 bg-black/30" aria-hidden="true"></div>
|
||||||
<div class="fixed inset-0 flex items-center justify-center p-4">
|
<div class="fixed inset-0 flex items-center justify-center p-4">
|
||||||
<DialogPanel class="w-full max-w-2xl bg-white px-8 pt-8 pb-4">
|
<DialogPanel class="w-full max-w-2xl bg-white px-8 pt-8 pb-4">
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,8 @@ function setActiveClasses(isActive: boolean) {
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
<ul
|
<ul
|
||||||
class="px-8 bg-white"
|
|
||||||
v-if="competenceStore.competenceProfilePage(user.user_id)"
|
v-if="competenceStore.competenceProfilePage(user.user_id)"
|
||||||
|
class="px-8 bg-white"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
v-for="competence in competenceStore.competences(user.user_id)"
|
v-for="competence in competenceStore.competences(user.user_id)"
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ export const useCockpitStore = defineStore({
|
||||||
this.courseSessionUsers = data.users;
|
this.courseSessionUsers = data.users;
|
||||||
this.cockpitSessionUser = data.cockpit_user;
|
this.cockpitSessionUser = data.cockpit_user;
|
||||||
|
|
||||||
if (this.cockpitSessionUser.circles?.length > 0) {
|
if (this.cockpitSessionUser && this.cockpitSessionUser.circles?.length > 0) {
|
||||||
this.selectedCircles = [this.cockpitSessionUser.circles[0].id];
|
this.selectedCircles = [this.cockpitSessionUser.circles[0].id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ export const useCourseSessionsStore = defineStore({
|
||||||
hasCockpit() {
|
hasCockpit() {
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
return (
|
return (
|
||||||
this.courseSessionForRoute.experts.filter(
|
this.courseSessionForRoute &&
|
||||||
|
(this.courseSessionForRoute as unknown as CourseSession).experts.filter(
|
||||||
(expert) => expert.user_id === userStore.id
|
(expert) => expert.user_id === userStore.id
|
||||||
).length > 0
|
).length > 0
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue