diff --git a/science-quest/src/components/jeux/creerPartie.vue b/science-quest/src/components/jeux/creerPartie.vue index 93714bc..622910c 100644 --- a/science-quest/src/components/jeux/creerPartie.vue +++ b/science-quest/src/components/jeux/creerPartie.vue @@ -10,11 +10,9 @@ export default { return { jeuxDispo:[], - afficherChoixThematiques:false, thematiquesDispo:[], choixThematiques:[], - afficherChoixDifficultes:false, difficultesDispo:[], choixDifficulte:-1, } @@ -28,21 +26,11 @@ export default { return utilisateur.login().then(response=>console.log(response)) } - }, - watch:{ - afficherChoixThematiques(to){ - if(to && this.thematiquesDispo.length==0){ - Thematiques.getPage(0,999).then(thematiques=>this.thematiquesDispo=thematiques._embedded) - } - }, - afficherChoixDifficultes(to){ - if(to && this.difficultesDispo.length==0){ - Difficultes.getPage(0,999).then(difficultes=>this.difficultesDispo=difficultes._embedded) - } - } }, mounted(){ ListeJeux.get().then(jeux=>this.jeuxDispo=Object.values(jeux)) + Difficultes.getPage(0,999).then(difficultes=>this.difficultesDispo=difficultes._embedded) + Thematiques.getPage(0,999).then(thematiques=>this.thematiquesDispo=thematiques._embedded) } } @@ -51,45 +39,36 @@ export default {