fix my account creation

This commit is contained in:
2021-11-11 22:54:17 +01:00
parent 879d5c66e4
commit c090d73aa1
2 changed files with 10 additions and 5 deletions

View File

@@ -26,12 +26,12 @@
</b-tab>
</b-tabs>
</b-card>
<b-modal ref="my-modal" size="lg" centered title="">
<b-modal ref="create-account" size="lg" centered title="">
<template #modal-header="{ }">
<h5>Ajout d'un compte</h5>
</template>
<template #modal-footer="{ ok, cancel }">
<b-button size="sm" variant="success" @click="ok()">
<b-button size="sm" variant="success" @click="validateForm()">
Créer
</b-button>
<b-button size="sm" variant="danger" @click="cancel()">
@@ -66,7 +66,7 @@
<script>
import {BCard, BTabs, BTab, BCardText, BCardTitle, BIconPlusCircleFill, BModal, BFormGroup, BFormSelect, BFormInput} from "bootstrap-vue";
import {getAccounts} from "@/config/noscomptes";
import {createAccount, getAccounts} from "@/config/noscomptes";
export default {
name: 'mes_comptes',
data: function () {
@@ -89,8 +89,13 @@ export default {
mounted () {
},
methods: {
validateForm() {
let loggedUser = this.$store.state.loggedUser
createAccount(loggedUser.oauth_token, loggedUser.nosComptesId, {"name": this.name, "provider": this.provider})
.then(this.$refs['create-account'].hide())
},
show() {
this.$refs['my-modal'].show()
this.$refs['create-account'].show()
}
},
components: {