commit
dd68da5138
|
|
@ -5,6 +5,7 @@ import SmileyCell from "@/components/selfEvaluationFeedback/SmileyCell.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
summary: LearningUnitSummary;
|
summary: LearningUnitSummary;
|
||||||
|
hideDetailLink?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const hasFeedbackReceived = computed(() => {
|
const hasFeedbackReceived = computed(() => {
|
||||||
|
|
@ -34,6 +35,7 @@ const feedbackProviderName = computed(() => {
|
||||||
</div>
|
</div>
|
||||||
<span class="pl-4 underline">
|
<span class="pl-4 underline">
|
||||||
<router-link
|
<router-link
|
||||||
|
v-if="!props.hideDetailLink"
|
||||||
:to="props.summary.detail_url"
|
:to="props.summary.detail_url"
|
||||||
:data-cy="`self-eval-${summary.id}-detail-url`"
|
:data-cy="`self-eval-${summary.id}-detail-url`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,23 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSelfEvaluationFeedbackSummaries } from "@/services/selfEvaluationFeedback";
|
import { useSelfEvaluationFeedbackSummaries } from "@/services/selfEvaluationFeedback";
|
||||||
import { useCurrentCourseSession } from "@/composables";
|
import { useCurrentCourseSession, useEvaluationWithFeedback } from "@/composables";
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import FeedbackByLearningUnitSummary from "@/components/selfEvaluationFeedback/FeedbackByLearningUnitSummary.vue";
|
import FeedbackByLearningUnitSummary from "@/components/selfEvaluationFeedback/FeedbackByLearningUnitSummary.vue";
|
||||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
|
import { useUserStore } from "@/stores/user";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
profileUserId: string;
|
profileUserId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
const courseSession = useCurrentCourseSession();
|
const courseSession = useCurrentCourseSession();
|
||||||
const selfEvaluationFeedbackSummaries = useSelfEvaluationFeedbackSummaries(
|
const selfEvaluationFeedbackSummaries = useSelfEvaluationFeedbackSummaries(
|
||||||
courseSession.value.id,
|
courseSession.value.id,
|
||||||
props.profileUserId
|
props.profileUserId
|
||||||
);
|
);
|
||||||
|
|
||||||
const course = computed(() => courseSession.value.course);
|
|
||||||
const isLoaded = computed(() => !selfEvaluationFeedbackSummaries.loading.value);
|
const isLoaded = computed(() => !selfEvaluationFeedbackSummaries.loading.value);
|
||||||
const selectedCircle = ref({ name: t("a.AlleCircle"), id: "_all" });
|
const selectedCircle = ref({ name: t("a.AlleCircle"), id: "_all" });
|
||||||
|
|
||||||
|
|
@ -37,13 +38,19 @@ const summaries = computed(() => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const hasEvaluationFeedback = useEvaluationWithFeedback().hasFeedback;
|
||||||
|
|
||||||
const headerTitle = computed(() => {
|
const headerTitle = computed(() => {
|
||||||
if (course.value.configuration.enable_learning_mentor) {
|
if (hasEvaluationFeedback.value) {
|
||||||
return t("a.Selbst- und Fremdeinschätzungen");
|
return t("a.Selbst- und Fremdeinschätzungen");
|
||||||
} else {
|
} else {
|
||||||
return t("a.Selbsteinschätzungen");
|
return t("a.Selbsteinschätzungen");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isOwnEvaluation = computed(() => {
|
||||||
|
return props.profileUserId === userStore.id;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -63,6 +70,7 @@ const headerTitle = computed(() => {
|
||||||
v-for="summary in summaries"
|
v-for="summary in summaries"
|
||||||
:key="summary.id"
|
:key="summary.id"
|
||||||
:summary="summary"
|
:summary="summary"
|
||||||
|
:hide-detail-link="!isOwnEvaluation"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -717,3 +717,14 @@ export function useCertificateQuery(userId: string | undefined, courseSlug: stri
|
||||||
|
|
||||||
return { certificatesQuery };
|
return { certificatesQuery };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useEvaluationWithFeedback() {
|
||||||
|
const currentCourseSession = useCurrentCourseSession();
|
||||||
|
const hasFeedback = computed(
|
||||||
|
() =>
|
||||||
|
currentCourseSession.value.course.configuration.enable_learning_mentor &&
|
||||||
|
!currentCourseSession.value.course.configuration.is_uk
|
||||||
|
);
|
||||||
|
|
||||||
|
return { hasFeedback };
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { computed, onMounted } from "vue";
|
import { computed } from "vue";
|
||||||
import type { CompetenceCertificate } from "@/types";
|
import type { CompetenceCertificate } from "@/types";
|
||||||
import { useCertificateQuery } from "@/composables";
|
import { useCertificateQuery } from "@/composables";
|
||||||
import CompetenceCertificateComponent from "@/pages/competence/CompetenceCertificateComponent.vue";
|
import CompetenceCertificateComponent from "@/pages/competence/CompetenceCertificateComponent.vue";
|
||||||
|
|
@ -34,10 +34,6 @@ const certificate = computed(() => {
|
||||||
(certificates.competence_certificates as unknown as CompetenceCertificate[]) ?? []
|
(certificates.competence_certificates as unknown as CompetenceCertificate[]) ?? []
|
||||||
).find((cc) => cc.slug.endsWith(props.certificateSlug));
|
).find((cc) => cc.slug.endsWith(props.certificateSlug));
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
// log.debug("AssignmentView mounted", props.assignmentId, props.userId);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
import { onMounted } from "vue";
|
import { onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCurrentCourseSession } from "@/composables";
|
import { useCurrentCourseSession, useEvaluationWithFeedback } from "@/composables";
|
||||||
|
|
||||||
log.debug("CompetenceParentPage created");
|
log.debug("CompetenceParentPage created");
|
||||||
|
|
||||||
|
|
@ -29,6 +29,7 @@ function routeInSelfEvaluationAndFeedback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentCourseSession = useCurrentCourseSession();
|
const currentCourseSession = useCurrentCourseSession();
|
||||||
|
const hasEvaluationFeedback = useEvaluationWithFeedback().hasFeedback;
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
log.debug("CompetenceParentPage mounted", props.courseSlug);
|
log.debug("CompetenceParentPage mounted", props.courseSlug);
|
||||||
|
|
@ -72,7 +73,7 @@ onMounted(async () => {
|
||||||
class="block py-3"
|
class="block py-3"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
currentCourseSession.course.configuration.enable_learning_mentor
|
hasEvaluationFeedback
|
||||||
? $t("a.Selbst- und Fremdeinschätzungen")
|
? $t("a.Selbst- und Fremdeinschätzungen")
|
||||||
: $t("a.Selbsteinschätzungen")
|
: $t("a.Selbsteinschätzungen")
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,15 @@ const showDocumentSection = computed(() => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const expertAsContact = computed(() => {
|
||||||
|
return (
|
||||||
|
lpQueryResult.course.value?.configuration.enable_learning_mentor &&
|
||||||
|
lpQueryResult.course.value?.configuration.is_vv
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
const courseConfig = computed(() => {
|
const courseConfig = computed(() => {
|
||||||
if (lpQueryResult.course.value?.configuration.enable_learning_mentor) {
|
if (expertAsContact.value) {
|
||||||
return {
|
return {
|
||||||
contactDescription: "circlePage.contactLearningMentorDescription",
|
contactDescription: "circlePage.contactLearningMentorDescription",
|
||||||
contactButton: "circlePage.contactLearningMentorButton",
|
contactButton: "circlePage.contactLearningMentorButton",
|
||||||
|
|
@ -98,7 +105,7 @@ interface Mentor {
|
||||||
|
|
||||||
const experts = computed<Expert[] | null>(() => {
|
const experts = computed<Expert[] | null>(() => {
|
||||||
if (courseConfig.value.showContact) {
|
if (courseConfig.value.showContact) {
|
||||||
if (lpQueryResult.course.value?.configuration.enable_learning_mentor) {
|
if (expertAsContact.value) {
|
||||||
if (mentors.value?.length > 0) {
|
if (mentors.value?.length > 0) {
|
||||||
return mentors.value.map((m: Mentor) => m.mentor);
|
return mentors.value.map((m: Mentor) => m.mentor);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue