diff --git a/frontend/Dockerfile.cypress b/frontend/Dockerfile.cypress index 509d7ca1..44476aa0 100644 --- a/frontend/Dockerfile.cypress +++ b/frontend/Dockerfile.cypress @@ -1,4 +1,4 @@ -ARG CHROME_VERSION="114.0.5735.133-1" +ARG CHROME_VERSION="114.0.5735.198-1" ARG NODE_VERSION="18.17.1" FROM cypress/factory diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a3bb206f..6d58f485 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -17,7 +17,6 @@ "moment": "^2.30.1", "msw": "^2.2.13", "pinia": "^2.1.7", - "prettier": "^3.2.5", "primeflex": "^3.3.1", "primeicons": "^7.0.0", "primevue": "^3.52.0", @@ -44,6 +43,7 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-vue": "^9.24.0", "jsdom": "^24.0.0", + "prettier": "^3.2.5", "sass": "^1.72.0", "typescript": "^5.2.2", "vite": "^5.1.1", @@ -6098,6 +6098,7 @@ "version": "3.2.5", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -7185,7 +7186,7 @@ "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/frontend/src/views/courses/CreateCourseView.vue b/frontend/src/views/courses/CreateCourseView.vue index 9994b531..f490dbff 100644 --- a/frontend/src/views/courses/CreateCourseView.vue +++ b/frontend/src/views/courses/CreateCourseView.vue @@ -13,7 +13,7 @@ import { useMessagesStore } from '@/store/messages.store.ts'; /* Composable injections */ const { t } = useI18n(); -const { addSuccessMessage } = useMessagesStore(); +const { addSuccessMessage, addErrorMessage } = useMessagesStore(); const { push } = useRouter(); const { faculties, getFaculties } = useFaculty(); const { createCourse } = useCourses(); @@ -28,11 +28,11 @@ const loading = ref(true); */ async function saveCourse(course: Course): Promise { try { - await createCourse(course); + await createCourse(course, false); addSuccessMessage(t('toasts.messages.success'), t('toasts.messages.courses.create.success', [course.name])); await push({ name: 'dashboard' }); } catch (error: any) { - // TODO error message + addErrorMessage(t('toasts.messages.error'), t('toasts.messages.courses.create.error', [course.name])); } } diff --git a/frontend/src/views/projects/CreateProjectView.vue b/frontend/src/views/projects/CreateProjectView.vue index 0815cd51..162789b4 100644 --- a/frontend/src/views/projects/CreateProjectView.vue +++ b/frontend/src/views/projects/CreateProjectView.vue @@ -42,11 +42,11 @@ const loading = ref(true); async function saveProject(newProject: Project, numberOfGroups: number): Promise { try { if (course.value !== null) { - await createProject(newProject, course.value.id, numberOfGroups); + await createProject(newProject, course.value.id, numberOfGroups, false); if (project.value !== null) { - await setStructureChecks(newProject.structure_checks ?? [], project.value.id); - await setExtraChecks(newProject.extra_checks ?? [], project.value.id); + await setStructureChecks(newProject.structure_checks ?? [], project.value.id, false); + await setExtraChecks(newProject.extra_checks ?? [], project.value.id, false); addSuccessMessage( t('toasts.messages.success'), t('toasts.messages.projects.create.success', [project.value?.name]), @@ -60,7 +60,7 @@ async function saveProject(newProject: Project, numberOfGroups: number): Promise } } } catch (error: any) { - processError(error); + addErrorMessage(t('toasts.messages.error'), t('toasts.messages.projects.create.error', [project.value?.name])); } }