WIP привести к изначальному виду
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user