Сделала запрет на одновременное открытие форм

This commit is contained in:
Daria Golova
2022-11-09 19:13:06 +03:00
parent 9f9007e16a
commit b5aa385d4e
7 changed files with 61 additions and 12 deletions

View File

@@ -43,9 +43,11 @@ export default {
methods: {
openFormCreateClient() {
this.isOpenFormCreate = true;
this.$emit("is-open-client-add-form", this.isOpenFormCreate);
},
closeFormCreateClient() {
this.isOpenFormCreate = false;
this.$emit("is-open-client-add-form", this.isOpenFormCreate);
this.fetchDataClients();
},
saveDataClients(data) {
@@ -79,6 +81,9 @@ export default {
mounted() {
this.fetchDataClients();
},
beforeUnmount() {
this.closeFormCreateClient();
},
};
</script>

View File

@@ -1,6 +1,6 @@
<template lang="pug">
.wrapper.flex.w-full.relative.mx-6
clients-table(:open-form-create="openFormCreateClient")
clients-table(@is-open-client-add-form="transmitPageFormState")
</template>
<script>
@@ -14,11 +14,8 @@ export default {
};
},
methods: {
openFormCreateClient() {
this.isOpenForm = true;
},
closeFormCreateClient() {
this.isOpenForm = false;
transmitPageFormState(value) {
this.$emit("is-open-client-add-form", value);
},
},
};