From cdbbd576e379a45344c2c648217fa075e9b3ecc6 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 2 Jul 2024 14:54:14 +0200 Subject: [PATCH 1/7] refactor: refs #6899 end invoiceOut migration with VnTable --- src/components/CreateManualInvoiceForm.vue | 25 +- src/components/TransferInvoiceForm.vue | 167 ++++---- src/components/VnTable/VnTable.vue | 16 +- src/components/ui/CardDescriptor.vue | 5 +- .../InvoiceOut/Card/InvoiceOutDescriptor.vue | 4 +- .../Card/InvoiceOutDescriptorMenu.vue | 31 +- .../InvoiceOut/Card/InvoiceOutSummary.vue | 8 +- src/pages/InvoiceOut/InvoiceOutFilter.vue | 3 +- src/pages/InvoiceOut/InvoiceOutGlobal.vue | 9 +- src/pages/InvoiceOut/InvoiceOutList.vue | 379 ++++++++++-------- .../InvoiceOut/InvoiceOutNegativeBases.vue | 225 ++++++----- src/pages/InvoiceOut/locale/en.yml | 25 ++ src/pages/InvoiceOut/locale/es.yml | 29 ++ src/router/modules/invoiceOut.js | 2 +- 14 files changed, 527 insertions(+), 401 deletions(-) create mode 100644 src/pages/InvoiceOut/locale/en.yml diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue index 92399c20c..1aa95011f 100644 --- a/src/components/CreateManualInvoiceForm.vue +++ b/src/components/CreateManualInvoiceForm.vue @@ -46,22 +46,6 @@ const onDataSaved = async (formData, requestResponse) => { @on-fetch="(data) => (taxAreasOptions = data)" auto-load /> - - { option-value="id" v-model="data.ticketFk" @update:model-value="data.clientFk = null" + url="Tickets" + :where="{ refFk: null }" + :fields="['id', 'nickname']" + :filter-options="{ order: 'shipped DESC' }" > + + diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 493f1480e..8c00bb3f2 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -59,6 +59,10 @@ const $props = defineProps({ type: Boolean, default: false, }, + hasSubtoolbar: { + type: Boolean, + default: true, + }, }); const { t } = useI18n(); const stateStore = useStateStore(); @@ -177,9 +181,12 @@ function columnName(col) { function getColAlign(col) { return 'text-' + (col.align ?? 'left') } + +const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']); defineExpose({ reload, redirect: redirectFn, + selected });