diff --git a/frontend/src/composables/services/courses.service.ts b/frontend/src/composables/services/courses.service.ts index 8816bf6d..d05f6e53 100644 --- a/frontend/src/composables/services/courses.service.ts +++ b/frontend/src/composables/services/courses.service.ts @@ -4,7 +4,6 @@ import { endpoints } from '@/config/endpoints.ts'; import { get, getList, create, deleteId, getPaginatedList } from '@/composables/services/helpers.ts'; import { type PaginatorResponse } from '@/types/filter/Paginator.ts'; import { type Filter } from '@/types/filter/Filter.ts'; -import { Response } from '@/types/Response.ts'; interface CoursesState { pagination: Ref | null>; @@ -25,7 +24,6 @@ export function useCourses(): CoursesState { const pagination = ref | null>(null); const courses = ref(null); const course = ref(null); - const response = ref(null); async function getCourseByID(id: string): Promise { const endpoint = endpoints.courses.retrieve.replace('{id}', id); diff --git a/frontend/src/views/courses/CreateCourseView.vue b/frontend/src/views/courses/CreateCourseView.vue index 4938bc16..0c5096a6 100644 --- a/frontend/src/views/courses/CreateCourseView.vue +++ b/frontend/src/views/courses/CreateCourseView.vue @@ -70,7 +70,7 @@ const submitCourse = async (): Promise => { }; /* Get the current academic year */ -const currentAcademicYear = () => { +const currentAcademicYear = (): number => { if (new Date().getMonth() < 9) { return new Date().getFullYear() - 1; } else { @@ -104,7 +104,13 @@ const currentAcademicYear = () => {
- +
diff --git a/frontend/src/views/projects/CreateProjectView.vue b/frontend/src/views/projects/CreateProjectView.vue index c0ccbd84..9dc09265 100644 --- a/frontend/src/views/projects/CreateProjectView.vue +++ b/frontend/src/views/projects/CreateProjectView.vue @@ -3,7 +3,6 @@ import Calendar from 'primevue/calendar'; import BaseLayout from '@/components/layout/BaseLayout.vue'; import FileUpload from 'primevue/fileupload'; import Title from '@/components/layout/Title.vue'; -import Tree from 'primevue/tree'; import { reactive, computed } from 'vue'; import { useRouter, useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; @@ -55,16 +54,15 @@ const rules = computed(() => { }); // Function to handle the file upload of a docker script -const onDockerScriptUpload = (event: any) => { +const onDockerScriptUpload = (event: any): void => { form.dockerScript = event.files[0]; }; // Function to handle the file upload of a zip file containing the submission structure -const onZipStructureUpload = (event: any) => { +const onZipStructureUpload = (event: any): void => { form.submissionStructure = event.files[0]; }; - // useVuelidate function to perform form validation const v$ = useVuelidate(rules, form); @@ -88,7 +86,7 @@ const submitProject = async (): Promise => { form.maxScore, form.scoreVisibility, form.groupSize, - form.submissionStructure + form.submissionStructure, ), params.courseId as string, ); @@ -191,13 +189,25 @@ const submitProject = async (): Promise => {
- +
- +
@@ -222,5 +232,4 @@ label { grid-template-columns: 1fr 1fr; gap: 1rem; } -