feat: vertalingen
This commit is contained in:
		
							parent
							
								
									a305901bf1
								
							
						
					
					
						commit
						fc1c381fca
					
				
					 5 changed files with 30 additions and 14 deletions
				
			
		|  | @ -84,5 +84,8 @@ | ||||||
|     "yes": "ja", |     "yes": "ja", | ||||||
|     "teachers": "Lehrer", |     "teachers": "Lehrer", | ||||||
|     "rejected": "abgelehnt", |     "rejected": "abgelehnt", | ||||||
|     "accepted": "akzeptiert" |     "accepted": "akzeptiert", | ||||||
|  |     "enterUsername": "Geben Sie den Benutzernamen der Lehrkraft ein, die Sie einladen möchten", | ||||||
|  |     "username": "Nutzername", | ||||||
|  |     "invite": "einladen" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -84,5 +84,8 @@ | ||||||
|     "yes": "yes", |     "yes": "yes", | ||||||
|     "teachers": "teachers", |     "teachers": "teachers", | ||||||
|     "accepted": "accepted", |     "accepted": "accepted", | ||||||
|     "rejected": "rejected" |     "rejected": "rejected", | ||||||
|  |     "enterUsername": "enter the username of the teacher you would like to invite", | ||||||
|  |     "username": "username", | ||||||
|  |     "invite": "invite" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -84,5 +84,8 @@ | ||||||
|     "yes": "oui", |     "yes": "oui", | ||||||
|     "teachers": "enseignants", |     "teachers": "enseignants", | ||||||
|     "accepted": "acceptée", |     "accepted": "acceptée", | ||||||
|     "rejected": "rejetée" |     "rejected": "rejetée", | ||||||
|  |     "enterUsername": "entrez le nom d'utilisateur de l'enseignant que vous souhaitez inviter", | ||||||
|  |     "username": "Nom d'utilisateur", | ||||||
|  |     "invite": "inviter" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -84,5 +84,8 @@ | ||||||
|     "yes": "ja", |     "yes": "ja", | ||||||
|     "teachers": "leerkrachten", |     "teachers": "leerkrachten", | ||||||
|     "accepted": "geaccepteerd", |     "accepted": "geaccepteerd", | ||||||
|     "rejected": "geweigerd" |     "rejected": "geweigerd", | ||||||
|  |     "enterUsername": "vul de gebruikersnaam van de leerkracht die je wilt uitnodigen in", | ||||||
|  |     "username": "gebruikersnaam", | ||||||
|  |     "invite": "uitnodigen" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -10,8 +10,8 @@ | ||||||
|     import { useTeacherJoinRequestsQuery, useUpdateJoinRequestMutation } from "@/queries/teachers"; |     import { useTeacherJoinRequestsQuery, useUpdateJoinRequestMutation } from "@/queries/teachers"; | ||||||
|     import type { ClassJoinRequestDTO } from "@dwengo-1/common/interfaces/class-join-request"; |     import type { ClassJoinRequestDTO } from "@dwengo-1/common/interfaces/class-join-request"; | ||||||
|     import { useClassDeleteStudentMutation, useClassQuery, useClassStudentsQuery } from "@/queries/classes"; |     import { useClassDeleteStudentMutation, useClassQuery, useClassStudentsQuery } from "@/queries/classes"; | ||||||
| import { useCreateTeacherInvitationMutation } from "@/queries/teacher-invitations"; |     import { useCreateTeacherInvitationMutation } from "@/queries/teacher-invitations"; | ||||||
| import type { TeacherInvitationData } from "@dwengo-1/common/interfaces/teacher-invitation"; |     import type { TeacherInvitationData } from "@dwengo-1/common/interfaces/teacher-invitation"; | ||||||
| 
 | 
 | ||||||
|     const { t } = useI18n(); |     const { t } = useI18n(); | ||||||
| 
 | 
 | ||||||
|  | @ -21,7 +21,7 @@ import type { TeacherInvitationData } from "@dwengo-1/common/interfaces/teacher- | ||||||
|     const isLoading = ref(false); |     const isLoading = ref(false); | ||||||
|     const isError = ref(false); |     const isError = ref(false); | ||||||
|     const errorMessage = ref<string>(""); |     const errorMessage = ref<string>(""); | ||||||
|     const usernameTeacher = ref<string|undefined>(undefined); |     const usernameTeacher = ref<string | undefined>(undefined); | ||||||
| 
 | 
 | ||||||
|     // Queries used to access the backend and catch loading or errors |     // Queries used to access the backend and catch loading or errors | ||||||
| 
 | 
 | ||||||
|  | @ -109,19 +109,23 @@ import type { TeacherInvitationData } from "@dwengo-1/common/interfaces/teacher- | ||||||
|         ); |         ); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     function sentInvite(): void{ |     function sentInvite(): void { | ||||||
|         if (!usernameTeacher.value) { |         if (!usernameTeacher.value) { | ||||||
|             showSnackbar(t("please enter a valid username"), "error"); |             showSnackbar(t("please enter a valid username"), "error"); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         const data : TeacherInvitationData = {sender: username.value!, receiver: usernameTeacher.value, class: classId}; |         const data: TeacherInvitationData = { | ||||||
|  |             sender: username.value!, | ||||||
|  |             receiver: usernameTeacher.value, | ||||||
|  |             class: classId, | ||||||
|  |         }; | ||||||
|         sentInviteMutation(data, { |         sentInviteMutation(data, { | ||||||
|             onSuccess: () => { |             onSuccess: () => { | ||||||
|                 usernameTeacher.value = ""; |                 usernameTeacher.value = ""; | ||||||
|             }, |             }, | ||||||
|             onError: (e) => { |             onError: (e) => { | ||||||
|                 showSnackbar(t("failed: " + e.message), "error"); |                 showSnackbar(t("failed") + ": " + e.message, "error"); | ||||||
|             } |             }, | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -251,8 +255,8 @@ import type { TeacherInvitationData } from "@dwengo-1/common/interfaces/teacher- | ||||||
|             </div> |             </div> | ||||||
|             <div> |             <div> | ||||||
|                 <div class="join"> |                 <div class="join"> | ||||||
|                     <h2>{{ t("inviteTeacher") }}</h2> |                     <h2>{{ t("invitations") }}</h2> | ||||||
|                     <p>{{ t("enter the username of the teacher you would like to invite") }}</p> |                     <p>{{ t("enterUsername") }}</p> | ||||||
| 
 | 
 | ||||||
|                     <v-sheet |                     <v-sheet | ||||||
|                         class="pa-4 sheet" |                         class="pa-4 sheet" | ||||||
|  | @ -262,7 +266,7 @@ import type { TeacherInvitationData } from "@dwengo-1/common/interfaces/teacher- | ||||||
|                             <v-text-field |                             <v-text-field | ||||||
|                                 :label="`${t('username')}`" |                                 :label="`${t('username')}`" | ||||||
|                                 v-model="usernameTeacher" |                                 v-model="usernameTeacher" | ||||||
|                                 :placeholder="`${t('enter username')}`" |                                 :placeholder="`${t('username')}`" | ||||||
|                                 variant="outlined" |                                 variant="outlined" | ||||||
|                             ></v-text-field> |                             ></v-text-field> | ||||||
|                             <v-btn |                             <v-btn | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 laurejablonski
						laurejablonski