From a3caff39c2803def7063dd84d07145b2176480d8 Mon Sep 17 00:00:00 2001 From: mattiscauwel Date: Mon, 29 Apr 2024 12:56:47 +0200 Subject: [PATCH 01/68] fixed some skeleton loaders and grid layout --- .../src/components/subjects/SubjectCard.vue | 26 +++++-- .../subjects/SubjectsHeaderCard.vue | 71 ++++++++++++++----- .../subjects/SubjectsHeaderContainer.vue | 6 +- frontend/src/views/SubmitView.vue | 2 +- frontend/src/views/subject/SubjectsView.vue | 16 +++-- 5 files changed, 89 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/subjects/SubjectCard.vue b/frontend/src/components/subjects/SubjectCard.vue index 2e125cf0..3752afdc 100644 --- a/frontend/src/components/subjects/SubjectCard.vue +++ b/frontend/src/components/subjects/SubjectCard.vue @@ -1,7 +1,11 @@ diff --git a/frontend/src/components/subjects/SubjectsHeaderCard.vue b/frontend/src/components/subjects/SubjectsHeaderCard.vue index 4734454b..3e9c0ea3 100644 --- a/frontend/src/components/subjects/SubjectsHeaderCard.vue +++ b/frontend/src/components/subjects/SubjectsHeaderCard.vue @@ -1,42 +1,57 @@ diff --git a/frontend/src/components/subjects/SubjectsHeaderContainer.vue b/frontend/src/components/subjects/SubjectsHeaderContainer.vue index 399c2d3d..754c7881 100644 --- a/frontend/src/components/subjects/SubjectsHeaderContainer.vue +++ b/frontend/src/components/subjects/SubjectsHeaderContainer.vue @@ -1,5 +1,9 @@ - + + + From 3269564b20fb8a3192aa1d15d328a39ee92be198 Mon Sep 17 00:00:00 2001 From: mattiscauwel Date: Mon, 29 Apr 2024 14:18:34 +0200 Subject: [PATCH 02/68] fixed scrolling --- .../body/projects/SubjectProjectPage.vue | 2 +- .../projects/list/SubjectProjectsList.vue | 11 ++-- .../subject/header/SubjectHeaderContainer.vue | 2 +- .../subject/header/SubjectHeaderImage.vue | 7 +-- .../subjects/SubjectsHeaderCard.vue | 8 --- .../subjects/SubjectsHeaderContainer.vue | 10 +++- .../views/subject/CreatePatchSubjectView.vue | 12 ++++ frontend/src/views/subject/SubjectView.vue | 59 +++++++++++-------- frontend/src/views/subject/SubjectsView.vue | 8 +-- 9 files changed, 72 insertions(+), 47 deletions(-) create mode 100644 frontend/src/views/subject/CreatePatchSubjectView.vue diff --git a/frontend/src/components/subject/body/projects/SubjectProjectPage.vue b/frontend/src/components/subject/body/projects/SubjectProjectPage.vue index 84d96ea7..323c6183 100644 --- a/frontend/src/components/subject/body/projects/SubjectProjectPage.vue +++ b/frontend/src/components/subject/body/projects/SubjectProjectPage.vue @@ -119,7 +119,7 @@ const assignmentLength = 100; .project-container { overflow: auto; - max-height: 400px; + max-height: 55vh; scrollbar-width: none; /* For Firefox */ } diff --git a/frontend/src/components/subject/body/projects/list/SubjectProjectsList.vue b/frontend/src/components/subject/body/projects/list/SubjectProjectsList.vue index 7893885a..b4d61113 100644 --- a/frontend/src/components/subject/body/projects/list/SubjectProjectsList.vue +++ b/frontend/src/components/subject/body/projects/list/SubjectProjectsList.vue @@ -1,5 +1,5 @@ - From a2b6c92d8b6f19e1a4836c713f684cf89ad1359d Mon Sep 17 00:00:00 2001 From: mattiscauwel Date: Mon, 29 Apr 2024 14:47:06 +0200 Subject: [PATCH 03/68] changed color of project card and fixed title router link --- .../body/projects/SubjectProjectPage.vue | 59 ++++++++++++------- .../subject/header/SubjectHeaderCard.vue | 2 +- .../subject/header/SubjectHeaderImage.vue | 2 +- frontend/src/views/subject/SubjectView.vue | 9 ++- 4 files changed, 48 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/subject/body/projects/SubjectProjectPage.vue b/frontend/src/components/subject/body/projects/SubjectProjectPage.vue index 323c6183..1be15497 100644 --- a/frontend/src/components/subject/body/projects/SubjectProjectPage.vue +++ b/frontend/src/components/subject/body/projects/SubjectProjectPage.vue @@ -1,24 +1,24 @@ @@ -92,28 +92,47 @@ const assignmentLength = 100; margin-bottom: 10px; } +.router { + text-decoration: none; + color: inherit; +} +.deadline { + color: #181818; +} + .colored-zone { position: absolute; top: 0; left: 0; width: 100%; height: 80px; /* Adjust the height as needed */ - background-color: #eafbff; /* Desired background color */ + background-color: var(--color-primary); /* Desired background color */ border-radius: 20px 20px 0 0; /* Rounded corners for top half */ z-index: -1; /* Ensure the colored zone is behind the card content */ } .title { - font-size: 28px; + font-size: 30px; + letter-spacing: -0.5px; + font-weight: bold; + margin-bottom: 20px; + font-family: "Poppins", sans-serif; + color: white; + text-transform: capitalize; +} + +.card_title { + font-size: 24px; text-transform: capitalize; display: block; line-height: 1.2; font-weight: 500; + color: black; } .chevron { margin-right: 10px; - color: black; + color: white; display: block; } diff --git a/frontend/src/components/subject/header/SubjectHeaderCard.vue b/frontend/src/components/subject/header/SubjectHeaderCard.vue index e368af31..deebd003 100644 --- a/frontend/src/components/subject/header/SubjectHeaderCard.vue +++ b/frontend/src/components/subject/header/SubjectHeaderCard.vue @@ -1,6 +1,6 @@ ; diff --git a/frontend/src/views/subject/SubjectsView.vue b/frontend/src/views/subject/SubjectsView.vue index cf46828a..205cba56 100644 --- a/frontend/src/views/subject/SubjectsView.vue +++ b/frontend/src/views/subject/SubjectsView.vue @@ -2,24 +2,37 @@

Error: {{ error }}

+ + + + + + + + + + + + + + + + + +
+ + + Create subject + + +
+
+
- - - - - - - - - - - - - ; diff --git a/frontend/src/views/subject/SubjectView.vue b/frontend/src/views/subject/SubjectView.vue index 90392ed9..16f18617 100644 --- a/frontend/src/views/subject/SubjectView.vue +++ b/frontend/src/views/subject/SubjectView.vue @@ -10,7 +10,7 @@ timeout="3000" color="primary" > - Register link copied to clipboard. + {{ $t("subject.register_link_button.snackbar")}} @@ -29,11 +30,7 @@ const emit = defineEmits<{ const onAcademicYearChanged = (academicYear: number) => { emit("academic-year-changed", academicYear); -} - +}; - + diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 0976c18f..c5859ecf 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -88,8 +88,9 @@ export default { register_link_button: { title: "Register link", snackbar: "Register link copied to clipboard.", - tooltip: "Copy register link for this subject, this can be shared with students to register for the subject." - } + tooltip: + "Copy register link for this subject, this can be shared with students to register for the subject.", + }, }, subjects: { title: "My Subjects", diff --git a/frontend/src/i18n/locales/nl.ts b/frontend/src/i18n/locales/nl.ts index dc9f4ed7..25f85145 100644 --- a/frontend/src/i18n/locales/nl.ts +++ b/frontend/src/i18n/locales/nl.ts @@ -88,7 +88,8 @@ export default { register_link_button: { title: "Registreer link", snackbar: "Registreer link gekopieerd naar klembord.", - tooltip: "Kopieer de registreer link voor dit vak, deze kan gedeeld worden met studenten om zich te registreren voor het vak.", + tooltip: + "Kopieer de registreer link voor dit vak, deze kan gedeeld worden met studenten om zich te registreren voor het vak.", }, }, diff --git a/frontend/src/queries/Subject.ts b/frontend/src/queries/Subject.ts index db01b78c..9103eea1 100644 --- a/frontend/src/queries/Subject.ts +++ b/frontend/src/queries/Subject.ts @@ -1,4 +1,4 @@ -import {useQuery, type UseQueryReturnType} from "@tanstack/vue-query"; +import { useQuery, type UseQueryReturnType } from "@tanstack/vue-query"; import { getSubject, getSubjectInstructors, @@ -6,9 +6,10 @@ import { getSubjects, getSubjectStudents, getSubjectByUuid, - registerToSubject, getSubjectUuid, + registerToSubject, + getSubjectUuid, } from "@/services/subject"; -import {type Ref, computed} from "vue"; +import { type Ref, computed } from "vue"; import type Subject from "@/models/Subject"; import type User from "@/models/User"; import type Project from "@/models/Project"; @@ -80,7 +81,7 @@ export function useSubjectDetailsQuery( getSubjectInstructors(subjectId.value!), getSubjectStudents(subjectId.value!), getSubjectProjects(subjectId.value!), - getSubjectUuid(subjectId.value!) + getSubjectUuid(subjectId.value!), ])) as [Subject, User[], User[], Project[], string]; return { @@ -113,4 +114,3 @@ export function registerSubjectQuery(uuid: Ref): UseQueryReturnType false, }); } - diff --git a/frontend/src/views/SubmitView.vue b/frontend/src/views/SubmitView.vue index 8c6a611e..4fbdd550 100644 --- a/frontend/src/views/SubmitView.vue +++ b/frontend/src/views/SubmitView.vue @@ -1,4 +1,4 @@ - @@ -49,7 +47,6 @@ import { ref, watch } from "vue"; const props = defineProps<{ projects: Project[]; selectedTab: number; - isLoading: boolean; }>(); const selectedTab = ref(props.selectedTab); diff --git a/frontend/src/components/subject/header/SubjectHeaderCard.vue b/frontend/src/components/subject/header/SubjectHeaderCard.vue index 25f6befc..fa60de85 100644 --- a/frontend/src/components/subject/header/SubjectHeaderCard.vue +++ b/frontend/src/components/subject/header/SubjectHeaderCard.vue @@ -1,35 +1,33 @@ @@ -41,7 +39,6 @@ defineProps<{ title: string; academicYear: number; instructors: User[]; - isLoading: boolean; isInstructor: boolean; }>(); diff --git a/frontend/src/components/subject/header/SubjectHeaderContainer.vue b/frontend/src/components/subject/header/SubjectHeaderContainer.vue index 118d24c3..f20b3f78 100644 --- a/frontend/src/components/subject/header/SubjectHeaderContainer.vue +++ b/frontend/src/components/subject/header/SubjectHeaderContainer.vue @@ -8,7 +8,6 @@ :title="title" :academic-year="academicYear" :instructors="instructors" - :is-loading="isLoading" :is-instructor="isInstructor" > @@ -25,7 +24,6 @@ defineProps<{ title: string; academicYear: number; instructors: User[]; - isLoading: boolean; imagePath: string; isInstructor: boolean; }>(); diff --git a/frontend/src/components/subjects/SubjectCard.vue b/frontend/src/components/subjects/SubjectCard.vue index 962b149f..e7e186fb 100644 --- a/frontend/src/components/subjects/SubjectCard.vue +++ b/frontend/src/components/subjects/SubjectCard.vue @@ -1,26 +1,21 @@ @@ -53,5 +47,4 @@ defineProps<{ .subject-title { color: white; } - diff --git a/frontend/src/components/subjects/SubjectsHeaderCard.vue b/frontend/src/components/subjects/SubjectsHeaderCard.vue index a7ad6ee8..c9521698 100644 --- a/frontend/src/components/subjects/SubjectsHeaderCard.vue +++ b/frontend/src/components/subjects/SubjectsHeaderCard.vue @@ -1,34 +1,32 @@ - - diff --git a/frontend/src/components/subjects/SubjectCard.vue b/frontend/src/components/subject/subjectsview/SubjectCard.vue similarity index 79% rename from frontend/src/components/subjects/SubjectCard.vue rename to frontend/src/components/subject/subjectsview/SubjectCard.vue index e7e186fb..6a2a61e8 100644 --- a/frontend/src/components/subjects/SubjectCard.vue +++ b/frontend/src/components/subject/subjectsview/SubjectCard.vue @@ -9,6 +9,14 @@ aspect-ratio="16/9" height="120px" > + + + mdi-account-tie + {{ subject?.name }} mdi-chevron-right @@ -47,4 +55,10 @@ defineProps<{ .subject-title { color: white; } + +.subject-icon { + position: absolute; + top: 10px; + right: 15px; +} diff --git a/frontend/src/components/subjects/SubjectsHeaderCard.vue b/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue similarity index 73% rename from frontend/src/components/subjects/SubjectsHeaderCard.vue rename to frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue index 6cc3dd0c..ed307faf 100644 --- a/frontend/src/components/subjects/SubjectsHeaderCard.vue +++ b/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue @@ -23,19 +23,35 @@ + + + instructor vakken + + + student vakken + + + + diff --git a/frontend/src/views/subject/SubjectView.vue b/frontend/src/views/subject/SubjectView.vue index 3abf52a0..e2e89dbd 100644 --- a/frontend/src/views/subject/SubjectView.vue +++ b/frontend/src/views/subject/SubjectView.vue @@ -65,8 +65,8 @@ import { computed, ref, toRefs } from "vue"; import { useSubjectDetailsQuery } from "@/queries/Subject"; import BackgroundContainer from "@/components/BackgroundContainer.vue"; -import SubjectHeaderContainer from "@/components/subject/header/SubjectHeaderContainer.vue"; -import SubjectBody from "@/components/subject/body/SubjectBody.vue"; +import SubjectHeaderContainer from "@/components/subject/subjectview/header/SubjectHeaderContainer.vue"; +import SubjectBody from "@/components/subject/subjectview/body/SubjectBody.vue"; import { useRouter } from "vue-router"; import { useUserQuery } from "@/queries/User"; diff --git a/frontend/src/views/subject/SubjectsView.vue b/frontend/src/views/subject/SubjectsView.vue index 73137bb7..38f0d082 100644 --- a/frontend/src/views/subject/SubjectsView.vue +++ b/frontend/src/views/subject/SubjectsView.vue @@ -42,13 +42,15 @@ + + diff --git a/frontend/src/components/subject/subjectsview/SubjectCard.vue b/frontend/src/components/subject/subjectsview/SubjectCard.vue index 6a2a61e8..cf557cce 100644 --- a/frontend/src/components/subject/subjectsview/SubjectCard.vue +++ b/frontend/src/components/subject/subjectsview/SubjectCard.vue @@ -9,14 +9,11 @@ aspect-ratio="16/9" height="120px" > - - - mdi-account-tie - + > {{ subject?.name }} mdi-chevron-right @@ -28,16 +25,18 @@ diff --git a/frontend/src/components/subject/subjectview/header/SubjectHeaderImage.vue b/frontend/src/components/subject/subjectview/header/SubjectHeaderImage.vue index dbda4f75..9d74fb28 100644 --- a/frontend/src/components/subject/subjectview/header/SubjectHeaderImage.vue +++ b/frontend/src/components/subject/subjectview/header/SubjectHeaderImage.vue @@ -6,20 +6,24 @@ :src="imagePath" class="header-img" > - - mdi-school - + > From d2fe9fdc2ec37fc5a1176612e5c9b1180dce3416 Mon Sep 17 00:00:00 2001 From: mattiscauwel Date: Thu, 16 May 2024 18:20:59 +0200 Subject: [PATCH 35/68] deleted tooltip + last refactoring before pull request --- .../subjectsview/SubjectsHeaderCard.vue | 25 ++++++++++++------- .../subjectsview/SubjectsHeaderContainer.vue | 2 +- frontend/src/i18n/locales/en.ts | 2 ++ frontend/src/i18n/locales/nl.ts | 2 ++ frontend/src/views/subject/SubjectView.vue | 3 --- frontend/src/views/subject/SubjectsView.vue | 2 +- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue b/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue index ed307faf..aefc0421 100644 --- a/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue +++ b/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue @@ -23,19 +23,17 @@ - + - instructor vakken - + :label="$t('subjects.instructor_subjects')" + > - student vakken - + :label="$t('subjects.student_subjects')" + > @@ -82,4 +80,13 @@ watch(activeAcademicYear, (newVal: number | undefined) => { .chip_container { overflow-x: auto; } + +.checkbox container { + display: flex; + justify-content: flex-end; +} + +.subject-checkbox { + margin-top: -15px; +} diff --git a/frontend/src/components/subject/subjectsview/SubjectsHeaderContainer.vue b/frontend/src/components/subject/subjectsview/SubjectsHeaderContainer.vue index d10e47ed..0506bc68 100644 --- a/frontend/src/components/subject/subjectsview/SubjectsHeaderContainer.vue +++ b/frontend/src/components/subject/subjectsview/SubjectsHeaderContainer.vue @@ -1,6 +1,6 @@