Hide link to evaluation details in profile
This commit is contained in:
parent
b497fd3fed
commit
d02b76477e
|
|
@ -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`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,13 @@ 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,
|
||||||
|
|
@ -45,6 +47,10 @@ const headerTitle = computed(() => {
|
||||||
return t("a.Selbsteinschätzungen");
|
return t("a.Selbsteinschätzungen");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isOwnEvaluation = computed(() => {
|
||||||
|
return props.profileUserId === userStore.id;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -64,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>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ const showDocumentSection = computed(() => {
|
||||||
const expertAsContact = computed(() => {
|
const expertAsContact = computed(() => {
|
||||||
return (
|
return (
|
||||||
lpQueryResult.course.value?.configuration.enable_learning_mentor &&
|
lpQueryResult.course.value?.configuration.enable_learning_mentor &&
|
||||||
!lpQueryResult.course.value?.configuration.is_uk
|
lpQueryResult.course.value?.configuration.is_vv
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue