WIP привести к изначальному виду

This commit is contained in:
Daria Golova
2022-11-10 15:26:54 +03:00
parent 4837bea07b
commit 27da063072
7 changed files with 13 additions and 64 deletions

View File

@@ -37,12 +37,6 @@ export default {
CalendarSidebar,
CalendarFormAddEvent,
},
props: {
isOpenHeaderForm: {
type: Boolean,
default: false,
},
},
data() {
return {
sidebarWidth: "72px",
@@ -100,21 +94,16 @@ export default {
this.sidebarWidth = value;
},
openFormCreateEvent() {
this.isOpenForm = !this.isOpenHeaderForm;
this.$emit("is-open-page-form", this.isOpenForm);
this.isOpenForm = true;
},
closeFormCreateEvent() {
this.isOpenForm = false;
this.$emit("is-open-page-form", this.isOpenForm);
},
},
mounted() {
this.fetchPersonsData();
this.fetchEventsData();
},
beforeUnmount() {
this.closeFormCreateEvent();
},
};
</script>

View File

@@ -1,5 +1,5 @@
<template lang="pug">
clients-wrapper(@is-open-client-add-form="transmitPageFormState")
clients-wrapper
</template>
<script>
@@ -7,10 +7,5 @@ import ClientsWrapper from "@/pages/clients/components/ClientsWrapper";
export default {
name: "TheClients",
components: { ClientsWrapper },
methods: {
transmitPageFormState(value) {
this.$emit("is-open-page-form", value);
},
},
};
</script>

View File

@@ -43,11 +43,9 @@ 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) {
@@ -81,9 +79,6 @@ 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(@is-open-client-add-form="transmitPageFormState")
clients-table(:open-form-create="openFormCreateClient")
</template>
<script>
@@ -14,8 +14,11 @@ export default {
};
},
methods: {
transmitPageFormState(value) {
this.$emit("is-open-client-add-form", value);
openFormCreateClient() {
this.isOpenForm = true;
},
closeFormCreateClient() {
this.isOpenForm = false;
},
},
};