style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-05-20 06:59:10 +00:00
parent f9b74c5f2d
commit 23d29f4a3c

View file

@ -1,20 +1,20 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, type ComputedRef, ref, watchEffect } from 'vue'; import { computed, type ComputedRef, ref, watchEffect } from "vue";
import auth from '@/services/auth/auth-service.ts'; import auth from "@/services/auth/auth-service.ts";
import { useI18n } from 'vue-i18n'; import { useI18n } from "vue-i18n";
import UsingQueryResult from '@/components/UsingQueryResult.vue'; import UsingQueryResult from "@/components/UsingQueryResult.vue";
import { asyncComputed } from '@vueuse/core'; import { asyncComputed } from "@vueuse/core";
import { useStudentsByUsernamesQuery } from '@/queries/students.ts'; import { useStudentsByUsernamesQuery } from "@/queries/students.ts";
import { useGetLearningPathQuery } from '@/queries/learning-paths.ts'; import { useGetLearningPathQuery } from "@/queries/learning-paths.ts";
import type { Language } from '@/data-objects/language.ts'; import type { Language } from "@/data-objects/language.ts";
import { calculateProgress } from '@/utils/assignment-utils.ts'; import { calculateProgress } from "@/utils/assignment-utils.ts";
import type { LearningPath } from '@/data-objects/learning-paths/learning-path.ts'; import type { LearningPath } from "@/data-objects/learning-paths/learning-path.ts";
import type { GroupDTO } from '@dwengo-1/common/interfaces/group'; import type { GroupDTO } from "@dwengo-1/common/interfaces/group";
import { useAssignmentQuery } from '@/queries/assignments.ts'; import { useAssignmentQuery } from "@/queries/assignments.ts";
import type { AssignmentDTO } from '@dwengo-1/common/interfaces/assignment'; import type { AssignmentDTO } from "@dwengo-1/common/interfaces/assignment";
import type { StudentDTO } from '@dwengo-1/common/interfaces/student'; import type { StudentDTO } from "@dwengo-1/common/interfaces/student";
const props = defineProps<{ const props = defineProps<{
classId: string; classId: string;
assignmentId: number; assignmentId: number;
}>(); }>();
@ -30,7 +30,9 @@ const props = defineProps<{
const assignmentQueryResult = useAssignmentQuery(props.classId, props.assignmentId); const assignmentQueryResult = useAssignmentQuery(props.classId, props.assignmentId);
const assignment: ComputedRef<AssignmentDTO | undefined> = computed(() => assignmentQueryResult.data.value?.assignment); const assignment: ComputedRef<AssignmentDTO | undefined> = computed(
() => assignmentQueryResult.data.value?.assignment,
);
learningPath.value = assignment.value?.learningPath; learningPath.value = assignment.value?.learningPath;
@ -42,8 +44,8 @@ const props = defineProps<{
// To "normalize" the group numbers, sort the groups and then renumber them // To "normalize" the group numbers, sort the groups and then renumber them
const renumbered = [...groups] const renumbered = [...groups]
.sort((a, b) => a.groupNumber - b.groupNumber) .sort((a, b) => a.groupNumber - b.groupNumber)
.map((group, index) => ({ ...group, groupNo: index + 1})); .map((group, index) => ({ ...group, groupNo: index + 1 }));
return renumbered .find((group) => group.members?.some((m) => (m as StudentDTO).username === username.value)); return renumbered.find((group) => group.members?.some((m) => (m as StudentDTO).username === username.value));
}); });
watchEffect(() => { watchEffect(() => {