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

View File

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