From 1683c9cd61d84830cb0c57c4385131c63001c008 Mon Sep 17 00:00:00 2001 From: Bram Meir Date: Tue, 9 Apr 2024 15:25:29 +0200 Subject: [PATCH 1/4] chore: start update course view + based on roles --- frontend/src/assets/lang/en.json | 1 + frontend/src/assets/lang/nl.json | 1 + frontend/src/router/router.ts | 3 +- frontend/src/views/courses/CourseView.vue | 32 ++--- .../src/views/courses/UpdateCourseView.vue | 135 ++++++++++++++++++ .../courses/roles/AssistantCourseView.vue | 34 +++++ .../views/courses/roles/StudentCourseView.vue | 31 +++- .../views/courses/roles/TeacherCourseView.vue | 46 +++++- 8 files changed, 257 insertions(+), 26 deletions(-) create mode 100644 frontend/src/views/courses/UpdateCourseView.vue create mode 100644 frontend/src/views/courses/roles/AssistantCourseView.vue diff --git a/frontend/src/assets/lang/en.json b/frontend/src/assets/lang/en.json index bfea42df..57da3d25 100644 --- a/frontend/src/assets/lang/en.json +++ b/frontend/src/assets/lang/en.json @@ -64,6 +64,7 @@ }, "courses": { "create": "Create course", + "edit": "Edit course", "name": "Course name", "description": "Description", "year": "Academic year" diff --git a/frontend/src/assets/lang/nl.json b/frontend/src/assets/lang/nl.json index 7213b74e..fc968ef8 100644 --- a/frontend/src/assets/lang/nl.json +++ b/frontend/src/assets/lang/nl.json @@ -66,6 +66,7 @@ }, "courses": { "create": "Creƫer vak", + "edit": "Bewerk vak", "name": "Vaknaam", "description": "Beschrijving", "year": "Academiejaar", diff --git a/frontend/src/router/router.ts b/frontend/src/router/router.ts index 0b201eb9..deda535e 100644 --- a/frontend/src/router/router.ts +++ b/frontend/src/router/router.ts @@ -13,6 +13,7 @@ import { AuthenticationGuard } from '@/router/guards/authentication.guard.ts'; import { LogoutGuard } from '@/router/guards/logout.guard.ts'; import ProjectView from '@/views/projects/ProjectView.vue'; import CreateProjectView from '@/views/projects/CreateProjectView.vue'; +import UpdateCourseView from '@/views/courses/UpdateCourseView.vue'; import SearchCourseView from '@/views/courses/SearchCourseView.vue'; import SubmissionView from '@/views/submissions/submissionView.vue'; import SingleProjectView from '@/views/projects/SingleProjectView.vue'; @@ -45,7 +46,7 @@ const routes: RouteRecordRaw[] = [ path: ':courseId', children: [ { path: '', component: CourseView, name: 'course' }, - { path: 'edit', component: Dummy, name: 'course-edit' }, + { path: 'edit', component: UpdateCourseView, name: 'course-edit' }, // Projects { path: 'courseProjects', diff --git a/frontend/src/views/courses/CourseView.vue b/frontend/src/views/courses/CourseView.vue index 13cfdcf9..fff41470 100644 --- a/frontend/src/views/courses/CourseView.vue +++ b/frontend/src/views/courses/CourseView.vue @@ -1,11 +1,16 @@ + +