style: lint en format
This commit is contained in:
parent
128c245779
commit
f971264ce6
4 changed files with 9 additions and 10 deletions
|
@ -15,7 +15,7 @@ export function makeTestClasses(em: EntityManager, students: Student[], teachers
|
|||
});
|
||||
|
||||
const studentsClass02: Student[] = students.slice(0, 2).concat(students.slice(3, 4));
|
||||
const teacherClass02: Teacher[] = teachers.slice(1, 2).concat(teachers.slice(4,5));
|
||||
const teacherClass02: Teacher[] = teachers.slice(1, 2);
|
||||
|
||||
const class02 = em.create(Class, {
|
||||
classId: '34d484a1-295f-4e9f-bfdc-3e7a23d86a89',
|
||||
|
|
|
@ -54,10 +54,9 @@ export class TeacherController extends BaseController {
|
|||
studentUsername: string,
|
||||
accepted: boolean,
|
||||
): Promise<JoinRequestResponse> {
|
||||
return this.put<JoinRequestResponse>(
|
||||
`/${teacherUsername}/joinRequests/${classId}/${studentUsername}`,
|
||||
{accepted},
|
||||
);
|
||||
return this.put<JoinRequestResponse>(`/${teacherUsername}/joinRequests/${classId}/${studentUsername}`, {
|
||||
accepted,
|
||||
});
|
||||
}
|
||||
|
||||
// GetInvitations(id: string) {return this.get<{ invitations: string[] }>(`/${id}/invitations`);}
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
import type { ClassDTO } from "@dwengo-1/common/interfaces/class";
|
||||
import { useRoute } from "vue-router";
|
||||
import { ClassController, type ClassResponse } from "@/controllers/classes";
|
||||
import type { JoinRequestResponse, JoinRequestsResponse, StudentsResponse } from "@/controllers/students";
|
||||
import type { JoinRequestsResponse, StudentsResponse } from "@/controllers/students";
|
||||
import type { StudentDTO } from "@dwengo-1/common/interfaces/student";
|
||||
import { useStudentJoinRequestQuery } from "@/queries/students";
|
||||
import UsingQueryResult from "@/components/UsingQueryResult.vue";
|
||||
import { useTeacherJoinRequestsQuery, useUpdateJoinRequestMutation } from "@/queries/teachers";
|
||||
import type { ClassJoinRequestDTO } from "@dwengo-1/common/interfaces/class-join-request";
|
||||
|
@ -67,7 +66,8 @@
|
|||
//TODO when query; reload table so student not longer in table
|
||||
}
|
||||
|
||||
function handleJoinRequest(c: ClassJoinRequestDTO, accepted: boolean) {
|
||||
// TODO: query + relaoding
|
||||
function handleJoinRequest(c: ClassJoinRequestDTO, accepted: boolean) : void {
|
||||
mutate(
|
||||
{
|
||||
teacherUsername: username.value!,
|
||||
|
@ -80,7 +80,7 @@
|
|||
showSnackbar(t("sent"), "success");
|
||||
},
|
||||
onError: (e) => {
|
||||
// showSnackbar(t("failed") + ": " + e.message, "error");
|
||||
// ShowSnackbar(t("failed") + ": " + e.message, "error");
|
||||
throw e;
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue