Skip to content

Commit

Permalink
fix: fixes pr
Browse files Browse the repository at this point in the history
  • Loading branch information
BramMeir committed Apr 16, 2024
1 parent d4bec4b commit ddd7546
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 58 deletions.
2 changes: 1 addition & 1 deletion backend/api/management/commands/make_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!'))
45 changes: 0 additions & 45 deletions frontend/src/components/TooltipHover.vue

This file was deleted.

3 changes: 3 additions & 0 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -22,6 +23,8 @@ app.use(ConfirmationService);

/* Bind app directives */
app.directive('ripple', Ripple);
app.directive('tooltip', Tooltip);


/* Mount the application */
app.mount('#app');
5 changes: 2 additions & 3 deletions frontend/src/views/courses/roles/AssistantCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -30,9 +29,9 @@ const { t } = useI18n();
<Title class="m-0">{{ t('views.dashboard.projects') }}</Title>

<!-- Create project button -->
<TooltipHover text="views.projects.create">
<div v-tooltip.top="t('views.projects.create')">
<ProjectCreateButton :courses="[props.course]" />
</TooltipHover>
</div>
</div>
<!-- Project list body -->
<ProjectList :courses="[course]" />
Expand Down
17 changes: 8 additions & 9 deletions frontend/src/views/courses/roles/TeacherCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -53,7 +52,7 @@ const handleClone = async (): Promise<void> => {

<ButtonGroup class="flex align-items-center space-x-2">
<!-- Update course button -->
<TooltipHover text="views.courses.edit">
<div v-tooltip.top="t('views.courses.edit')">
<RouterLink :to="{ name: 'course-edit', params: { courseId: props.course.id } }">
<Button
:icon="PrimeIcons.PENCIL"
Expand All @@ -62,10 +61,10 @@ const handleClone = async (): Promise<void> => {
style="height: 51px; width: 51px; margin-right: 10px"
/>
</RouterLink>
</TooltipHover>
</div>

<!-- Clone button to clone the course -->
<TooltipHover text="views.courses.clone">
<div v-tooltip.top="t('views.courses.clone')">
<ConfirmDialog>
<template #container="{ message, acceptCallback, rejectCallback }">
<div class="flex flex-column p-5 surface-overlay border-round" style="max-width: 600px">
Expand Down Expand Up @@ -95,7 +94,7 @@ const handleClone = async (): Promise<void> => {
style="height: 51px; width: 51px"
@click="handleClone()"
/>
</TooltipHover>
</div>
</ButtonGroup>
</div>
<!-- Description -->
Expand All @@ -106,9 +105,9 @@ const handleClone = async (): Promise<void> => {
<Title class="m-0">{{ t('views.dashboard.projects') }}</Title>

<!-- Create project button -->
<TooltipHover text="views.projects.create">
<div v-tooltip.top="t('views.projects.create')">
<ProjectCreateButton :courses="[props.course]" />
</TooltipHover>
</div>
</div>
<!-- Project list body -->
<ProjectList :courses="[course]" />
Expand All @@ -117,9 +116,9 @@ const handleClone = async (): Promise<void> => {
<div class="flex justify-content-between align-items-center my-6">
<Title class="m-0">{{ t('views.courses.teachers_and_assistants.title') }}</Title>

<TooltipHover text="views.courses.teachers_and_assistants.edit">
<div v-tooltip.top="t('views.courses.teachers_and_assistants.edit')">
<TeacherAssistantUpdateButton :course="props.course" />
</TooltipHover>
</div>
</div>
<!-- List with teachers and assistants -->
<TeacherAssistantList :course="props.course" :users="course.teachers.concat(course.assistants)" />
Expand Down

0 comments on commit ddd7546

Please sign in to comment.