Display correct contacts, remove unused var
This commit is contained in:
parent
52b6e2ee4f
commit
b497fd3fed
|
|
@ -16,7 +16,6 @@ const selfEvaluationFeedbackSummaries = useSelfEvaluationFeedbackSummaries(
|
||||||
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" });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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(() => {
|
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