Register
BIN
backend/cdn/0ea1f30e-c82b-4346-988f-6a44b4028137.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/2bea4f35-5966-4543-ae34-c6f757bcd9b2.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/369e3e69-a100-489a-bdc9-5c2227a42ccc.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/652f05cb-6387-49ec-9284-0a8ae687f875.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/7f9a87b9-6d82-4e24-874d-6f96f6d55baa.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/87149c65-aaa6-4b0a-9121-1440f6b4252a.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/8baaebd9-a709-443e-ada9-785643263c13.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/97151d65-0c14-4bf2-95ab-83b74ecdfeb8.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/a03f90dc-fd7d-478a-a51d-805c409c851a.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/a6565a5f-53ee-42db-b8a4-69e336ba6ae6.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/b09c90b8-05fe-4849-a0a2-f957118c0e28.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/cb16ede7-57dc-491c-966d-60df52c56a16.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/d73b2112-67bf-46b7-ab0a-9ada0a13842c.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
backend/cdn/f2e7429b-f466-4c97-9d92-d9e630357da5.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
@ -1,10 +1,107 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import i18n from "@/i18n.js"
|
||||||
import Req from "./Request.vue"
|
import Req from "./Request.vue"
|
||||||
import { getRegisters } from '@/rest/ServiceInscription.js'
|
import {validateRegister, getAllRegisters } from '@/rest/ServiceInscription.js'
|
||||||
|
|
||||||
const requests_example = await getRegisters();
|
const requests_example = await getAllRegisters();
|
||||||
|
console.log(requests_example);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Req v-for="item of requests_example"/>
|
<div v-for="item of requests_example">
|
||||||
|
<div class="bodu">
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<div class="id"><a>{{item.id}}</a></div>
|
||||||
|
<div class="surname"><a>{{item.lastName}}</a></div>
|
||||||
|
<div class="firstname"><a>{{item.firstName}}</a></div>
|
||||||
|
<div class="infos"><button style="background-color:rgb(105,05,105);" >{{i18n("request.moreInfos")}}</button></div>
|
||||||
|
<div class="accept"><button @click="validateRegister(id,Accepted)" style="background-color:rgb(0,105,50);">{{i18n("request.accept")}}</button></div>
|
||||||
|
<div class="refuse"><button @click="validateRegister(id,Refused)" style="background-color:rgb(105,0,0);">{{i18n("request.refuse")}}</button></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container{
|
||||||
|
color:white;
|
||||||
|
height:100px;
|
||||||
|
font-size:20px;
|
||||||
|
display:grid;
|
||||||
|
grid-template-columns:[firstCol-start]100px[firstCol-end secondCol-start]150px[secondCol-end thirdCol-start]200px[thirdCol-end fourthCol-start]150px[fourthCol-end]150px[fifthCol-end]150px[sixthCol-end]150px[endCol];
|
||||||
|
grid-template-areas:
|
||||||
|
"id type surname firstname infos accept refuse";
|
||||||
|
column-gap:10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.infos {
|
||||||
|
grid-area:infos;
|
||||||
|
align-self:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accept{
|
||||||
|
grid-area:accept;
|
||||||
|
align-self:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refuse{
|
||||||
|
grid-area:refuse;
|
||||||
|
align-self:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titles {
|
||||||
|
grid-area:titles;
|
||||||
|
background-color:rgb(215,215,215);
|
||||||
|
}
|
||||||
|
.id{
|
||||||
|
grid-area:id;
|
||||||
|
margin-left:40px;
|
||||||
|
align-self:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type{
|
||||||
|
grid-area:type;
|
||||||
|
align-self:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.surname{
|
||||||
|
grid-area:surname;
|
||||||
|
align-self:center;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.firstname{
|
||||||
|
grid-area:firstname;
|
||||||
|
align-self:center;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
button{
|
||||||
|
font-size:15px;
|
||||||
|
height:50px;
|
||||||
|
width:100px;
|
||||||
|
border:none;
|
||||||
|
border-radius:20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.bodu {
|
||||||
|
width:100%;
|
||||||
|
margin-bottom:10px;
|
||||||
|
border:2px solid black;
|
||||||
|
border-radius:9px;
|
||||||
|
background-color:rgb(50,50,50);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
const email=ref("")
|
const email=ref("")
|
||||||
const address=ref("")
|
const address=ref("")
|
||||||
const country=ref("")
|
const country=ref("")
|
||||||
const curriculum=ref("")
|
let curriculum;
|
||||||
|
|
||||||
const imageSaved = ref(false)
|
const imageSaved = ref(false)
|
||||||
const ppData = ref(false)
|
const ppData = ref(false)
|
||||||
@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
function goBackHome(){
|
function goBackHome(){
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log("Delayed for 1 second.");
|
|
||||||
window.location.href="#/home";
|
window.location.href="#/home";
|
||||||
}, "500");
|
}, "500");
|
||||||
}
|
}
|
||||||
@ -48,6 +47,8 @@
|
|||||||
disconnect();
|
disconnect();
|
||||||
window.location.reload();}
|
window.location.reload();}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@ -129,14 +130,14 @@
|
|||||||
<input type="file" :disabled="imageSaved" @change="ppData = uploadProfilePicture($event.target.files); imageSaved = true;" accept="image/*">
|
<input type="file" :disabled="imageSaved" @change="ppData = uploadProfilePicture($event.target.files); imageSaved = true;" accept="image/*">
|
||||||
</form>
|
</form>
|
||||||
<div class="inputBox">
|
<div class="inputBox">
|
||||||
<p>{{i18n("curriculum").toUpperCase()}}</p>
|
<p>{{i18n("Curriculum").toUpperCase()}}</p>
|
||||||
<select v-model="curriculum">
|
<select v-model="curriculum">
|
||||||
<option v-for="item in curricula">{{item.option}}</option>
|
<option v-for="item in curricula">{{item.curriculumId}}</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div style="align-self:center;" class="inputBox">
|
<div style="align-self:center;" class="inputBox">
|
||||||
<button style="margin-top:25px;" @click="console.log(outputs);register(firstname, surname, birthday, password, mail, address, country, curriculum);goBackHome();">
|
<button style="margin-top:25px;" @click="console.log(curriculum);register(firstname, surname, birthday, password, mail, address, country, curriculum);">
|
||||||
{{i18n("login.guest.submit")}}
|
{{i18n("login.guest.submit")}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import i18n from "@/i18n.js"
|
|
||||||
import {validateRegister} from "@/rest/ServiceInscription.js"
|
|
||||||
const props = defineProps({
|
|
||||||
id: Number,
|
|
||||||
type: String,
|
|
||||||
lastName: String,
|
|
||||||
firstName: String,
|
|
||||||
address: String,
|
|
||||||
country: String,
|
|
||||||
birthDate: String,
|
|
||||||
curriculum:String,
|
|
||||||
degree:String,});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="bodu">
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<div class="id"><a>{{id}}</a></div>
|
|
||||||
<div class="type"><a>{{type}}</a></div>
|
|
||||||
<div class="surname"><a>{{lastName}}</a></div>
|
|
||||||
<div class="firstname"><a>{{firstName}}</a></div>
|
|
||||||
<div class="infos"><button style="background-color:rgb(105,05,105);" >{{i18n("request.moreInfos")}}</button></div>
|
|
||||||
<div class="accept"><button @click="validateRegister(id,Accepted)" style="background-color:rgb(0,105,50);">{{i18n("request.accept")}}</button></div>
|
|
||||||
<div class="refuse"><button @click="validateRegister(id,Refused)" style="background-color:rgb(105,0,0);">{{i18n("request.refuse")}}</button></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.container{
|
|
||||||
color:white;
|
|
||||||
height:100px;
|
|
||||||
font-size:20px;
|
|
||||||
display:grid;
|
|
||||||
grid-template-columns:[firstCol-start]100px[firstCol-end secondCol-start]150px[secondCol-end thirdCol-start]200px[thirdCol-end fourthCol-start]150px[fourthCol-end]150px[fifthCol-end]150px[sixthCol-end]150px[endCol];
|
|
||||||
grid-template-areas:
|
|
||||||
"id type surname firstname infos accept refuse";
|
|
||||||
column-gap:10px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.infos {
|
|
||||||
grid-area:infos;
|
|
||||||
align-self:center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.accept{
|
|
||||||
grid-area:accept;
|
|
||||||
align-self:center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.refuse{
|
|
||||||
grid-area:refuse;
|
|
||||||
align-self:center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titles {
|
|
||||||
grid-area:titles;
|
|
||||||
background-color:rgb(215,215,215);
|
|
||||||
}
|
|
||||||
.id{
|
|
||||||
grid-area:id;
|
|
||||||
margin-left:40px;
|
|
||||||
align-self:center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type{
|
|
||||||
grid-area:type;
|
|
||||||
align-self:center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.surname{
|
|
||||||
grid-area:surname;
|
|
||||||
align-self:center;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow:ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.firstname{
|
|
||||||
grid-area:firstname;
|
|
||||||
align-self:center;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow:ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
button{
|
|
||||||
font-size:15px;
|
|
||||||
height:50px;
|
|
||||||
width:100px;
|
|
||||||
border:none;
|
|
||||||
border-radius:20px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.bodu {
|
|
||||||
width:100%;
|
|
||||||
margin-bottom:10px;
|
|
||||||
border:2px solid black;
|
|
||||||
border-radius:9px;
|
|
||||||
background-color:rgb(50,50,50);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
@ -33,6 +33,10 @@ export async function getRegisters(id){
|
|||||||
return restGet("/request/register")
|
return restGet("/request/register")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getAllRegisters(){
|
||||||
|
return restGet("/requests/register")
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the state of a requests.
|
* Change the state of a requests.
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +26,7 @@ export function disconnect(){
|
|||||||
* @param curriculum
|
* @param curriculum
|
||||||
* @param imageId id of the image in database returned when uploaded
|
* @param imageId id of the image in database returned when uploaded
|
||||||
*/
|
*/
|
||||||
export async function register(firstname, lastname, birthDate, password, email, address, country, curriculum, imageId){
|
export async function register(firstname, lastname, birthDate, password, email, address, country, curriculumId, imageId){
|
||||||
return restPost("/register", {
|
return restPost("/register", {
|
||||||
firstname: firstname,
|
firstname: firstname,
|
||||||
lastname: lastname,
|
lastname: lastname,
|
||||||
@ -35,7 +35,7 @@ export async function register(firstname, lastname, birthDate, password, email,
|
|||||||
email: email,
|
email: email,
|
||||||
address: address,
|
address: address,
|
||||||
country: country,
|
country: country,
|
||||||
curriculum: curriculum
|
curriculumId: curriculumId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import { restGet, restPost, restDelete, restPatch } from './restConsumer.js'
|
|||||||
* Create a new course
|
* Create a new course
|
||||||
*/
|
*/
|
||||||
export async function createCourse(name, credits, teacher){
|
export async function createCourse(name, credits, teacher){
|
||||||
return restPost("/course", {name: name, credits: credits, owner: teacher} )
|
return restPost("/course", {title: name, credits: credits, owner: teacher} )
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|