Link the ExternalCurriculum to a user after the inscription.
Add the ExternalCurriculum lists in AboutStudent.vue
This commit is contained in:
		@ -2,10 +2,15 @@
 | 
			
		||||
  import i18n from "@/i18n.js"
 | 
			
		||||
  import {getUser} from '../../rest/Users.js'
 | 
			
		||||
  import {getSomeonesCurriculumList} from "@/rest/curriculum.js";
 | 
			
		||||
  import {ref} from "vue";
 | 
			
		||||
  import ExternalCurriculumList from "@/Apps/Inscription/ExternalCurriculumList.vue";
 | 
			
		||||
  import {getExternalCurriculumByUser} from "@/rest/externalCurriculum.js";
 | 
			
		||||
 | 
			
		||||
  const props = defineProps(['target']);
 | 
			
		||||
  let user = await getUser(props.target);
 | 
			
		||||
  let UserCurriculum = await getSomeonesCurriculumList(props.target);
 | 
			
		||||
  const props = defineProps(['target'])
 | 
			
		||||
  const user = await getUser(props.target)
 | 
			
		||||
  const UserCurriculum = await getSomeonesCurriculumList(props.target)
 | 
			
		||||
  const externalcurrlist = await getExternalCurriculumByUser(user.regNo)
 | 
			
		||||
  const extercurrlist = ref(false)
 | 
			
		||||
 | 
			
		||||
  function getPP(){
 | 
			
		||||
    if(user.profilePictureUrl === null){
 | 
			
		||||
@ -27,7 +32,7 @@
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="body">
 | 
			
		||||
  <div class="body" v-if="extercurrlist==false">
 | 
			
		||||
    <div class="container">
 | 
			
		||||
      <div class="profilPic">
 | 
			
		||||
        <img class="subContainter" :src=getPP()>
 | 
			
		||||
@ -49,6 +54,9 @@
 | 
			
		||||
          <div>
 | 
			
		||||
            Date de naissance : {{user.birthDate}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div>
 | 
			
		||||
            <button @click="extercurrlist=!extercurrlist">See external curriculums</button>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="moreInfos">
 | 
			
		||||
@ -79,7 +87,9 @@
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <div v-if="extercurrlist==true">
 | 
			
		||||
      <ExternalCurriculumList :ext-curr-list="externalcurrlist"></ExternalCurriculumList>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,10 +2,10 @@
 | 
			
		||||
  import i18n from "@/i18n.js";
 | 
			
		||||
  import {ref} from "vue";
 | 
			
		||||
 | 
			
		||||
  const props = defineProps(["extCurrList","inscrReqId"])
 | 
			
		||||
  const props = defineProps(["extCurrList"])
 | 
			
		||||
 | 
			
		||||
  const extCurrList = ref(props.extCurrList)
 | 
			
		||||
 | 
			
		||||
  console.log(extCurrList)
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template style="margin-top:5%;">
 | 
			
		||||
@ -19,7 +19,6 @@
 | 
			
		||||
        <div class="download"><button>Download document</button></div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -17,3 +17,7 @@ export async function getExternalCurriculumByInscrReq(inscrReqId){
 | 
			
		||||
    return restGet("/externalcurriculum/"+inscrReqId)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function getExternalCurriculumByUser(userId){
 | 
			
		||||
    return restGet("/externalcurriculumbyuser/"+userId)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user