diff --git a/src/components/Dialogs/PopupReason.vue b/src/components/Dialogs/PopupReason.vue index 9440ee1ea..d151fe55a 100644 --- a/src/components/Dialogs/PopupReason.vue +++ b/src/components/Dialogs/PopupReason.vue @@ -3,11 +3,12 @@ import { ref, watch } from "vue"; import DialogHeader from "@/components/DialogHeader.vue"; const reason = ref(""); +const modal = defineModel("modal", { required: true }); const props = defineProps({ - modal: { - type: Boolean, - default: false, - }, + // modal: { + // type: Boolean, + // default: false, + // }, title: { type: String, default: "", @@ -16,10 +17,10 @@ const props = defineProps({ type: String, default: "", }, - clickClose: { - type: Function, - default: () => {}, - }, + // clickClose: { + // type: Function, + // default: () => {}, + // }, savaForm: { type: Function, default: () => {}, @@ -29,7 +30,7 @@ const props = defineProps({ }, }); watch(props, () => { - if (props.modal === true && props.textReport == "") { + if (modal.value === true && props.textReport == "") { reason.value = ""; } else { reason.value = props.textReport; @@ -44,13 +45,17 @@ const submit = () => { } }); }; + +function closeModal() { + modal.value = false +}