Rename component

This commit is contained in:
Christian Cueni 2024-08-05 16:04:15 +02:00
parent 6447843656
commit cb2eb3cc7f
3 changed files with 9 additions and 5 deletions

View File

@ -9,7 +9,7 @@ import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
import AssignmentSummaryBox from "@/components/dashboard/AssignmentSummaryBox.vue"; import AssignmentSummaryBox from "@/components/dashboard/AssignmentSummaryBox.vue";
import BaseBox from "@/components/dashboard/BaseBox.vue"; import BaseBox from "@/components/dashboard/BaseBox.vue";
import { percentToRoundedGrade } from "@/services/assignmentService"; import { percentToRoundedGrade } from "@/services/assignmentService";
import MentorMenteeCount from "@/components/dashboard/MentorMenteeCount.vue"; import AgentConnectionCount from "@/components/dashboard/AgentConnectionCount.vue";
const props = defineProps<{ const props = defineProps<{
courseSlug: string; courseSlug: string;
@ -24,6 +24,10 @@ const assignmentStats = computed(() => {
return mentorData.value?.assignments ?? null; return mentorData.value?.assignments ?? null;
}); });
const numberOfPerson = computed(() => {
return mentorData.value?.user_selection_ids?.length ?? 0;
});
onMounted(async () => { onMounted(async () => {
mentorData.value = await fetchMentorCompetenceSummary( mentorData.value = await fetchMentorCompetenceSummary(
props.courseId, props.courseId,
@ -79,10 +83,10 @@ const averageGrade = computed(() => {
:details-link="`/statistic/berufsbildner/${props.courseSlug}/assignment`" :details-link="`/statistic/berufsbildner/${props.courseSlug}/assignment`"
/> />
</div> </div>
<MentorMenteeCount <AgentConnectionCount
:course-id="props.courseId" :course-id="props.courseId"
:course-slug="props.courseSlug" :course-slug="props.courseSlug"
:count="mentorData.user_selection_ids.length" :count="numberOfPerson"
:slim="true" :slim="true"
/> />
</div> </div>

View File

@ -5,7 +5,7 @@ import LearningPathDiagram from "@/components/learningPath/LearningPathDiagram.v
import CompetenceSummary from "@/components/dashboard/CompetenceSummary.vue"; import CompetenceSummary from "@/components/dashboard/CompetenceSummary.vue";
import AssignmentSummary from "@/components/dashboard/AssignmentSummary.vue"; import AssignmentSummary from "@/components/dashboard/AssignmentSummary.vue";
import MentorOpenTasksCount from "@/components/dashboard/MentorOpenTasksCount.vue"; import MentorOpenTasksCount from "@/components/dashboard/MentorOpenTasksCount.vue";
import MentorMenteeCount from "@/components/dashboard/MentorMenteeCount.vue"; import AgentConnectionCount from "@/components/dashboard/AgentConnectionCount.vue";
import MentorCompetenceSummary from "@/components/dashboard/MentorCompetenceSummary.vue"; import MentorCompetenceSummary from "@/components/dashboard/MentorCompetenceSummary.vue";
import { getCockpitUrl, getLearningMentorUrl, getLearningPathUrl } from "@/utils/utils"; import { getCockpitUrl, getLearningMentorUrl, getLearningPathUrl } from "@/utils/utils";
import UkStatistics from "@/components/dashboard/UkStatistics.vue"; import UkStatistics from "@/components/dashboard/UkStatistics.vue";
@ -177,7 +177,7 @@ function hasActionButton(): boolean {
v-if="numberOfMentorWidgets > 0" v-if="numberOfMentorWidgets > 0"
class="flex flex-col flex-wrap items-stretch md:flex-row" class="flex flex-col flex-wrap items-stretch md:flex-row"
> >
<MentorMenteeCount <AgentConnectionCount
v-if="hasWidget('MentorPersonWidget')" v-if="hasWidget('MentorPersonWidget')"
:course-id="courseConfig.course_id" :course-id="courseConfig.course_id"
:course-slug="courseConfig?.course_slug" :course-slug="courseConfig?.course_slug"