profil part3
This commit is contained in:
parent
36fc33c3e9
commit
8476563678
@ -13,20 +13,35 @@
|
||||
const unreg = ref(false);
|
||||
const reg = ref(false);
|
||||
|
||||
const toModify = {
|
||||
const pattern = {
|
||||
profilPictureUrl:null,
|
||||
email:null,
|
||||
adress:null,
|
||||
password:null,
|
||||
};
|
||||
|
||||
const patternInfos ={
|
||||
email: null,
|
||||
password: null,
|
||||
passwordConfirm:null,
|
||||
id:null,
|
||||
}
|
||||
|
||||
|
||||
let toModify= Object.assign({}, pattern);
|
||||
let personnalInfos = Object.assign({}, patternInfos);
|
||||
|
||||
function resetInputs(inputs,list){
|
||||
inputs=Object.assign({},list);
|
||||
}
|
||||
|
||||
function ChangeInfos(){
|
||||
for (const [key, value] in Object.entries(toModify)){
|
||||
if(value !== null){
|
||||
alterSelf({key:value})
|
||||
alterSelf({key:value});
|
||||
}
|
||||
}
|
||||
toModify= Object.assign({}, pattern);
|
||||
}
|
||||
|
||||
function getPP(){
|
||||
@ -73,22 +88,23 @@
|
||||
</div>
|
||||
<div>
|
||||
E-mail:
|
||||
<input type="mail" v-model="toModify.email" />
|
||||
<input type="mail" v-model="personnalInfos.email" />
|
||||
</div>
|
||||
<div>
|
||||
{{i18n("profile.address")}}:
|
||||
<input type="text" v-model="toModify.address">
|
||||
<input type="text" v-model="personnalInfos.id">
|
||||
</div>
|
||||
<div>
|
||||
{{i18n("login.password")}}:
|
||||
<input type="password" v-model="toModify.password">
|
||||
<input type="password" v-model="personnalInfos.password">
|
||||
</div>
|
||||
<div>
|
||||
{{i18n("login.cPassword")}}:
|
||||
<input type="password" id="confirm">
|
||||
<input type="password" v-model="personnalInfos.passwordConfirm">
|
||||
</div>
|
||||
<div>
|
||||
<button @click=" modif=!modif; ChangeInfos();">{{i18n("courses.confirm")}}</button>
|
||||
<button @click="modif=!modif; resetInputs(toModify,pattern);console.log(pattern)" style="float:right;">{{i18n("courses.back")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="curric" class="infosContainer">
|
||||
@ -113,6 +129,7 @@
|
||||
|
||||
<div>
|
||||
<button @click=" curric=!curric;">{{i18n("courses.confirm")}}</button>
|
||||
<button @click="curric=!curric; resetInputs(personnalInfos,patternInfos);console.log(pattern)" style="float:right;">{{i18n("courses.back")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="reg" class="infosContainer">
|
||||
@ -121,8 +138,8 @@
|
||||
<input type="mail" v-model="toModify.email" />
|
||||
</div>
|
||||
<div>
|
||||
{{i18n("profile.address")}}:
|
||||
<input type="text" v-model="toModify.address">
|
||||
ID :
|
||||
<input type="text" v-model="toModify.id">
|
||||
</div>
|
||||
<div>
|
||||
{{i18n("login.password")}}:
|
||||
@ -135,6 +152,7 @@
|
||||
|
||||
<div>
|
||||
<button @click=" reg=!reg;">{{i18n("courses.confirm")}}</button>
|
||||
<button @click=" reg=!reg; resetInputs(personnalInfos,patternInfos);console.log(pattern)" style="float:right;">{{i18n("courses.back")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="unreg" class="infosContainer">
|
||||
@ -157,6 +175,7 @@
|
||||
|
||||
<div>
|
||||
<button @click=" unreg=!unreg;">{{i18n("courses.confirm")}}</button>
|
||||
<button @click=" unreg=!unreg; resetInputs(personnalInfos,patternInfos);console.log(pattern)" style="float:right;">{{i18n("courses.back")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user