diff --git a/frontend/src/components/subject/createSubjectView/body/CreateSubjectBody.vue b/frontend/src/components/subject/createSubjectView/body/CreateSubjectBody.vue new file mode 100644 index 00000000..16f3e330 --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/body/CreateSubjectBody.vue @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/frontend/src/components/subject/createSubjectView/body/SubjectInstructorsCard.vue b/frontend/src/components/subject/createSubjectView/body/SubjectInstructorsCard.vue new file mode 100644 index 00000000..b4bdcf64 --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/body/SubjectInstructorsCard.vue @@ -0,0 +1,55 @@ + + + + {{ $t("create_subject.subject_instructors") }} + + + + + {{ instructor.given_name[0] }}. {{ instructor.surname }} + + + + + + + + diff --git a/frontend/src/components/subject/createSubjectView/body/UserSearchCard.vue b/frontend/src/components/subject/createSubjectView/body/UserSearchCard.vue new file mode 100644 index 00000000..3a4bce23 --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/body/UserSearchCard.vue @@ -0,0 +1,45 @@ + + + + {{ $t("create_subject.search_for_instructors") }} + + + + + + + + + + + diff --git a/frontend/src/components/subject/createSubjectView/body/UserSearchList.vue b/frontend/src/components/subject/createSubjectView/body/UserSearchList.vue new file mode 100644 index 00000000..0a75b6d7 --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/body/UserSearchList.vue @@ -0,0 +1,104 @@ + + + + + No results found + + + + + + {{ user.given_name }} {{ user.surname }} + + + + + {{ $t("default.add") }} + + + + + + + + + + + diff --git a/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderCard.vue b/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderCard.vue new file mode 100644 index 00000000..0e7a2676 --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderCard.vue @@ -0,0 +1,142 @@ + + + + {{ $t("create_subject.new_subject") }} + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderContainer.vue b/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderContainer.vue new file mode 100644 index 00000000..d149c68b --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderContainer.vue @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + diff --git a/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderImage.vue b/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderImage.vue new file mode 100644 index 00000000..53f4dad8 --- /dev/null +++ b/frontend/src/components/subject/createSubjectView/header/CreateSubjectHeaderImage.vue @@ -0,0 +1,15 @@ + + + + + + + diff --git a/frontend/src/components/subject/subjectsview/SubjectCard.vue b/frontend/src/components/subject/subjectsview/body/SubjectCard.vue similarity index 93% rename from frontend/src/components/subject/subjectsview/SubjectCard.vue rename to frontend/src/components/subject/subjectsview/body/SubjectCard.vue index 8701fce1..60834f0b 100644 --- a/frontend/src/components/subject/subjectsview/SubjectCard.vue +++ b/frontend/src/components/subject/subjectsview/body/SubjectCard.vue @@ -1,6 +1,6 @@ - + {{ subject?.name }} diff --git a/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue b/frontend/src/components/subject/subjectsview/header/SubjectsHeaderCard.vue similarity index 95% rename from frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue rename to frontend/src/components/subject/subjectsview/header/SubjectsHeaderCard.vue index c70bb20e..bf05ca66 100644 --- a/frontend/src/components/subject/subjectsview/SubjectsHeaderCard.vue +++ b/frontend/src/components/subject/subjectsview/header/SubjectsHeaderCard.vue @@ -7,7 +7,7 @@ - + { font-family: "Poppins", sans-serif; } -.chip_container { +.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/header/SubjectsHeaderContainer.vue similarity index 93% rename from frontend/src/components/subject/subjectsview/SubjectsHeaderContainer.vue rename to frontend/src/components/subject/subjectsview/header/SubjectsHeaderContainer.vue index 6aa0eb17..14fe97fb 100644 --- a/frontend/src/components/subject/subjectsview/SubjectsHeaderContainer.vue +++ b/frontend/src/components/subject/subjectsview/header/SubjectsHeaderContainer.vue @@ -17,8 +17,8 @@ + + diff --git a/frontend/src/views/subject/SubjectView.vue b/frontend/src/views/subject/SubjectView.vue index 2e05df13..fb7cffeb 100644 --- a/frontend/src/views/subject/SubjectView.vue +++ b/frontend/src/views/subject/SubjectView.vue @@ -28,7 +28,7 @@ { const isStudent = computed(() => { return [...(students.value || [])].some((student) => student?.uid === user.value?.uid); }); + +const sortedInstructors = computed(() => { + return [...(instructors.value || [])].sort((a, b) => { + if (a?.is_teacher && !b?.is_teacher) { + return -1; + } else if (!a?.is_teacher && b?.is_teacher) { + return 1; + } else { + return a?.surname.localeCompare(b?.surname); + } + }); +}); + const { isAdmin } = useIsAdmin(); const { isTeacher } = useIsTeacher(); diff --git a/frontend/src/views/subject/SubjectsView.vue b/frontend/src/views/subject/SubjectsView.vue index a5aec499..e15e46ee 100644 --- a/frontend/src/views/subject/SubjectsView.vue +++ b/frontend/src/views/subject/SubjectsView.vue @@ -38,7 +38,7 @@ - + {{ $t("subjects.create_subject") }} @@ -52,8 +52,8 @@
No results found