From 587baa645e37cc98d9a655f500411b0f412e4b15 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 20 Feb 2024 08:47:24 -0300 Subject: [PATCH] generic FormPopup creation and SendInvoiceForm creation --- src/components/FormPopup.vue | 93 +++++++++++++++++++ .../Card/InvoiceOutDescriptorMenu.vue | 15 ++- src/pages/InvoiceOut/Card/SendInvoiceForm.vue | 41 ++++++++ 3 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 src/components/FormPopup.vue create mode 100644 src/pages/InvoiceOut/Card/SendInvoiceForm.vue diff --git a/src/components/FormPopup.vue b/src/components/FormPopup.vue new file mode 100644 index 000000000..951d697d5 --- /dev/null +++ b/src/components/FormPopup.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue index ca2bf1304..76b9cefdc 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue @@ -3,6 +3,7 @@ import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; import TransferInvoiceForm from 'src/components/TransferInvoiceForm.vue'; +import SendInvoiceForm from './SendInvoiceForm.vue'; import { useSession } from 'src/composables/useSession'; import { usePrintService } from 'composables/usePrintService'; @@ -20,6 +21,8 @@ const { t } = useI18n(); const { openReport } = usePrintService(); const transferInvoiceDialogRef = ref(); +const sendInvoiceFormRef = ref(); +const invoiceFormType = ref(null); const showInvoicePdf = () => { const url = `api/InvoiceOuts/${$props.invoiceOutData.id}/download?access_token=${token}`; @@ -31,6 +34,11 @@ const showInvoiceCsv = () => { recipientId: $props.invoiceOutData.client.id, }); }; + +const showSendInvoiceForm = (type) => { + invoiceFormType.value = type; + sendInvoiceFormRef.value.show(); +}; diff --git a/src/pages/InvoiceOut/Card/SendInvoiceForm.vue b/src/pages/InvoiceOut/Card/SendInvoiceForm.vue new file mode 100644 index 000000000..3956dab08 --- /dev/null +++ b/src/pages/InvoiceOut/Card/SendInvoiceForm.vue @@ -0,0 +1,41 @@ + + + + + +es: + Email: Email + Confirm: Confirmar + Are you sure you want to send it?: ¿Seguro que quieres enviarlo? +