Rename composable
This commit is contained in:
parent
f4be4e2418
commit
ec1c94b990
|
|
@ -19,7 +19,10 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="summary" class="w-[325px]">
|
<div v-if="summary" class="w-[325px]">
|
||||||
<BaseBox :details-link="'foo'" data-cy="dashboard.mentor.competenceSummary">
|
<BaseBox
|
||||||
|
:details-link="`/dashboard/persons-competence?course=${props.courseId}`"
|
||||||
|
data-cy="dashboard.mentor.competenceSummary"
|
||||||
|
>
|
||||||
<template #title>{{ $t("Kompetenznachweise") }}</template>
|
<template #title>{{ $t("Kompetenznachweise") }}</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="flex flex-row space-x-3 bg-white">
|
<div class="flex flex-row space-x-3 bg-white">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useDashboardPersons } from "@/composables";
|
import { useDashboardPersonsDueDates } from "@/composables";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
||||||
|
|
@ -19,7 +19,7 @@ const props = withDefaults(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const { loading, currentDueDates } = useDashboardPersons();
|
const { loading, currentDueDates } = useDashboardPersonsDueDates();
|
||||||
|
|
||||||
const filteredDueDates = computed(() => {
|
const filteredDueDates = computed(() => {
|
||||||
let dueDates = currentDueDates.value.filter(
|
let dueDates = currentDueDates.value.filter(
|
||||||
|
|
|
||||||
|
|
@ -543,7 +543,9 @@ export function getUkRoleDisplay(role: DashboardPersonRoleType) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useDashboardPersons(mode: DashboardPersonsPageMode = "default") {
|
export function useDashboardPersonsDueDates(
|
||||||
|
mode: DashboardPersonsPageMode = "default"
|
||||||
|
) {
|
||||||
const dashboardPersons = ref<DashboardPersonType[]>([]);
|
const dashboardPersons = ref<DashboardPersonType[]>([]);
|
||||||
const dashboardDueDates = ref<DashboardDueDate[]>([]);
|
const dashboardDueDates = ref<DashboardDueDate[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
@ -633,7 +635,7 @@ export function useMentorTexts() {
|
||||||
try {
|
try {
|
||||||
const is_uk =
|
const is_uk =
|
||||||
useCourseSessionsStore().currentCourseSession?.course.configuration.is_uk;
|
useCourseSessionsStore().currentCourseSession?.course.configuration.is_uk;
|
||||||
const mentorTabTitle = is_uk ? "Praxisbildner" : "a.Lernbegleitung";
|
const mentorTabTitle = is_uk ? "a.Praxisbildner" : "a.Lernbegleitung";
|
||||||
const myLearningMentors = is_uk ? "Meine Praxisbildner" : "Meine Lernbegleiter";
|
const myLearningMentors = is_uk ? "Meine Praxisbildner" : "Meine Lernbegleiter";
|
||||||
const inviteLearningMentor = is_uk
|
const inviteLearningMentor = is_uk
|
||||||
? "Neuen Praxisbildner einladen"
|
? "Neuen Praxisbildner einladen"
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { useDashboardPersons } from "@/composables";
|
import { useDashboardPersonsDueDates } from "@/composables";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import DueDateSingle from "@/components/dueDates/DueDateSingle.vue";
|
import DueDateSingle from "@/components/dueDates/DueDateSingle.vue";
|
||||||
|
|
||||||
log.debug("DashboardAsideWidget created");
|
log.debug("DashboardAsideWidget created");
|
||||||
|
|
||||||
const { loading, dashboardPersons, dashboardDueDates } = useDashboardPersons();
|
const { loading, dashboardPersons, dashboardDueDates } = useDashboardPersonsDueDates();
|
||||||
|
|
||||||
const displayDueDates = computed(() => {
|
const displayDueDates = computed(() => {
|
||||||
return _.take(dashboardDueDates.value, 6);
|
return _.take(dashboardDueDates.value, 6);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { useDashboardPersons } from "@/composables";
|
import { useDashboardPersonsDueDates } from "@/composables";
|
||||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
import { computed, ref, watch } from "vue";
|
import { computed, ref, watch } from "vue";
|
||||||
import { useTranslation } from "i18next-vue";
|
import { useTranslation } from "i18next-vue";
|
||||||
|
|
@ -25,7 +25,7 @@ type CourseItem = DropboxItem & {
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const { loading, currentDueDates: dashboardDueDates } = useDashboardPersons();
|
const { loading, currentDueDates: dashboardDueDates } = useDashboardPersonsDueDates();
|
||||||
|
|
||||||
const courses = computed(() => {
|
const courses = computed(() => {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { useDashboardPersons } from "@/composables";
|
import { useDashboardPersonsDueDates } from "@/composables";
|
||||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
import { computed, ref, watch } from "vue";
|
import { computed, ref, watch } from "vue";
|
||||||
import { useTranslation } from "i18next-vue";
|
import { useTranslation } from "i18next-vue";
|
||||||
|
|
@ -29,7 +29,7 @@ type MenuItem = {
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const { loading, dashboardPersons } = useDashboardPersons(props.mode);
|
const { loading, dashboardPersons } = useDashboardPersonsDueDates(props.mode);
|
||||||
|
|
||||||
const courses = computed(() => {
|
const courses = computed(() => {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue