From 479f2a8e53ffe91a5c7842758e37912acb9505fc Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 17 Sep 2024 08:31:02 +0200 Subject: [PATCH 01/13] feat: refs #7884 added new filter field --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Entry/MyEntries.vue | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index f99244d42..27c904aaf 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -50,6 +50,7 @@ globals: summary: basicData: Basic data daysOnward: Days onward + daysAgo: Days ago today: Today yesterday: Yesterday dateFormat: en-GB diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 360627fda..e0614caaf 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -49,6 +49,7 @@ globals: summary: basicData: Datos básicos daysOnward: Días adelante + daysAgo: Días atras today: Hoy yesterday: Ayer dateFormat: es-ES diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index 1c56427f4..17b1f91c5 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -78,7 +78,13 @@ const columns = computed(() => [ { align: 'left', label: t('globals.daysOnward'), - name: 'days', + name: 'daysOnward', + visible: false, + }, + { + align: 'left', + label: t('globals.daysAgo'), + name: 'daysAgo', visible: false, }, { From 566d657f70d45934a4aa8b3368379d2c985ac6de Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Sep 2024 08:23:15 +0200 Subject: [PATCH 02/13] feat: refs #7884 added default params and chip translations --- src/components/ui/VnFilterPanel.vue | 7 ++++++- src/pages/Entry/MyEntries.vue | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 637180c22..4f71fdea9 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -252,7 +252,7 @@ function sanitizer(params) { >
- {{ chip.label }}: + {{ t(`${chip.label}`) }}: "{{ formatValue(chip.value) }}"
@@ -286,6 +286,9 @@ function sanitizer(params) { +en: + daysOnward: Days onward + daysAgo: Days ago es: No filters applied: No se han aplicado filtros Applied filters: Filtros aplicados @@ -294,4 +297,6 @@ es: Search: Buscar Yes: Si No: No + daysOnward: Días Adelante + daysAgo: Días Atrás diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index 17b1f91c5..b95c73847 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -9,6 +9,11 @@ import VnTable from 'components/VnTable/VnTable.vue'; const { t } = useI18n(); const quasar = useQuasar(); +const params = { + daysOnward: 7, + daysAgo: 3, +}; + const columns = computed(() => [ { align: 'left', @@ -120,6 +125,7 @@ const printBuys = (rowId) => { data-key="myEntriesList" url="Entries/filter" :columns="columns" + :user-params="params" default-mode="card" order="shipped DESC" auto-load From e64e6eefe3a17bf1e3d393140b401708dbeda69d Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 1 Oct 2024 10:35:31 +0200 Subject: [PATCH 03/13] refs #7355 add role --- src/components/ui/VnSearchbar.vue | 1 + src/pages/Account/AccountList.vue | 24 +++++++++++++++++++++--- src/pages/Account/Card/AccountCard.vue | 3 +++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index a78403b5c..dc6d4751c 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -108,6 +108,7 @@ async function search() { ...Object.fromEntries(staticParams), search: searchText.value, }, + ...{ filter: props.filter }, }; if (props.whereFilter) { diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index d698596b9..1beac0d0b 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -9,7 +9,9 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); const tableRef = ref(); - +const filter = { + include: { relation: 'role', scope: { fields: ['id', 'name'] } }, +}; const columns = computed(() => [ { align: 'left', @@ -29,7 +31,22 @@ const columns = computed(() => [ }, { align: 'left', - name: 'username', + name: 'roleFk', + label: t('role'), + columnFilter: { + component: 'select', + name: 'roleFk', + attrs: { + url: 'VnRoles', + optionValue: 'id', + optionLabel: 'name', + }, + }, + format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name), + }, + { + align: 'left', + name: 'nickname', label: t('Nickname'), isTitle: true, component: 'input', @@ -104,12 +121,13 @@ const exprBuilder = (param, value) => { :expr-builder="exprBuilder" :label="t('account.search')" :info="t('account.searchInfo')" + :filter="filter" /> - + + + + + + + +en: + travel: + Id: Contains + ref: Reference + agency: Agency + warehouseInFk: W. In + shipped: Shipped + shipmentHour: Shipment Hour + warehouseOut: W. Out + landed: Landed + landingHour: Landing Hour + totalEntries: Σ +es: + travel: + Id: Id + ref: Referencia + agency: Agencia + warehouseInFk: Alm.Salida + shipped: F.Envío + shipmentHour: Hora de envío + warehouseOut: Alm.Entrada + landed: F.Entrega + landingHour: Hora de entrega + totalEntries: Σ + diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index e56f5d2ff..05d2e5eda 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -9,6 +9,8 @@ import TravelSummary from './Card/TravelSummary.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import { toDate } from 'src/filters'; import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; +import RightMenu from 'src/components/common/RightMenu.vue'; +import TravelFilter from './TravelFilter.vue'; const { viewSummary } = useSummaryDialog(); const router = useRouter(); @@ -24,6 +26,7 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); +const travelFilterRef = ref(); onMounted(async () => { stateStore.rightDrawer = true; }); @@ -201,6 +204,11 @@ const columns = computed(() => [ :label="t('Search travel')" data-key="TravelList" /> + + + [ editorFk: entityId, }, }" + :right-search="false" :user-params="{ daysOnward: 7 }" order="landed DESC" :columns="columns" @@ -220,7 +229,6 @@ const columns = computed(() => [ redirect="travel" :is-editable="false" :use-model="true" - chip-locale="travel.travelList.tableVisibleColumns" > + es: Download as CSV: Descargar como CSV + params: + from: Desde + to: Hasta +en: + params: + from: From + to: To From 7db166974f675a46f0bedf7dd6589e1a7e73c20c Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Oct 2024 10:34:50 +0200 Subject: [PATCH 11/13] feat: refs #7884 use VnTable prop for chip label filters and modified translations --- src/components/ui/VnFilterPanel.vue | 4 +--- src/pages/Entry/MyEntries.vue | 29 +++++++++++++++++------------ src/pages/Entry/locale/en.yml | 18 ++++++++++++------ src/pages/Entry/locale/es.yml | 19 ++++++++++++------- 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 7e4785441..e39a841c3 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -250,7 +250,7 @@ function sanitizer(params) { >
- {{ t(`${chip.label}`) }}: + {{ chip.label }}: "{{ formatValue(chip.value) }}"
@@ -295,6 +295,4 @@ es: Search: Buscar Yes: Si No: No - daysOnward: Días Adelante - daysAgo: Días Atrás diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index 07cedd69b..2c37c2c42 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -18,18 +18,18 @@ const columns = computed(() => [ { align: 'left', name: 'id', - label: t('customer.extendedList.tableVisibleColumns.id'), + label: t('myEntries.id'), columnFilter: false, isTitle: true, }, { visible: false, align: 'right', - label: t('shipped'), + label: t('myEntries.shipped'), name: 'shipped', columnFilter: { name: 'fromShipped', - label: t('fromShipped'), + label: t('myEntries.fromShipped'), component: 'date', }, format: ({ shipped }) => toDate(shipped), @@ -37,11 +37,11 @@ const columns = computed(() => [ { visible: false, align: 'left', - label: t('shipped'), + label: t('myEntries.shipped'), name: 'shipped', columnFilter: { name: 'toShipped', - label: t('toShipped'), + label: t('myEntries.toShipped'), component: 'date', }, format: ({ shipped }) => toDate(shipped), @@ -49,14 +49,14 @@ const columns = computed(() => [ }, { align: 'right', - label: t('shipped'), + label: t('myEntries.shipped'), name: 'shipped', columnFilter: false, format: ({ shipped }) => toDate(shipped), }, { align: 'right', - label: t('landed'), + label: t('myEntries.landed'), name: 'landed', columnFilter: false, format: ({ landed }) => toDate(landed), @@ -64,31 +64,35 @@ const columns = computed(() => [ { align: 'right', - label: t('globals.wareHouseIn'), + label: t('myEntries.wareHouseIn'), name: 'warehouseInFk', - format: (row) => row.warehouseInName, + format: (row) => { + row.warehouseInName; + }, cardVisible: true, columnFilter: { + name: 'warehouseInFk', + label: t('myEntries.warehouseInFk'), component: 'select', attrs: { url: 'warehouses', fields: ['id', 'name'], optionLabel: 'name', optionValue: 'id', + alias: 't', }, - alias: 't', inWhere: true, }, }, { align: 'left', - label: t('globals.daysOnward'), + label: t('myEntries.daysOnward'), name: 'daysOnward', visible: false, }, { align: 'left', - label: t('globals.daysAgo'), + label: t('myEntries.daysAgo'), name: 'daysAgo', visible: false, }, @@ -130,6 +134,7 @@ const printBuys = (rowId) => { default-mode="card" order="shipped DESC" auto-load + chip-locale="myEntries" /> diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index a9faa814b..b4d7c33bc 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -6,9 +6,15 @@ entryFilter: filter: search: General search reference: Reference -landed: Landed -shipped: Shipped -fromShipped: Shipped(from) -toShipped: Shipped(to) -printLabels: Print stickers -viewLabel: View sticker +myEntries: + id: ID + landed: Landed + shipped: Shipped + fromShipped: Shipped(from) + toShipped: Shipped(to) + printLabels: Print stickers + viewLabel: View sticker + wareHouseIn: Warehouse in + warehouseInFk: Warehouse in + daysOnward: Days onward + daysAgo: Days ago diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index eb1e3f88a..2dfd601b1 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -9,10 +9,15 @@ entryFilter: filter: search: Búsqueda general reference: Referencia - -landed: F. llegada -shipped: F. salida -fromShipped: F. salida(desde) -toShipped: F. salida(hasta) -printLabels: Imprimir etiquetas -viewLabel: Ver etiqueta +myEntries: + id: ID + landed: F. llegada + shipped: F. salida + fromShipped: F. salida(desde) + toShipped: F. salida(hasta) + printLabels: Imprimir etiquetas + viewLabel: Ver etiqueta + wareHouseIn: Alm. entrada + warehouseInFk: Alm. entrada + daysOnward: Días adelante + daysAgo: Días atras From 98df741f1b1bd2761960e0ce60c1578b8a714d67 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Oct 2024 10:43:54 +0200 Subject: [PATCH 12/13] fix: refs #7884 deleted useless translations --- src/components/ui/VnFilterPanel.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index e39a841c3..43d634ad9 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -284,9 +284,6 @@ function sanitizer(params) { -en: - daysOnward: Days onward - daysAgo: Days ago es: No filters applied: No se han aplicado filtros Applied filters: Filtros aplicados From b08a5e63e982f3150664a4a257783219de52f7d0 Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 3 Oct 2024 08:29:26 +0200 Subject: [PATCH 13/13] fix: inheritWarehouse --- src/components/RefundInvoiceForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/RefundInvoiceForm.vue b/src/components/RefundInvoiceForm.vue index c21c892dd..9d9f0cff1 100644 --- a/src/components/RefundInvoiceForm.vue +++ b/src/components/RefundInvoiceForm.vue @@ -24,9 +24,9 @@ const { notify } = useNotify(); const rectificativeTypeOptions = ref([]); const siiTypeInvoiceOutsOptions = ref([]); -const inheritWarehouse = ref(true); const invoiceParams = reactive({ id: $props.invoiceOutData?.id, + inheritWarehouse: true, }); const invoiceCorrectionTypesOptions = ref([]); @@ -138,7 +138,7 @@ const refund = async () => {
{{ t('Inherit warehouse tooltip') }}