Display correct contacts, remove unused var

This commit is contained in:
Christian Cueni 2024-05-02 15:55:32 +02:00
parent 52b6e2ee4f
commit b497fd3fed
2 changed files with 9 additions and 3 deletions

View File

@ -16,7 +16,6 @@ const selfEvaluationFeedbackSummaries = useSelfEvaluationFeedbackSummaries(
props.profileUserId
);
const course = computed(() => courseSession.value.course);
const isLoaded = computed(() => !selfEvaluationFeedbackSummaries.loading.value);
const selectedCircle = ref({ name: t("a.AlleCircle"), id: "_all" });

View File

@ -63,8 +63,15 @@ const showDocumentSection = computed(() => {
);
});
const expertAsContact = computed(() => {
return (
lpQueryResult.course.value?.configuration.enable_learning_mentor &&
!lpQueryResult.course.value?.configuration.is_uk
);
});
const courseConfig = computed(() => {
if (lpQueryResult.course.value?.configuration.enable_learning_mentor) {
if (expertAsContact.value) {
return {
contactDescription: "circlePage.contactLearningMentorDescription",
contactButton: "circlePage.contactLearningMentorButton",
@ -98,7 +105,7 @@ interface Mentor {
const experts = computed<Expert[] | null>(() => {
if (courseConfig.value.showContact) {
if (lpQueryResult.course.value?.configuration.enable_learning_mentor) {
if (expertAsContact.value) {
if (mentors.value?.length > 0) {
return mentors.value.map((m: Mentor) => m.mentor);
}