style: linting en formatting

This commit is contained in:
laurejablonski 2025-04-08 19:34:40 +02:00
parent 39cfcab179
commit d6760445ef
3 changed files with 7 additions and 24 deletions

View file

@ -3,7 +3,6 @@
import authState from "@/services/auth/auth-service.ts"; import authState from "@/services/auth/auth-service.ts";
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import type { ClassDTO } from "@dwengo-1/common/interfaces/class"; import type { ClassDTO } from "@dwengo-1/common/interfaces/class";
import type { TeacherInvitationDTO } from "@dwengo-1/common/interfaces/teacher-invitation";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { ClassController, type ClassResponse } from "@/controllers/classes"; import { ClassController, type ClassResponse } from "@/controllers/classes";
import type { StudentsResponse } from "@/controllers/students"; import type { StudentsResponse } from "@/controllers/students";
@ -46,21 +45,6 @@
const dialog = ref(false); const dialog = ref(false);
const selectedStudent = ref<StudentDTO | null>(null); const selectedStudent = ref<StudentDTO | null>(null);
// TODO: waiting on frontend controllers
const invitations = ref<TeacherInvitationDTO[]>([]);
// Function to handle a accepted invitation request
function acceptRequest(): void {
//TODO > waiting on updated frontend controllers
console.log("request accepted");
}
// Function to handle a denied invitation request
function denyRequest(): void {
//TODO > waiting on frontend controllers
console.log("request denied");
}
function showPopup(s: StudentDTO): void { function showPopup(s: StudentDTO): void {
selectedStudent.value = s; selectedStudent.value = s;
dialog.value = true; dialog.value = true;
@ -68,7 +52,7 @@
// Remove student from class // Remove student from class
function removeStudentFromclass(): void { function removeStudentFromclass(): void {
console.log("student removed"); dialog.value = false;
} }
</script> </script>
<template> <template>

View file

@ -7,7 +7,7 @@
import { useCreateJoinRequestMutation, useStudentClassesQuery } from "@/queries/students"; import { useCreateJoinRequestMutation, useStudentClassesQuery } from "@/queries/students";
import type { StudentDTO } from "@dwengo-1/common/interfaces/student"; import type { StudentDTO } from "@dwengo-1/common/interfaces/student";
import { StudentController } from "@/controllers/students"; import { StudentController } from "@/controllers/students";
import { type TeacherDTO } from "@dwengo-1/common/interfaces/teacher"; import type { TeacherDTO } from "@dwengo-1/common/interfaces/teacher";
import { TeacherController } from "@/controllers/teachers"; import { TeacherController } from "@/controllers/teachers";
const { t } = useI18n(); const { t } = useI18n();
@ -78,7 +78,7 @@
async function openTeacherDialog(c: ClassDTO): Promise<void> { async function openTeacherDialog(c: ClassDTO): Promise<void> {
selectedClass.value = c; selectedClass.value = c;
// clear previous value // Clear previous value
getStudents.value = false; getStudents.value = false;
teachers.value = []; teachers.value = [];
dialog.value = true; dialog.value = true;
@ -88,7 +88,6 @@
c.teachers.map(async (uid) => { c.teachers.map(async (uid) => {
try { try {
const res = await teacherController.getByUsername(uid); const res = await teacherController.getByUsername(uid);
console.log(res);
return res.teacher; return res.teacher;
} catch (_) { } catch (_) {
return null; return null;

View file

@ -49,14 +49,14 @@
// Function to handle a accepted invitation request // Function to handle a accepted invitation request
function acceptRequest(): void { function acceptRequest(): void {
//TODO //TODO: avoid linting issues when merging by filling the function
console.log("request accepted"); invitations.value = [];
} }
// Function to handle a denied invitation request // Function to handle a denied invitation request
function denyRequest(): void { function denyRequest(): void {
//TODO //TODO: avoid linting issues when merging by filling the function
console.log("request denied"); invitations.value = [];
} }
// Teacher should be able to set a displayname when making a class // Teacher should be able to set a displayname when making a class