From 8b112f3409e7387c343a1de35169d7ce25b7c036 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 7 Dec 2023 11:29:49 -0300 Subject: [PATCH 1/2] create componente VnSelectCreate --- src/components/common/VnSelectCreate.vue | 79 ++++++++++++++++++++++++ src/components/common/VnSelectFilter.vue | 4 +- 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 src/components/common/VnSelectCreate.vue diff --git a/src/components/common/VnSelectCreate.vue b/src/components/common/VnSelectCreate.vue new file mode 100644 index 000000000..bb4465fa5 --- /dev/null +++ b/src/components/common/VnSelectCreate.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index 04f10ace9..789622cb9 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -96,8 +96,8 @@ const value = computed({ size="18px" /> - From a8c6b6f63820d68d96dcb03e5a37858f02c8884d Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 14 Dec 2023 08:46:17 -0300 Subject: [PATCH 2/2] Update input select create --- src/components/common/VnSelectCreate.vue | 28 ++++++++++-------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/components/common/VnSelectCreate.vue b/src/components/common/VnSelectCreate.vue index bb4465fa5..867c97135 100644 --- a/src/components/common/VnSelectCreate.vue +++ b/src/components/common/VnSelectCreate.vue @@ -27,7 +27,7 @@ const $props = defineProps({ }); const role = useRole(); -const popup = ref(null); +const showForm = ref(false); const value = computed({ get() { @@ -38,35 +38,31 @@ const value = computed({ }, }); -const isDeliveryAssistant = computed(() => { +const isAllowedToCreate = computed(() => { return role.hasAny($props.rolesAllowedToCreate); }); -const openCreateForm = () => { - popup.value.show(); +const toggleForm = () => { + showForm.value = !showForm.value; };