From 4b720d9b674497c112dd64dd3e357b76eece5451 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jul 2024 19:33:02 +0000 Subject: [PATCH 1/5] warmfix: ticketList add imports --- src/pages/Ticket/TicketList.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index ae635fb4e..bf78177da 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -3,6 +3,8 @@ import { onMounted, onUnmounted } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useStateStore } from 'stores/useStateStore'; +import { toDate, toCurrency } from 'src/filters/index'; + import VnPaginate from 'src/components/ui/VnPaginate.vue'; import TicketSummary from './Card/TicketSummary.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; From 93076f459c65783bc3283b78b81fb414fc16b4b4 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jul 2024 19:33:48 +0000 Subject: [PATCH 2/5] Actualizar src/pages/Ticket/TicketList.vue --- src/pages/Ticket/TicketList.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index bf78177da..6090bdbef 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useStateStore } from 'stores/useStateStore'; import { toDate, toCurrency } from 'src/filters/index'; - import VnPaginate from 'src/components/ui/VnPaginate.vue'; import TicketSummary from './Card/TicketSummary.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; From 5232df259548f8c9a69811f079c91d91326f1d72 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 11 Jul 2024 15:03:39 +0200 Subject: [PATCH 3/5] feat: claimList better support vnTable, claimSummary redesign. BREAKING CHANGE: VnTable default-mode table --- src/components/VnTable/VnOrder.vue | 5 ++- src/components/VnTable/VnTable.vue | 12 ++++-- src/components/VnTable/VnVisibleColumn.vue | 8 ++++ src/composables/useArrayData.js | 10 ++--- src/pages/Claim/Card/ClaimSummary.vue | 23 +++++++---- src/pages/Claim/Card/ClaimSummaryAction.vue | 1 - src/pages/Claim/ClaimFilter.vue | 2 + src/pages/Claim/ClaimList.vue | 41 ++++++++++++++++++- src/pages/Customer/CustomerList.vue | 1 - src/pages/Entry/EntryLatestBuys.vue | 1 - src/pages/Entry/EntryList.vue | 1 - src/pages/InvoiceOut/InvoiceOutList.vue | 1 - .../InvoiceOut/InvoiceOutNegativeBases.vue | 1 - src/pages/Order/OrderLines.vue | 1 - src/pages/Order/OrderList.vue | 1 - src/pages/Route/Agency/AgencyList.vue | 3 +- src/pages/Route/Cmr/CmrList.vue | 1 + src/pages/Route/RouteList.vue | 1 - src/pages/Supplier/SupplierList.vue | 1 - src/pages/Travel/TravelList.vue | 1 - src/pages/Worker/Card/WorkerBalance.vue | 1 - src/pages/Worker/Card/WorkerFormation.vue | 1 - 22 files changed, 84 insertions(+), 34 deletions(-) diff --git a/src/components/VnTable/VnOrder.vue b/src/components/VnTable/VnOrder.vue index ac77c8ac6..63e5eecb4 100644 --- a/src/components/VnTable/VnOrder.vue +++ b/src/components/VnTable/VnOrder.vue @@ -5,7 +5,7 @@ const model = defineModel({ type: Object, required: true }); const $props = defineProps({ name: { type: String, - required: true, + default: '', }, label: { type: String, @@ -28,6 +28,7 @@ const hover = ref(); const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl }); async function orderBy(name, direction) { + if (!name) return; switch (direction) { case 'DESC': direction = undefined; @@ -54,7 +55,7 @@ defineExpose({ orderBy }); > {{ label }} [], + }, }); const { notify } = useNotify(); @@ -30,8 +34,12 @@ function setUserConfigViewData(data, isLocal) { if (!data) return; // Importante: El name de las columnas de la tabla debe conincidir con el name de las variables que devuelve la view config if (!isLocal) localColumns.value = []; + // Array to Object + const skippeds = $props.skip.reduce((a, v) => ({ ...a, [v]: v }), {}); + for (let column of columns.value) { const { label, name } = column; + if (skippeds[name]) continue; column.visible = data[name] ?? true; if (!isLocal) localColumns.value.push({ name, label, visible: column.visible }); } diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 1185db05a..3563e0dbd 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -149,7 +149,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { store.filter = {}; if (params) store.userParams = { ...params }; - const response = await fetch({ append: false }); + const response = await fetch({}); return response; } @@ -162,7 +162,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { store.userParams = userParams; arrayDataStore.reset(['skip', 'filter.skip', 'page']); - await fetch({ append: false }); + await fetch({}); return { filter, params }; } @@ -187,7 +187,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } store.order = order; - fetch({ append: false, updateRouter: true }); + fetch({}); index++; return { index, order }; @@ -201,7 +201,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { if (index > -1) order.splice(index, 1); store.order = order; - fetch({ append: false, updateRouter: true }); + fetch({}); } function sanitizerParams(params, exprBuilder) { @@ -231,7 +231,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } async function refresh() { - if (Object.values(store.userParams).length) await fetch({ append: false }); + if (Object.values(store.userParams).length) await fetch({}); } function updateStateParams() { diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue index 88ca48081..a34830631 100644 --- a/src/pages/Claim/Card/ClaimSummary.vue +++ b/src/pages/Claim/Card/ClaimSummary.vue @@ -211,7 +211,7 @@ async function changeState(value) { > - + -
+
Video - +
- + - + diff --git a/src/pages/Claim/Card/ClaimSummaryAction.vue b/src/pages/Claim/Card/ClaimSummaryAction.vue index b08504768..d875126cb 100644 --- a/src/pages/Claim/Card/ClaimSummaryAction.vue +++ b/src/pages/Claim/Card/ClaimSummaryAction.vue @@ -71,7 +71,6 @@ const columns = [