From 1fb9ec5ba61234ad0faadd7a584aa6a6aba6e424 Mon Sep 17 00:00:00 2001 From: EwoutV Date: Tue, 21 May 2024 21:17:02 +0200 Subject: [PATCH] chore: cleanup --- backend/api/serializers/project_serializer.py | 3 +- frontend/src/assets/lang/app/en.json | 1 + frontend/src/assets/lang/app/nl.json | 1 + frontend/src/components/Loading.vue | 12 +- .../src/components/courses/CourseForm.vue | 60 +++--- .../components/courses/ShareCourseButton.vue | 3 +- .../src/components/projects/ProjectForm.vue | 67 ++++--- .../src/components/projects/ProjectList.vue | 5 +- .../test/unit/services/group_service.test.ts | 2 +- .../unit/services/setup/delete_handlers.ts | 13 +- .../test/unit/services/setup/post_handlers.ts | 13 +- .../unit/services/structure_check.test.ts | 11 +- frontend/src/test/unit/types/group.test.ts | 2 +- frontend/src/test/unit/types/project.test.ts | 2 +- frontend/src/types/ApiResponse.ts | 2 +- frontend/src/types/Course.ts | 8 +- frontend/src/types/DockerImage.ts | 2 +- frontend/src/types/ExtraCheck.ts | 6 +- frontend/src/types/Faculty.ts | 4 +- frontend/src/types/FileExtension.ts | 4 +- frontend/src/types/Group.ts | 6 +- frontend/src/types/Project.ts | 10 +- frontend/src/types/StructureCheck.ts | 6 +- frontend/src/types/SubmisionStatus.ts | 6 +- .../src/types/submission/ExtraCheckResult.ts | 8 +- .../types/submission/StructureCheckResult.ts | 8 +- frontend/src/types/submission/Submission.ts | 30 ++- frontend/src/types/users/Student.ts | 2 +- frontend/src/types/users/Teacher.ts | 4 +- frontend/src/types/users/User.ts | 2 +- frontend/src/views/calendar/CalendarView.vue | 178 +++++++++--------- frontend/src/views/courses/CourseView.vue | 2 +- .../src/views/courses/CreateCourseView.vue | 51 ++++- .../src/views/courses/UpdateCourseView.vue | 61 ++++-- .../courses/roles/AssistantCourseView.vue | 12 +- .../views/courses/roles/StudentCourseView.vue | 36 ++-- .../views/courses/roles/TeacherCourseView.vue | 12 +- .../roles/AssistantDashboardView.vue | 113 ++++++----- .../dashboard/roles/StudentDashboardView.vue | 67 ++++--- .../dashboard/roles/TeacherDashboardView.vue | 146 +++++++------- .../src/views/projects/CreateProjectView.vue | 52 +++-- .../src/views/projects/UpdateProjectView.vue | 78 ++++---- 42 files changed, 614 insertions(+), 497 deletions(-) diff --git a/backend/api/serializers/project_serializer.py b/backend/api/serializers/project_serializer.py index 582a097b..afdfdce4 100644 --- a/backend/api/serializers/project_serializer.py +++ b/backend/api/serializers/project_serializer.py @@ -100,8 +100,7 @@ class ProjectSerializer(serializers.ModelSerializer): ) extra_checks = serializers.HyperlinkedIdentityField( - view_name="project-extra-checks", - read_only=True + view_name="project-extra-checks" ) groups = serializers.HyperlinkedIdentityField( diff --git a/frontend/src/assets/lang/app/en.json b/frontend/src/assets/lang/app/en.json index 5a09df76..bf9b1062 100644 --- a/frontend/src/assets/lang/app/en.json +++ b/frontend/src/assets/lang/app/en.json @@ -107,6 +107,7 @@ "courses": { "create": "Create course", "edit": "Edit course", + "save": "Save course", "clone": "Clone course", "cloneAssistants": "Clone assistants:", "cloneTeachers": "Clone teachers:", diff --git a/frontend/src/assets/lang/app/nl.json b/frontend/src/assets/lang/app/nl.json index c9bcb259..9fc87834 100644 --- a/frontend/src/assets/lang/app/nl.json +++ b/frontend/src/assets/lang/app/nl.json @@ -108,6 +108,7 @@ "courses": { "create": "Creƫer vak", "edit": "Bewerk vak", + "save": "Vak opslaan", "clone": "Kloon vak", "cloneAssistants": "Kloon assistenten:", "cloneTeachers": "Kloon lesgevers:", diff --git a/frontend/src/components/Loading.vue b/frontend/src/components/Loading.vue index 151f7e33..eac23369 100644 --- a/frontend/src/components/Loading.vue +++ b/frontend/src/components/Loading.vue @@ -2,19 +2,17 @@ import ProgressSpinner from 'primevue/progressspinner'; import { useTimeout } from '@vueuse/core'; -withDefaults(defineProps<{height?:string}>(), { - height: '4rem' +withDefaults(defineProps<{ height?: string }>(), { + height: '4rem', }); const show = useTimeout(250); - - + diff --git a/frontend/src/components/courses/CourseForm.vue b/frontend/src/components/courses/CourseForm.vue index d9567e4d..8cf979c1 100644 --- a/frontend/src/components/courses/CourseForm.vue +++ b/frontend/src/components/courses/CourseForm.vue @@ -1,10 +1,7 @@ @@ -120,13 +122,7 @@ onMounted(async () => { -