again links
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m0s
Build and test backend / Test-backend (pull_request) Successful in 1m58s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 25s

This commit is contained in:
2024-03-16 14:31:44 +01:00
parent e84e34d735
commit 8d1235be92
6 changed files with 39 additions and 90 deletions

View File

@ -1,40 +1,11 @@
<script setup>
import {reactive, ref } from 'vue'
import {getUser} from '../rest/Users.js'
import {getSelf} from '../rest/Users.js'
import i18n from "@/i18n.js"
import { uploadProfilePicture } from '@/rest/uploads.js'
/*
const user = getUser();
*/
const user=reactive({
profilePicture:"/Clyde.png",
lastname:"Ghost",
firstname:"Clyde",
role:"student",
address: "Radiator Springs",
email:"ClydeGhost@gmail.com",
curriculum:[
{
"id": 12,
"name": "Math pour l'info",
"credits": 11,
"faculty": "science",
"teacher": 42,
"Assistants": []},
{
"id": 42,
"name": "Fonctionnement des ordinateurs",
"credits": 11,
"faculty": "science",
"teacher": 42,
"Assistants": []},
],
option:"IT",
degree:"BAC1",
password:"CeciEstUnMotDePasse123",
})
const user = getSelf();
console.log(user.role)
console.log("test")
/*
Teacher user
const user =reactive({
@ -67,8 +38,6 @@ const modif = ref(false);
const curric = ref(false);
const unreg = ref(false);
const reg = ref(false);
const toModify = Object.assign({}, user);
function getPP(){
@ -88,28 +57,28 @@ function getPP(){
<div class="globalInfos">
<div v-if="modif==false" class="infosContainer" >
<div>
{{user.firstname}} {{user.lastname.toUpperCase()}}
{{user.firstName}} {{user.lastName}}
</div>
<div>
E-mail: {{user.email}}
</div>
<div v-if="user.role==='student'">
{{user.option}} {{i18n(user.role).toUpperCase()}}
<div v-if="user.role=='Student'">
{{user.option}} {{i18n(user.role)}}
</div>
<div v-else>
{{i18n("faculty")}}: {{user.faculty}}
Role: {{i18n(user.role).toUpperCase()}}
Role: {{i18n(user.role)}}
</div>
<div>
<button @click="modif=!modif"> {{i18n("profile.modify.data")}} </button>
</div>
<div v-if="(user.role==='student')">
<div v-if="(user.role=='student')">
<button @click="reg=!reg">{{i18n("profile.reRegister")}}</button>
<button @click="unreg=!unreg" style="float:right;background-color:rgb(150,0,0);">{{i18n("profile.unRegister")}}</button>
</div>
<div>
<button @click="curric=!curric">{{i18n("profile.change.curriculum")}}</button>
</div>
</div>
<div v-else class="infosContainer">
<div>
@ -139,7 +108,7 @@ function getPP(){
</div>
<div v-if="modif==false"class="moreInfos">
<div v-if="(user.role==='student')">
<div v-if="(user.role=='student')">
<div class="listTitle">
{{i18n("profile.course.list")}}
</div>
@ -156,7 +125,7 @@ function getPP(){
<div>
</div>
<div v-if="(user.role==='teacher')">
<div v-if="(user.role=='teacher')">
<div class="listTitle">
{{i18n("profile.course.list")}}
</div>