Merge remote-tracking branch 'origin/feat/endpoints-beschermen-met-authenticatie-#105' into feat/endpoints-beschermen-met-authenticatie-#105
This commit is contained in:
		
						commit
						4925a9bdb7
					
				
					 19 changed files with 26 additions and 26 deletions
				
			
		|  | @ -6,7 +6,7 @@ | |||
|     import type { AnswersResponse } from "@/controllers/answers"; | ||||
|     import type { AnswerData, AnswerDTO } from "@dwengo-1/common/interfaces/answer"; | ||||
|     import authService from "@/services/auth/auth-service"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const props = defineProps<{ | ||||
|         question: QuestionDTO; | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
|     import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg"; | ||||
|     import auth from "@/services/auth/auth-service.ts"; | ||||
|     import { watch } from "vue"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const router = useRouter(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ | |||
|     import type { AssignmentDTO } from "@dwengo-1/common/interfaces/assignment"; | ||||
|     import { useCreateAssignmentMutation } from "@/queries/assignments.ts"; | ||||
|     import { useRoute } from "vue-router"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const route = useRoute(); | ||||
|     const router = useRouter(); | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ | |||
|     import { useGetLearningPathQuery } from "@/queries/learning-paths.ts"; | ||||
|     import type { LearningPath } from "@/data-objects/learning-paths/learning-path.ts"; | ||||
|     import type { GroupDTO } from "@dwengo-1/common/interfaces/group"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const role = auth.authState.activeRole; | ||||
|     const isTeacher = computed(() => role === AccountType.Teacher); | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ | |||
|     import type { ClassDTO } from "@dwengo-1/common/interfaces/class"; | ||||
|     import { asyncComputed } from "@vueuse/core"; | ||||
|     import { useDeleteAssignmentMutation } from "@/queries/assignments.ts"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
|     import "../../assets/common.css"; | ||||
| 
 | ||||
|     const { t, locale } = useI18n(); | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
|     import authState from "@/services/auth/auth-service.ts"; | ||||
|     import TeacherClasses from "./TeacherClasses.vue"; | ||||
|     import StudentClasses from "./StudentClasses.vue"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     // Determine if role is student or teacher to render correct view | ||||
|     const role: string = authState.authState.activeRole!; | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ | |||
|     import type { AssignmentDTO } from "@dwengo-1/common/interfaces/assignment"; | ||||
|     import type { GroupDTO } from "@dwengo-1/common/interfaces/group"; | ||||
|     import QuestionNotification from "@/components/QuestionNotification.vue"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const router = useRouter(); | ||||
|     const route = useRoute(); | ||||
|  | @ -237,7 +237,9 @@ | |||
|                     </template> | ||||
|                 </v-list-item> | ||||
|                 <v-list-itemF | ||||
|                     v-if="query.classId && query.assignmentNo && authService.authState.activeRole === AccountType.Teacher" | ||||
|                     v-if=" | ||||
|                         query.classId && query.assignmentNo && authService.authState.activeRole === AccountType.Teacher | ||||
|                     " | ||||
|                 > | ||||
|                     <template v-slot:default> | ||||
|                         <learning-path-group-selector | ||||
|  | @ -260,7 +262,9 @@ | |||
|                                 :title="node.title" | ||||
|                                 :active="node.key === props.learningObjectHruid" | ||||
|                                 :key="node.key" | ||||
|                                 v-if="!node.teacherExclusive || authService.authState.activeRole === AccountType.Teacher" | ||||
|                                 v-if=" | ||||
|                                     !node.teacherExclusive || authService.authState.activeRole === AccountType.Teacher | ||||
|                                 " | ||||
|                             > | ||||
|                                 <template v-slot:prepend> | ||||
|                                     <v-icon | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ | |||
|     import type { SubmissionData } from "@/views/learning-paths/learning-object/submission-data"; | ||||
|     import LearningObjectContentView from "@/views/learning-paths/learning-object/content/LearningObjectContentView.vue"; | ||||
|     import LearningObjectSubmissionsView from "@/views/learning-paths/learning-object/submissions/LearningObjectSubmissionsView.vue"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const _isStudent = computed(() => authService.authState.activeRole === AccountType.Student); | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,7 +11,7 @@ | |||
|     import type { StudentDTO } from "@dwengo-1/common/interfaces/student"; | ||||
|     import type { GroupDTO } from "@dwengo-1/common/interfaces/group"; | ||||
|     import { useI18n } from "vue-i18n"; | ||||
|     import {AccountType} from "@dwengo-1/common/util/account-types"; | ||||
|     import { AccountType } from "@dwengo-1/common/util/account-types"; | ||||
| 
 | ||||
|     const { t } = useI18n(); | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue
	
	 Gabriellvl
						Gabriellvl