From ddd7546cd61e3436354ce19c4aaba5971ef5c193 Mon Sep 17 00:00:00 2001 From: Bram Meir Date: Tue, 16 Apr 2024 13:59:12 +0200 Subject: [PATCH] fix: fixes pr --- .../api/management/commands/make_assistant.py | 2 +- frontend/src/components/TooltipHover.vue | 45 ------------------- frontend/src/main.ts | 3 ++ .../courses/roles/AssistantCourseView.vue | 5 +-- .../views/courses/roles/TeacherCourseView.vue | 17 ++++--- 5 files changed, 14 insertions(+), 58 deletions(-) delete mode 100644 frontend/src/components/TooltipHover.vue diff --git a/backend/api/management/commands/make_assistant.py b/backend/api/management/commands/make_assistant.py index 47a4891b..84de6aa0 100644 --- a/backend/api/management/commands/make_assistant.py +++ b/backend/api/management/commands/make_assistant.py @@ -19,6 +19,6 @@ def handle(self, *args, **options): return user = user.get() - Assistant(user_ptr=user).save_base(raw=True) + Assistant.create(user) self.stdout.write(self.style.SUCCESS('Successfully made the user assistant!')) diff --git a/frontend/src/components/TooltipHover.vue b/frontend/src/components/TooltipHover.vue deleted file mode 100644 index 3e7e9a11..00000000 --- a/frontend/src/components/TooltipHover.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/frontend/src/main.ts b/frontend/src/main.ts index d81a2ddf..4853a2df 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -4,6 +4,7 @@ import PrimeVue from 'primevue/config'; import ToastService from 'primevue/toastservice'; import ConfirmationService from 'primevue/confirmationservice'; import Ripple from 'primevue/ripple'; +import Tooltip from 'primevue/tooltip'; import { i18n } from '@/config/i18n.ts'; import { createApp } from 'vue'; import { createPinia } from 'pinia'; @@ -22,6 +23,8 @@ app.use(ConfirmationService); /* Bind app directives */ app.directive('ripple', Ripple); +app.directive('tooltip', Tooltip); + /* Mount the application */ app.mount('#app'); diff --git a/frontend/src/views/courses/roles/AssistantCourseView.vue b/frontend/src/views/courses/roles/AssistantCourseView.vue index 7921b19d..a3fd2a4a 100644 --- a/frontend/src/views/courses/roles/AssistantCourseView.vue +++ b/frontend/src/views/courses/roles/AssistantCourseView.vue @@ -2,7 +2,6 @@ import Title from '@/components/layout/Title.vue'; import ProjectList from '@/components/projects/ProjectList.vue'; import TeacherAssistantList from '@/components/teachers_assistants/TeacherAssistantList.vue'; -import TooltipHover from '@/components/TooltipHover.vue'; import { type Course } from '@/types/Course.ts'; import { useI18n } from 'vue-i18n'; import ProjectCreateButton from '@/components/projects/ProjectCreateButton.vue'; @@ -30,9 +29,9 @@ const { t } = useI18n(); {{ t('views.dashboard.projects') }} - +
- +
diff --git a/frontend/src/views/courses/roles/TeacherCourseView.vue b/frontend/src/views/courses/roles/TeacherCourseView.vue index 115d389b..25bd58fc 100644 --- a/frontend/src/views/courses/roles/TeacherCourseView.vue +++ b/frontend/src/views/courses/roles/TeacherCourseView.vue @@ -2,7 +2,6 @@ import Title from '@/components/layout/Title.vue'; import ProjectList from '@/components/projects/ProjectList.vue'; import TeacherAssistantList from '@/components/teachers_assistants/TeacherAssistantList.vue'; -import TooltipHover from '@/components/TooltipHover.vue'; import Button from 'primevue/button'; import ButtonGroup from 'primevue/buttongroup'; import InputSwitch from 'primevue/inputswitch'; @@ -53,7 +52,7 @@ const handleClone = async (): Promise => { - +
- +