From a56df4667828dae90d1eedb7b46c00107f7acb99 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 7 Jun 2024 09:07:58 +0200 Subject: [PATCH] fix(AccountAcls): fix and optimization --- src/components/FormModelPopup.vue | 30 ++------- src/pages/Account/AccountAcls.vue | 28 +++++---- src/pages/Account/Acls/AclFormView.vue | 84 ++++++++++---------------- 3 files changed, 52 insertions(+), 90 deletions(-) diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue index 06aa1d891..0f2b6cbf0 100644 --- a/src/components/FormModelPopup.vue +++ b/src/components/FormModelPopup.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; import FormModel from 'components/FormModel.vue'; -const emit = defineEmits(['onDataSaved']); +const emit = defineEmits(['onDataSaved', 'onDataCanceled']); defineProps({ title: { @@ -15,26 +15,6 @@ defineProps({ type: String, default: '', }, - url: { - type: String, - default: '', - }, - model: { - type: String, - default: '', - }, - filter: { - type: Object, - default: null, - }, - urlCreate: { - type: String, - default: null, - }, - formInitialData: { - type: Object, - default: () => {}, - }, }); const { t } = useI18n(); @@ -43,8 +23,8 @@ const formModelRef = ref(null); const closeButton = ref(null); const onDataSaved = (formData, requestResponse) => { - emit('onDataSaved', formData, requestResponse); closeForm(); + emit('onDataSaved', formData, requestResponse); }; const isLoading = computed(() => formModelRef.value?.isLoading); @@ -61,12 +41,9 @@ defineExpose({