From 0475083a2b5b415f07234723b4f0698d11d3c6b4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 2 Sep 2024 14:57:01 +0200 Subject: [PATCH 1/5] refs #7407 Medical Section --- src/i18n/locale/en.yml | 11 +++ src/i18n/locale/es.yml | 12 ++++ src/pages/Worker/Card/WorkerMedical.vue | 92 +++++++++++++++++++++++++ src/router/modules/worker.js | 10 +++ 4 files changed, 125 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerMedical.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 4abaeeb5b..272b7911b 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -259,6 +259,7 @@ globals: ticketsMonitor: Tickets monitor clientsActionsMonitor: Clients and actions serial: Serial + medical: Mutual created: Created worker: Worker now: Now @@ -877,6 +878,7 @@ worker: timeControl: Time control locker: Locker balance: Balance + medical: Medical list: name: Name email: Email @@ -956,6 +958,15 @@ worker: amount: Importe remark: Bonficado hasDiploma: Diploma + medical: + tableVisibleColumns: + date: Date + time: Hour + center: Formation Center + invoice: Invoice + amount: Amount + isFit: Fit + remark: Observations imageNotFound: Image not found balance: tableVisibleColumns: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 335c2d651..0e1c52cc4 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -261,6 +261,7 @@ globals: ticketsMonitor: Monitor de tickets clientsActionsMonitor: Clientes y acciones serial: Facturas por serie + medical: Mutua created: Fecha creación worker: Trabajador now: Ahora @@ -878,6 +879,8 @@ worker: timeControl: Control de horario locker: Taquilla balance: Balance + formation: Formación + medical: Mutua list: name: Nombre email: Email @@ -948,6 +951,15 @@ worker: amount: Importe remark: Bonficado hasDiploma: Diploma + medical: + tableVisibleColumns: + date: Fecha + time: Hora + center: Centro de Formación + invoice: Factura + amount: Importe + isFit: Apto + remark: Observaciones imageNotFound: No se ha encontrado la imagen balance: tableVisibleColumns: diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue new file mode 100644 index 000000000..b6d1ad248 --- /dev/null +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -0,0 +1,92 @@ + + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index f80df5e06..2a523e7fe 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -25,6 +25,7 @@ export default { 'WorkerLocker', 'WorkerBalance', 'WorkerFormation', + 'WorkerMedical', ], }, children: [ @@ -196,6 +197,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerFormation.vue'), }, + { + name: 'WorkerMedical', + path: 'medical', + meta: { + title: 'medical', + icon: 'medical_information', + }, + component: () => import('src/pages/Worker/Card/WorkerMedical.vue'), + }, ], }, ], From e73930a4ebc08b55cbc471cb689b4e553091e4e6 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 2 Sep 2024 15:11:04 +0200 Subject: [PATCH 2/5] refs #7407 Medical Section remove table --- src/pages/Worker/Card/WorkerMedical.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue index b6d1ad248..6bca4ae85 100644 --- a/src/pages/Worker/Card/WorkerMedical.vue +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -83,7 +83,6 @@ const columns = [ }" order="date DESC" :columns="columns" - default-mode="table" auto-load :right-search="false" :is-editable="true" From 5b53e9dc37651a22ca2ea9d3c1dc87079aba6519 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 3 Sep 2024 15:25:36 +0200 Subject: [PATCH 3/5] feat: transfer an invoice --- src/components/TransferInvoiceForm.vue | 4 +--- .../Card/InvoiceOutDescriptorMenu.vue | 21 ++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/components/TransferInvoiceForm.vue b/src/components/TransferInvoiceForm.vue index 17c11d87e..23c988ee7 100644 --- a/src/components/TransferInvoiceForm.vue +++ b/src/components/TransferInvoiceForm.vue @@ -26,7 +26,6 @@ const { notify } = useNotify(); const checked = ref(true); const transferInvoiceParams = reactive({ id: $props.invoiceOutData?.id, - refFk: $props.invoiceOutData?.ref, }); const rectificativeTypeOptions = ref([]); @@ -46,7 +45,6 @@ const makeInvoice = async () => { cplusRectificationTypeFk: transferInvoiceParams.cplusRectificationTypeFk, invoiceCorrectionTypeFk: transferInvoiceParams.invoiceCorrectionTypeFk, newClientFk: transferInvoiceParams.newClientFk, - refFk: transferInvoiceParams.refFk, siiTypeInvoiceOutFk: transferInvoiceParams.siiTypeInvoiceOutFk, makeInvoice: checked.value, }; @@ -74,7 +72,7 @@ const makeInvoice = async () => { } } - const { data } = await axios.post('InvoiceOuts/transferInvoice', params); + const { data } = await axios.post('InvoiceOuts/transfer', params); notify(t('Transferred invoice'), 'positive'); const id = data?.[0]; if (id) router.push({ name: 'InvoiceOutSummary', params: { id } }); diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue index 4c02ccf84..0ded54688 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue @@ -228,11 +228,19 @@ const showTransferInvoiceForm = async () => { - - {{ t('With warehouse') }} + + {{ t('With warehouse, no invoice') }} - - {{ t('Without warehouse') }} + + {{ t('Without warehouse, no invoice') }} + + + {{ t('With warehouse, with invoice') }} + + + {{ + t('Without warehouse, with invoice') + }} @@ -255,7 +263,10 @@ es: As CSV: como CSV Send PDF: Enviar PDF Send CSV: Enviar CSV - With warehouse: Con almacén + With warehouse, no invoice: Con almacén, sin factura + Without warehouse, no invoice: Sin almacén, sin factura + With warehouse, with invoice: Con almacén, con factura + Without warehouse, with invoice: Sin almacén, con factura Without warehouse: Sin almacén InvoiceOut deleted: Factura eliminada Confirm deletion: Confirmar eliminación From 91164da2ebdf3db9a48f7170c305e7e6114e6882 Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 4 Sep 2024 18:16:40 +0200 Subject: [PATCH 4/5] feat: refuncInvoiceForm component --- src/components/RefundInvoiceForm.vue | 173 ++++++++++++++++++ src/components/TransferInvoiceForm.vue | 12 +- .../Card/InvoiceOutDescriptorMenu.vue | 33 ++-- 3 files changed, 194 insertions(+), 24 deletions(-) create mode 100644 src/components/RefundInvoiceForm.vue diff --git a/src/components/RefundInvoiceForm.vue b/src/components/RefundInvoiceForm.vue new file mode 100644 index 000000000..1b545103a --- /dev/null +++ b/src/components/RefundInvoiceForm.vue @@ -0,0 +1,173 @@ + + + + + +en: + Refund invoice: Refund invoice + Rectificative type: Rectificative type + Class: Class + Type: Type + Refunded invoice: Refunded invoice + Inherit warehouse: Inherit the warehouse + Inherit warehouse tooltip: Select this option to inherit the warehouse when refunding the invoice + Accept: Accept + Error refunding invoice: Error refunding invoice +es: + Refund invoice: Abonar factura + Rectificative type: Tipo rectificativa + Class: Clase + Type: Tipo + Refunded invoice: Factura abonada + Inherit warehouse: Heredar el almacén + Inherit warehouse tooltip: Seleccione esta opción para heredar el almacén al abonar la factura. + Accept: Aceptar + Error refunding invoice: Error abonando factura + diff --git a/src/components/TransferInvoiceForm.vue b/src/components/TransferInvoiceForm.vue index 23c988ee7..f7050cdba 100644 --- a/src/components/TransferInvoiceForm.vue +++ b/src/components/TransferInvoiceForm.vue @@ -2,13 +2,12 @@ import { ref, reactive } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; -import { useQuasar } from 'quasar'; +import { useQuasar, useDialogPluginComponent } from 'quasar'; import VnConfirm from 'components/ui/VnConfirm.vue'; import VnRow from 'components/ui/VnRow.vue'; import FetchData from 'components/FetchData.vue'; import VnSelect from 'components/common/VnSelect.vue'; import FormPopup from './FormPopup.vue'; -import { useDialogPluginComponent } from 'quasar'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; @@ -18,18 +17,19 @@ const $props = defineProps({ default: () => {}, }, }); + const { dialogRef } = useDialogPluginComponent(); const quasar = useQuasar(); const { t } = useI18n(); const router = useRouter(); const { notify } = useNotify(); + +const rectificativeTypeOptions = ref([]); +const siiTypeInvoiceOutsOptions = ref([]); const checked = ref(true); const transferInvoiceParams = reactive({ id: $props.invoiceOutData?.id, }); - -const rectificativeTypeOptions = ref([]); -const siiTypeInvoiceOutsOptions = ref([]); const invoiceCorrectionTypesOptions = ref([]); const selectedClient = (client) => { @@ -43,9 +43,9 @@ const makeInvoice = async () => { const params = { id: transferInvoiceParams.id, cplusRectificationTypeFk: transferInvoiceParams.cplusRectificationTypeFk, + siiTypeInvoiceOutFk: transferInvoiceParams.siiTypeInvoiceOutFk, invoiceCorrectionTypeFk: transferInvoiceParams.invoiceCorrectionTypeFk, newClientFk: transferInvoiceParams.newClientFk, - siiTypeInvoiceOutFk: transferInvoiceParams.siiTypeInvoiceOutFk, makeInvoice: checked.value, }; diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue index 0ded54688..6a3bb5a78 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue @@ -5,6 +5,7 @@ import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; import TransferInvoiceForm from 'src/components/TransferInvoiceForm.vue'; +import RefundInvoiceForm from 'src/components/RefundInvoiceForm.vue'; import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import useNotify from 'src/composables/useNotify'; @@ -37,7 +38,6 @@ const { openConfirmationModal } = useVnConfirm(); const quasar = useQuasar(); const salixUrl = ref(); const invoiceFormType = ref('pdf'); -const defaultEmailAddress = ref($props.invoiceOutData.client?.email); const showInvoicePdf = () => { const url = `api/InvoiceOuts/${$props.invoiceOutData.id}/download?access_token=${token}`; @@ -54,12 +54,6 @@ const showSendInvoiceDialog = (type) => { invoiceFormType.value = type; quasar.dialog({ component: SendEmailDialog, - componentProps: { - data: { - address: defaultEmailAddress.value, - }, - promise: sendEmailInvoice, - }, }); }; @@ -141,6 +135,15 @@ const showTransferInvoiceForm = async () => { }, }); }; + +const showRefundInvoiceForm = () => { + quasar.dialog({ + component: RefundInvoiceForm, + componentProps: { + invoiceOutData: $props.invoiceOutData, + }, + }); +};