chore: refactor

This commit is contained in:
Livio Bieri 2024-03-14 12:19:43 +01:00
parent 04d05eb5c5
commit 8fd2234011
16 changed files with 11 additions and 55 deletions

View File

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import EvaluationIntro from "@/components/assignmentEvaluation/EvaluationIntro.vue"; import EvaluationIntro from "@/components/assignment/evaluation/EvaluationIntro.vue";
import EvaluationSummary from "@/components/assignmentEvaluation/EvaluationSummary.vue"; import EvaluationSummary from "@/components/assignment/evaluation/EvaluationSummary.vue";
import EvaluationTask from "@/components/assignmentEvaluation/EvaluationTask.vue"; import EvaluationTask from "@/components/assignment/evaluation/EvaluationTask.vue";
import type { import type {
Assignment, Assignment,
AssignmentCompletion, AssignmentCompletion,

View File

@ -1,6 +1,6 @@
2 2
<script setup lang="ts"> <script setup lang="ts">
import AssignmentSubmissionProgress from "@/components/cockpit/AssignmentSubmissionProgress.vue"; import AssignmentSubmissionProgress from "@/components/assignment/AssignmentSubmissionProgress.vue";
import type { import type {
CourseSession, CourseSession,
LearningContent, LearningContent,
@ -10,7 +10,7 @@ import type {
import log from "loglevel"; import log from "loglevel";
import { computed } from "vue"; import { computed } from "vue";
import { useTranslation } from "i18next-vue"; import { useTranslation } from "i18next-vue";
import FeedbackSubmissionProgress from "@/components/learningMentor/FeedbackSubmissionProgress.vue"; import FeedbackSubmissionProgress from "@/components/selfEvaluationFeedback/FeedbackSubmissionProgress.vue";
import { learningContentTypeData } from "@/utils/typeMaps"; import { learningContentTypeData } from "@/utils/typeMaps";
import { import {
useCourseDataWithCompletion, useCourseDataWithCompletion,

View File

@ -18,7 +18,6 @@ import CoursePreviewBar from "@/components/header/CoursePreviewBar.vue";
import { import {
getCockpitUrl, getCockpitUrl,
getCompetenceNaviUrl, getCompetenceNaviUrl,
getLearningMentorManagementUrl,
getLearningMentorUrl, getLearningMentorUrl,
getLearningPathUrl, getLearningPathUrl,
getMediaCenterUrl, getMediaCenterUrl,
@ -110,26 +109,6 @@ const hasNotificationsMenu = computed(() => {
return userStore.loggedIn; return userStore.loggedIn;
}); });
// FIXME: Will be removed -> WIP
const hasDeprecatedLearningMentor = computed(() => {
if (!inCourse()) {
return false;
}
if (!courseSessionsStore.currentCourseSession) {
return false;
}
const courseSession = courseSessionsStore.currentCourseSession;
const course = courseSession.course;
if (!course.configuration.enable_learning_mentor) {
return false;
}
return courseSession.actions.includes("deprecated-mentor");
});
const hasLearningMentor = computed(() => { const hasLearningMentor = computed(() => {
if (!inCourse()) { if (!inCourse()) {
return false; return false;
@ -275,19 +254,6 @@ const hasLearningMentor = computed(() => {
{{ t("competences.title") }} {{ t("competences.title") }}
</router-link> </router-link>
<router-link
v-if="hasDeprecatedLearningMentor"
data-cy="navigation-learning-mentor-link"
:to="
getLearningMentorManagementUrl(
courseSessionsStore.currentCourseSession.course.slug
)
"
class="nav-item"
:class="{ 'nav-item--active': inLearningMentor() }"
>
{{ t("a.Lernbegleitung") }}🗑
</router-link>
<router-link <router-link
v-if="hasLearningMentor" v-if="hasLearningMentor"
data-cy="navigation-learning-mentor-link" data-cy="navigation-learning-mentor-link"

View File

@ -17,7 +17,7 @@ const currentCourseSession = useCurrentCourseSession();
</div> </div>
<router-link <router-link
:to="{ :to="{
name: 'learningMentorManagement', name: 'learningMentor',
params: { courseSlug: currentCourseSession.course.slug }, params: { courseSlug: currentCourseSession.course.slug },
}" }"
class="btn-blue px-4 py-2 font-bold" class="btn-blue px-4 py-2 font-bold"

View File

@ -13,7 +13,7 @@ import { UPSERT_ASSIGNMENT_COMPLETION_MUTATION } from "@/graphql/mutations";
import type { Assignment } from "@/types"; import type { Assignment } from "@/types";
import DateEmbedding from "@/components/dueDates/DateEmbedding.vue"; import DateEmbedding from "@/components/dueDates/DateEmbedding.vue";
import { useMyLearningMentors } from "@/composables"; import { useMyLearningMentors } from "@/composables";
import NoMentorInformationPanel from "@/components/mentor/NoMentorInformationPanel.vue"; import NoMentorInformationPanel from "@/components/learningMentor/NoMentorInformationPanel.vue";
const props = defineProps<{ const props = defineProps<{
submissionDeadlineStart?: string | null; submissionDeadlineStart?: string | null;

View File

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useCurrentCourseSession } from "@/composables"; import { useCurrentCourseSession } from "@/composables";
import { ASSIGNMENT_COMPLETION_QUERY } from "@/graphql/queries"; import { ASSIGNMENT_COMPLETION_QUERY } from "@/graphql/queries";
import EvaluationContainer from "@/components/assignmentEvaluation/EvaluationContainer.vue"; import EvaluationContainer from "@/components/assignment/evaluation/EvaluationContainer.vue";
import AssignmentSubmissionResponses from "@/pages/learningPath/learningContentPage/assignment/AssignmentSubmissionResponses.vue"; import AssignmentSubmissionResponses from "@/pages/learningPath/learningContentPage/assignment/AssignmentSubmissionResponses.vue";
import type { Assignment, AssignmentCompletion, CourseSessionUser } from "@/types"; import type { Assignment, AssignmentCompletion, CourseSessionUser } from "@/types";
import { useQuery } from "@urql/vue"; import { useQuery } from "@urql/vue";

View File

@ -11,7 +11,7 @@ import type {
} from "@/types"; } from "@/types";
import log from "loglevel"; import log from "loglevel";
import { computed, onMounted, reactive } from "vue"; import { computed, onMounted, reactive } from "vue";
import AssignmentSubmissionProgress from "@/components/cockpit/AssignmentSubmissionProgress.vue"; import AssignmentSubmissionProgress from "@/components/assignment/AssignmentSubmissionProgress.vue";
import { useCourseSessionDetailQuery } from "@/composables"; import { useCourseSessionDetailQuery } from "@/composables";
import { formatDueDate } from "../../../components/dueDates/dueDatesUtils"; import { formatDueDate } from "../../../components/dueDates/dueDatesUtils";
import { stringifyParse } from "@/utils/utils"; import { stringifyParse } from "@/utils/utils";

View File

@ -19,7 +19,7 @@ import * as log from "loglevel";
import { computed, onMounted, ref, watchEffect } from "vue"; import { computed, onMounted, ref, watchEffect } from "vue";
import { useTranslation } from "i18next-vue"; import { useTranslation } from "i18next-vue";
import { learningContentTypeData } from "@/utils/typeMaps"; import { learningContentTypeData } from "@/utils/typeMaps";
import EvaluationSummary from "@/components/assignmentEvaluation/EvaluationSummary.vue"; import EvaluationSummary from "@/components/assignment/evaluation/EvaluationSummary.vue";
import { bustItGetCache } from "@/fetchHelpers"; import { bustItGetCache } from "@/fetchHelpers";
const { t } = useTranslation(); const { t } = useTranslation();

View File

@ -3,7 +3,7 @@ import type { LearningUnit, LearningUnitPerformanceCriteria } from "@/types";
import { useMyLearningMentors } from "@/composables"; import { useMyLearningMentors } from "@/composables";
import { computed, ref } from "vue"; import { computed, ref } from "vue";
import ItButton from "@/components/ui/ItButton.vue"; import ItButton from "@/components/ui/ItButton.vue";
import NoMentorInformationPanel from "@/components/mentor/NoMentorInformationPanel.vue"; import NoMentorInformationPanel from "@/components/learningMentor/NoMentorInformationPanel.vue";
import { useSelfEvaluationFeedback } from "@/services/selfEvaluationFeedback"; import { useSelfEvaluationFeedback } from "@/services/selfEvaluationFeedback";
import FeedbackRequestedInformationPanel from "@/components/selfEvaluationFeedback/FeedbackRequestedInformationPanel.vue"; import FeedbackRequestedInformationPanel from "@/components/selfEvaluationFeedback/FeedbackRequestedInformationPanel.vue";
import FeedbackReceived from "@/components/selfEvaluationFeedback/FeedbackReceived.vue"; import FeedbackReceived from "@/components/selfEvaluationFeedback/FeedbackReceived.vue";

View File

@ -140,12 +140,6 @@ const router = createRouter({
import("../pages/learningPath/learningContentPage/LearningContentPage.vue"), import("../pages/learningPath/learningContentPage/LearningContentPage.vue"),
props: true, props: true,
}, },
{
path: "/course/:courseSlug/mentor",
component: () => import("@/pages/learningMentor/MentorManagementPage.vue"),
props: true,
name: "learningMentorManagement",
},
{ {
path: "/lernbegleitung/:courseId/invitation/:invitationId", path: "/lernbegleitung/:courseId/invitation/:invitationId",
component: () => import("@/pages/learningMentor/InvitationAcceptPage.vue"), component: () => import("@/pages/learningMentor/InvitationAcceptPage.vue"),

View File

@ -37,10 +37,6 @@ export function getCockpitUrl(courseSlug: string | undefined): string {
return createCourseUrl(courseSlug, "cockpit"); return createCourseUrl(courseSlug, "cockpit");
} }
export function getLearningMentorManagementUrl(courseSlug: string | undefined): string {
return createCourseUrl(courseSlug, "mentor");
}
export function getAssignmentTypeTitle(assignmentType: AssignmentType): string { export function getAssignmentTypeTitle(assignmentType: AssignmentType): string {
const { t } = useTranslation(); const { t } = useTranslation();