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

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

@@ -36,6 +36,12 @@ export default {
CalendarSidebar,
CalendarFormAddEvent,
},
props: {
isOpenHeaderForm: {
type: Boolean,
default: false,
},
},
data() {
return {
sidebarWidth: "72px",
@@ -93,16 +99,21 @@ export default {
this.sidebarWidth = value;
},
openFormCreateEvent() {
this.isOpenForm = true;
this.isOpenForm = !this.isOpenHeaderForm;
this.$emit("is-open-page-form", this.isOpenForm);
},
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">
.flex.flex-col.gap-y-6.pt-6.pb-7.px-8.event-form.absolute.left-0.top-14
.flex.flex-col.gap-y-6.pt-6.pb-7.px-8.event-form.absolute.right-0.bottom-14
.flex.justify-between
span.title.text-xl.font-bold Назначение события
.flex.pt-2