| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | <script setup> | 
					
						
							|  |  |  | import i18n from "@/i18n.js" | 
					
						
							| 
									
										
										
										
											2024-04-11 21:06:57 +02:00
										 |  |  | import {getSelf, getUser} from '../../rest/Users.js' | 
					
						
							| 
									
										
										
										
											2024-04-10 23:09:38 +02:00
										 |  |  | import {getcurriculum,getSomeonesCurriculumList} from "@/rest/curriculum.js"; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | import {getRegisters} from "@/rest/ServiceInscription.js"; | 
					
						
							| 
									
										
										
										
											2024-04-06 16:12:11 +02:00
										 |  |  | import {get} from "jsdom/lib/jsdom/named-properties-tracker.js"; | 
					
						
							| 
									
										
										
										
											2024-04-10 23:09:38 +02:00
										 |  |  | import {getExternalCurriculumByInscrReq} from "@/rest/externalCurriculum.js"; | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  | import {ref} from "vue"; | 
					
						
							| 
									
										
										
										
											2024-04-11 21:06:57 +02:00
										 |  |  | import ExternalCurriculumList from "@/Apps/Inscription/ExternalCurriculumList.vue"; | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  | import {editEquivalenceState} from "@/rest/requests.js"; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | const props = defineProps(['target']); | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  | const request = await getRegisters(props.target); | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | const cursus = await getcurriculum(request.curriculum); | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  | const user = await getSelf(); | 
					
						
							|  |  |  | const list = ref(false); | 
					
						
							| 
									
										
										
										
											2024-04-10 23:09:38 +02:00
										 |  |  | const externalCurriculum = await getExternalCurriculumByInscrReq(request.id) | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | function getPP(){ | 
					
						
							| 
									
										
										
										
											2024-03-29 10:55:59 +01:00
										 |  |  |   if(request.profilePictureUrl === null){ | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |     return "/Clyde.png" | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2024-03-29 10:55:59 +01:00
										 |  |  |   return request.profilePictureUrl; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | async function editEquivalence(id, newstate){ | 
					
						
							|  |  |  |   await editEquivalenceState(id, newstate) | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <template> | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  |   <div class="body" v-if="list == false"> | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |     <div class="container"> | 
					
						
							|  |  |  |       <div class="profilPic"> | 
					
						
							|  |  |  |         <img class="subContainter" :src=getPP()> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <div class = "globalInfos"> | 
					
						
							|  |  |  |         <div class="infosContainer"> | 
					
						
							|  |  |  |           <div> | 
					
						
							|  |  |  |             FirstName/Name : {{request.firstName}} {{request.lastName}} | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |           <div> | 
					
						
							|  |  |  |             E-mail: {{request.email}} | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |           <div> | 
					
						
							|  |  |  |             Adresse : {{request.address}} | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |           <div> | 
					
						
							|  |  |  |             Pays : {{request.country}} | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |           <div> | 
					
						
							|  |  |  |             Date de naissance : {{request.birthDate}} | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |           <div> | 
					
						
							|  |  |  |             Cursus voulu : BAB {{cursus.year}} {{cursus.option}} | 
					
						
							|  |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  |           <div v-if="cursus.year > 1"> | 
					
						
							|  |  |  |             <button style="background-color:rgb(105,05,105);margin-left: 5%" @click="list=!list" v-if="(user.role == 'Teacher' || user.role == 'Admin')&& request.equivalenceState == 'Pending'">See external curriculums</button> | 
					
						
							| 
									
										
										
										
											2024-04-06 16:12:11 +02:00
										 |  |  |           </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |     </div> | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  |   <div v-if="list==true"> | 
					
						
							|  |  |  |     <ExternalCurriculumList :ext-curr-list="externalCurriculum" :inscr-req-id="request.id"></ExternalCurriculumList> | 
					
						
							| 
									
										
										
										
											2024-04-11 21:06:57 +02:00
										 |  |  |     <div style="margin-left: 15%;margin-top: 5%;"> | 
					
						
							|  |  |  |       <button style="margin-left: 2%" @click="list = false;editEquivalence(request.id, 'Accepted'); request.equivalenceState='Accepted'">Accept Equivalence</button> | 
					
						
							|  |  |  |       <button style="margin-left: 2%" @click="list = false;editEquivalence(request.id, 'Refused'); request.equivalenceState='Refused'">Refuse Equivalence</button> | 
					
						
							|  |  |  |       <button style="margin-left: 2%" @click="list=false">Return to profile</button> | 
					
						
							| 
									
										
										
										
											2024-04-11 16:45:48 +02:00
										 |  |  |     </div> | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <style scoped> | 
					
						
							|  |  |  | .container{ | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  |   min-width:675px; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |   display:grid; | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  |   grid-template-columns:10vw 50vw; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |   grid-template-rows:200px auto; | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  |   column-gap:2.7%; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |   row-gap:45px; | 
					
						
							|  |  |  |   grid-template-areas: | 
					
						
							|  |  |  |   "profilPic globalInfos" | 
					
						
							|  |  |  |   "minfos minfos"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .profilPic{ | 
					
						
							|  |  |  |   grid-area:profilPic; | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  |   width:100%; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .globalInfos { | 
					
						
							|  |  |  |   grid-area:globalInfos; | 
					
						
							|  |  |  |   align-self :center; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .body { | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  |   min-width:960px; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  |   width:100%; | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  |   display:flex; | 
					
						
							|  |  |  |   align-items:center; | 
					
						
							|  |  |  |   justify-content:center; | 
					
						
							|  |  |  |   margin-top:5%; | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .subContainter{ | 
					
						
							|  |  |  |   width:100%; | 
					
						
							|  |  |  |   background-color:rgb(50,50,50); | 
					
						
							|  |  |  |   border-radius:20px; | 
					
						
							|  |  |  |   border:4px solid black; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .infosContainer { | 
					
						
							|  |  |  |   padding-bottom:50px; | 
					
						
							|  |  |  |   border:2px solid black; | 
					
						
							|  |  |  |   font-size:25px; | 
					
						
							|  |  |  |   color:white; | 
					
						
							|  |  |  |   padding:20px; | 
					
						
							|  |  |  |   background-color:rgb(50,50,50); | 
					
						
							|  |  |  |   border-radius:20px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-01 11:43:42 +02:00
										 |  |  | button{ | 
					
						
							|  |  |  |   font-size:15px; | 
					
						
							|  |  |  |   height:50px; | 
					
						
							|  |  |  |   width:100px; | 
					
						
							|  |  |  |   border:none; | 
					
						
							|  |  |  |   border-radius:20px; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2024-03-27 14:12:20 +01:00
										 |  |  | </style> |