From 48f10707400afd1ddedb843f236dd6fc28d5b8bd Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 5 Nov 2024 12:52:53 +0100 Subject: [PATCH 01/69] feat(VnLog): add descriptors --- src/components/common/VnJsonValue.vue | 63 ++++++++++++++++++--------- src/components/common/VnLog.vue | 59 +++++++++++-------------- src/stores/useDescriptorStore.js | 29 ++++++++++++ 3 files changed, 98 insertions(+), 53 deletions(-) create mode 100644 src/stores/useDescriptorStore.js diff --git a/src/components/common/VnJsonValue.vue b/src/components/common/VnJsonValue.vue index a2e858d0d..408d16d1a 100644 --- a/src/components/common/VnJsonValue.vue +++ b/src/components/common/VnJsonValue.vue @@ -1,67 +1,86 @@ @@ -85,4 +104,8 @@ updateValue(); color: #cd7c7c; font-style: italic; } +.json-link { + text-decoration: underline; + cursor: pointer; +} diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 8c71c0997..7b65a8a88 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -598,33 +598,17 @@ watch( /> - - - {{ prop.nameI18n }}: - - - ,  - - - -
+ - {{ prop.nameI18n }}: + v-if=" + prop2Index < log.props.length + " + class="q-mr-xs" + >, - #{{ prop.val.id }} - + { + const descriptors = ref({}); + const loaded = ref(false); + + function set() { + const files = import.meta.glob(`src/**/*DescriptorProxy.vue`); + for (const file in files) { + descriptors.value[file.split('/').at(-1).slice(0, -19).toLowerCase() + 'Fk'] = + defineAsyncComponent(() => import(file)); + } + loaded.value = true; + } + + function get() { + if (!loaded.value) set(); + } + + function has(name) { + get(); + return descriptors.value[name]; + } + + return { + has, + }; +}); From 8b9408d0fb4d1561a495213a3925ab9b1d94f49d Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 18 Feb 2025 10:33:58 +0100 Subject: [PATCH 02/69] test: refs #8626 addTestCases --- src/pages/Route/Card/RouteDescriptor.vue | 3 + src/pages/Route/RouteList.vue | 15 +++- .../integration/route/routeList.spec.js | 74 ++++++++++++------- 3 files changed, 65 insertions(+), 27 deletions(-) diff --git a/src/pages/Route/Card/RouteDescriptor.vue b/src/pages/Route/Card/RouteDescriptor.vue index b6d0ba8c4..d3b5da558 100644 --- a/src/pages/Route/Card/RouteDescriptor.vue +++ b/src/pages/Route/Card/RouteDescriptor.vue @@ -1,11 +1,14 @@ @@ -104,8 +94,4 @@ updateValue(); color: #cd7c7c; font-style: italic; } -.json-link { - text-decoration: underline; - cursor: pointer; -} diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 1d56b3ae4..28c9206a6 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -561,9 +561,8 @@ watch( }}: @@ -619,19 +618,27 @@ watch( :key="prop2Index" class="q-pa-none text-grey" > + + {{ prop.nameI18n }}: + , #{{ prop.val.id }} @@ -644,7 +651,8 @@ watch( > ← { const descriptors = ref({}); - const loaded = ref(false); function set() { const files = import.meta.glob(`src/**/*DescriptorProxy.vue`); + const moduleParser = { + user: 'account', + client: 'customer', + }; for (const file in files) { - descriptors.value[file.split('/').at(-1).slice(0, -19).toLowerCase() + 'Fk'] = - defineAsyncComponent(() => import(file)); + console.log('fasd', file.split('/').at(-1).slice(0, -19).toLowerCase()); + const name = file.split('/').at(-1).slice(0, -19).toLowerCase(); + const descriptor = moduleParser[name] ?? name; + //Ver pq no funciona account//user + descriptors.value[descriptor + 'Fk'] = defineAsyncComponent(() => + import(file) + ); } - loaded.value = true; } function get() { - if (!loaded.value) set(); + if (!Object.keys(descriptors.value).length) set(); } function has(name) { get(); + console.log('descriptors.value: ', descriptors.value); return descriptors.value[name]; } From 1ddc4793ccb505a2b1fa98f70f6e7b272e9c8a7d Mon Sep 17 00:00:00 2001 From: jtubau Date: Wed, 26 Feb 2025 10:32:41 +0100 Subject: [PATCH 06/69] refactor: refs #8626 add formatting for agency and vehicle columns in RouteList --- src/pages/Route/RouteList.vue | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 7bcdc8896..e1ae30786 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -58,6 +58,7 @@ const columns = computed(() => [ align: 'left', name: 'agencyModeFk', label: t('route.Agency'), + format: (row) => row?.agencyName, cardVisible: true, component: 'select', attrs: { @@ -76,6 +77,7 @@ const columns = computed(() => [ align: 'left', name: 'vehicleFk', label: t('route.Vehicle'), + format: (row) => row?.vehiclePlateNumber, cardVisible: true, component: 'select', attrs: { @@ -173,16 +175,6 @@ const columns = computed(() => [ - - From d6f53ad63cc3ffd1fe981312d7d3600fd60778d6 Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 7 Mar 2025 13:24:57 +0100 Subject: [PATCH 07/69] fix: refs #8626 remove duplicate ref attribute from RouteList.vue --- src/pages/Route/RouteList.vue | 1 - test/cypress/integration/route/routeExtendedList.spec.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 9e8ff1fa1..b99cb8227 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -160,7 +160,6 @@ const columns = computed(() => [ :data-key ref="tableRef" :columns="columns" - ref="tableRef" :right-search="false" redirect="route" :create="{ diff --git a/test/cypress/integration/route/routeExtendedList.spec.js b/test/cypress/integration/route/routeExtendedList.spec.js index da35066c3..237729107 100644 --- a/test/cypress/integration/route/routeExtendedList.spec.js +++ b/test/cypress/integration/route/routeExtendedList.spec.js @@ -120,7 +120,7 @@ describe('Route extended list', () => { it('Should clone selected route', () => { cy.get(selectors.lastRowSelectCheckBox).click(); cy.get(selectors.cloneBtn).click(); - cy.dataCy('route.Starting date_inputDate').type('10-05-2001').click(); + cy.dataCy('route.Starting date_inputDate').type('10-05-2001'); cy.get('.q-card__actions > .q-btn--standard > .q-btn__content').click(); cy.validateContent(selectors.date, '05/10/2001'); }); @@ -153,7 +153,7 @@ describe('Route extended list', () => { }); it('Should add ticket to route', () => { - cy.dataCy('tableAction-0').last().click(); + cy.dataCy('tableAction-0').first().click(); cy.get(selectors.firstTicketsRowSelectCheckBox).click(); cy.get('.q-card__actions > .q-btn--standard > .q-btn__content').click(); cy.checkNotification(dataSaved); From 27957c57758275600684a9786bb57921299ca5e3 Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 7 Mar 2025 13:25:29 +0100 Subject: [PATCH 08/69] test: refs #8626 enable route extended list tests in Cypress --- test/cypress/integration/route/routeExtendedList.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cypress/integration/route/routeExtendedList.spec.js b/test/cypress/integration/route/routeExtendedList.spec.js index 231a9a6df..237729107 100644 --- a/test/cypress/integration/route/routeExtendedList.spec.js +++ b/test/cypress/integration/route/routeExtendedList.spec.js @@ -1,4 +1,4 @@ -describe.skip('Route extended list', () => { +describe('Route extended list', () => { const getSelector = (colField) => `tr:last-child > [data-col-field="${colField}"]`; const selectors = { From 80eebef931030b06355cb3e9ccd628165f39c015 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 7 Mar 2025 14:01:36 +0100 Subject: [PATCH 09/69] feat(VnLog): refs #6994 add descriptors --- src/components/common/VnJsonValue.vue | 13 +++-- src/components/common/VnLog.vue | 76 +++++++++++++-------------- src/stores/useDescriptorStore.js | 32 +++++------ src/stores/useStateStore.js | 7 +++ 4 files changed, 69 insertions(+), 59 deletions(-) diff --git a/src/components/common/VnJsonValue.vue b/src/components/common/VnJsonValue.vue index 11588e710..331c72d0a 100644 --- a/src/components/common/VnJsonValue.vue +++ b/src/components/common/VnJsonValue.vue @@ -66,11 +66,15 @@ updateValue(); :title="type === 'string' && value.length > maxStrLen ? value : ''" :class="{ [cssClass]: t !== '', - 'json-link': descriptorStore.has(name), + 'link json-link': descriptorStore.has(name), }" > - {{ name }} - + {{ t }} + @@ -94,4 +98,7 @@ updateValue(); color: #cd7c7c; font-style: italic; } +.json-link { + text-decoration: underline; +} diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 1d73e4689..f4d6c5bca 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -561,7 +561,7 @@ watch( }}: @@ -599,17 +599,36 @@ watch( /> + + + {{ prop.nameI18n }}: + + + ,  + + + +
- , - - - #{{ prop.val.id }} - - - ← + { - const descriptors = ref({}); + function get() { + if (Object.keys(descriptors).length) return descriptors; - function set() { - const files = import.meta.glob(`src/**/*DescriptorProxy.vue`); + const currentDescriptors = {}; + const files = import.meta.glob(`/src/**/*DescriptorProxy.vue`); const moduleParser = { - user: 'account', + account: 'user', client: 'customer', }; for (const file in files) { - console.log('fasd', file.split('/').at(-1).slice(0, -19).toLowerCase()); const name = file.split('/').at(-1).slice(0, -19).toLowerCase(); const descriptor = moduleParser[name] ?? name; - //Ver pq no funciona account//user - descriptors.value[descriptor + 'Fk'] = defineAsyncComponent(() => - import(file) + currentDescriptors[descriptor + 'Fk'] = defineAsyncComponent( + () => import(/* @vite-ignore */ file), ); } - } - - function get() { - if (!Object.keys(descriptors.value).length) set(); + setDescriptors(currentDescriptors); + return currentDescriptors; } function has(name) { - get(); - console.log('descriptors.value: ', descriptors.value); - return descriptors.value[name]; + console.log('get(): ', get()); + return get()[name]; } return { has, + get, }; }); diff --git a/src/stores/useStateStore.js b/src/stores/useStateStore.js index ca447bc11..44fa133d0 100644 --- a/src/stores/useStateStore.js +++ b/src/stores/useStateStore.js @@ -8,6 +8,7 @@ export const useStateStore = defineStore('stateStore', () => { const rightAdvancedDrawer = ref(false); const subToolbar = ref(false); const cardDescriptor = ref(null); + const descriptors = ref({}); function cardDescriptorChangeValue(descriptor) { cardDescriptor.value = descriptor; @@ -52,6 +53,10 @@ export const useStateStore = defineStore('stateStore', () => { return subToolbar.value; } + function setDescriptors(value) { + descriptors.value = value; + } + return { cardDescriptor, cardDescriptorChangeValue, @@ -68,5 +73,7 @@ export const useStateStore = defineStore('stateStore', () => { isSubToolbarShown, toggleSubToolbar, rightDrawerChangeValue, + descriptors, + setDescriptors, }; }); From a4dfb549be90b00722b4d8173da1818e9b72b202 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 7 Mar 2025 14:02:03 +0100 Subject: [PATCH 10/69] test: refs #6994 add e2e VnLog descriptors --- src/components/ui/CardDescriptor.vue | 2 +- src/pages/Claim/Card/ClaimDescriptorProxy.vue | 14 ++++++++++++++ test/cypress/integration/vnComponent/VnLog.spec.js | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/pages/Claim/Card/ClaimDescriptorProxy.vue diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index a29d1d429..ad344082d 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -200,7 +200,7 @@ const toModule = computed(() =>
- + #{{ getValueFromPath(subtitle) ?? entity.id }} +import ClaimDescriptor from './ClaimDescriptor.vue'; +import ClaimSummary from './ClaimSummary.vue'; + + diff --git a/test/cypress/integration/vnComponent/VnLog.spec.js b/test/cypress/integration/vnComponent/VnLog.spec.js index 80b9d07df..0baab21c9 100644 --- a/test/cypress/integration/vnComponent/VnLog.spec.js +++ b/test/cypress/integration/vnComponent/VnLog.spec.js @@ -22,4 +22,11 @@ describe('VnLog', () => { cy.get('.q-page').click(); cy.validateContent(chips[0], 'Claim'); }); + + it('should show claimDescriptor', () => { + cy.get('.json-link').first().contains('1'); + cy.get('.json-link').first().click(); + cy.dataCy('descriptor_id').contains('1'); + cy.get('.json-link').first().click(); + }); }); From 564877a73c767ee3064dde534373964ebdfb59a5 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 7 Mar 2025 14:02:21 +0100 Subject: [PATCH 11/69] test: refs #6994 add front test descriptors --- .../Account/Card/AccountDescriptorProxy.vue | 14 ++++++++++ .../__tests__/useDescriptorStore.spec.js | 28 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/pages/Account/Card/AccountDescriptorProxy.vue create mode 100644 src/stores/__tests__/useDescriptorStore.spec.js diff --git a/src/pages/Account/Card/AccountDescriptorProxy.vue b/src/pages/Account/Card/AccountDescriptorProxy.vue new file mode 100644 index 000000000..de3220fea --- /dev/null +++ b/src/pages/Account/Card/AccountDescriptorProxy.vue @@ -0,0 +1,14 @@ + + diff --git a/src/stores/__tests__/useDescriptorStore.spec.js b/src/stores/__tests__/useDescriptorStore.spec.js new file mode 100644 index 000000000..61aab8d14 --- /dev/null +++ b/src/stores/__tests__/useDescriptorStore.spec.js @@ -0,0 +1,28 @@ +import { describe, expect, it, beforeEach } from 'vitest'; +import 'app/test/vitest/helper'; + +import { useDescriptorStore } from 'src/stores/useDescriptorStore'; +import { useStateStore } from 'stores/useStateStore'; + +describe('useDescriptorStore', () => { + const { get, has } = useDescriptorStore(); + const stateStore = useStateStore(); + + beforeEach(() => { + stateStore.setDescriptors({}); + }); + + function getDescriptors() { + return stateStore.descriptors; + } + + it('should get descriptors in stateStore', async () => { + expect(Object.keys(getDescriptors()).length).toBe(0); + get(); + expect(Object.keys(getDescriptors()).length).toBeGreaterThan(0); + }); + + it('should find ticketDescriptor if search ticketFk', async () => { + expect(has('ticketFk')).toBeDefined(); + }); +}); From bb6082026b6ea6d27b62d0250b17fb2b3efaa24d Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 7 Mar 2025 14:59:29 +0100 Subject: [PATCH 12/69] refactor(descriptorStore): refs #6994 remove debug log from has function --- src/stores/useDescriptorStore.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stores/useDescriptorStore.js b/src/stores/useDescriptorStore.js index 7ffbdda7a..150db7fbd 100644 --- a/src/stores/useDescriptorStore.js +++ b/src/stores/useDescriptorStore.js @@ -26,7 +26,6 @@ export const useDescriptorStore = defineStore('descriptorStore', () => { } function has(name) { - console.log('get(): ', get()); return get()[name]; } From 574b143626d836e2443bf05c6b62de108e3ec771 Mon Sep 17 00:00:00 2001 From: jtubau Date: Fri, 7 Mar 2025 15:50:45 +0100 Subject: [PATCH 13/69] test: refs #8626 update assertion in routeList.spec.js to use 'should' syntax --- test/cypress/integration/route/routeList.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cypress/integration/route/routeList.spec.js b/test/cypress/integration/route/routeList.spec.js index 8eed1275c..8039cb17f 100644 --- a/test/cypress/integration/route/routeList.spec.js +++ b/test/cypress/integration/route/routeList.spec.js @@ -55,6 +55,6 @@ describe('Route', () => { it('Should open the worker summary pop-up', () => { cy.get(selectors.workerLink).click(); - cy.validateContent(':nth-child(1) > .value > span', 'logistic'); + cy.get(':nth-child(1) > .value > span').should('contain', 'logistic'); }); }); From fb64c24db543a156d651491800e628b26a1505b6 Mon Sep 17 00:00:00 2001 From: jtubau Date: Mon, 10 Mar 2025 07:03:29 +0100 Subject: [PATCH 14/69] test: refs #8626 refactor routeList.spec.js to use a constant for summary URL --- test/cypress/integration/route/routeList.spec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/cypress/integration/route/routeList.spec.js b/test/cypress/integration/route/routeList.spec.js index 8039cb17f..2471fc5c7 100644 --- a/test/cypress/integration/route/routeList.spec.js +++ b/test/cypress/integration/route/routeList.spec.js @@ -5,6 +5,8 @@ describe('Route', () => { rowSummaryBtn: 'tableAction-0', }; + const summaryUrl = '/summary'; + beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); @@ -33,12 +35,12 @@ describe('Route', () => { cy.dataCy('FormModelPopup_save').should('be.visible').click(); cy.checkNotification('Data created'); - cy.url().should('include', '/summary'); + cy.url().should('include', summaryUrl); }); it('Should open summary by clicking a route', () => { cy.get(selectors.worker).should('be.visible').click(); - cy.url().should('include', '/summary'); + cy.url().should('include', summaryUrl); }); it('Should open the route summary pop-up', () => { @@ -50,7 +52,7 @@ describe('Route', () => { it('Should redirect to the summary from the route summary pop-up', () => { cy.dataCy(selectors.rowSummaryBtn).last().should('be.visible').click(); cy.get('.header > .q-icon').should('be.visible').click(); - cy.url().should('include', '/summary'); + cy.url().should('include', summaryUrl); }); it('Should open the worker summary pop-up', () => { From 9f498c83df1520ae45ef9b48a73de786f3adba11 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 10 Mar 2025 08:47:46 +0100 Subject: [PATCH 15/69] test: refs #6994 add json-link front test --- src/components/common/VnJsonValue.vue | 14 +++++--- .../common/__tests__/VnJsonValue.spec.js | 34 ++++++++++++------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/components/common/VnJsonValue.vue b/src/components/common/VnJsonValue.vue index 331c72d0a..f89918d2c 100644 --- a/src/components/common/VnJsonValue.vue +++ b/src/components/common/VnJsonValue.vue @@ -4,7 +4,7 @@ import { toDateString } from 'src/filters'; import { useDescriptorStore } from 'src/stores/useDescriptorStore'; const props = defineProps({ - value: { type: [String, Number, Boolean, Object], default: undefined }, + value: { type: Object, default: undefined }, name: { type: String, default: undefined }, }); @@ -32,6 +32,7 @@ const updateValue = () => { Math.round((propsValue.value + Number.EPSILON) * 1000) / 1000 ).toString(); } + cssClass = isLink(cssClass); break; case 'boolean': t = propsValue.value ? '✓' : '✗'; @@ -40,8 +41,9 @@ const updateValue = () => { case 'string': t = propsValue.value.length <= maxStrLen - ? propsValue + ? propsValue.value : propsValue.value.substring(0, maxStrLen) + '...'; + cssClass = isLink(cssClass); break; case 'object': if (propsValue.value instanceof Date) { @@ -56,6 +58,11 @@ const updateValue = () => { } }; +function isLink(cssClass) { + if (!descriptorStore.has(props.name)) return cssClass; + return 'link json-link'; +} + watch(() => props.value, updateValue); updateValue(); @@ -63,10 +70,9 @@ updateValue(); -
+
{{ t('No data to display') }}
@@ -416,6 +413,7 @@ defineExpose({ v-shortcut @click="showFormDialog()" class="fill-icon" + data-cy="addButton" > {{ t('Upload file') }} diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 41d0c5598..1626f2559 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -142,6 +142,7 @@ const STATE_COLOR = { { :clear-store-on-unmount="false" > es: + Buyer: Comprador + Family: Familia Article: Artículo Siz.: Med. Size: Medida diff --git a/src/pages/Entry/Card/EntryNotes.vue b/src/pages/Entry/Card/EntryNotes.vue index 459c3b069..4159ed5ca 100644 --- a/src/pages/Entry/Card/EntryNotes.vue +++ b/src/pages/Entry/Card/EntryNotes.vue @@ -2,153 +2,82 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; - -import FetchData from 'components/FetchData.vue'; -import CrudModel from 'components/CrudModel.vue'; -import VnInput from 'src/components/common/VnInput.vue'; -import VnSelect from 'src/components/common/VnSelect.vue'; +import VnTable from 'src/components/VnTable/VnTable.vue'; const { params } = useRoute(); const { t } = useI18n(); - +const selectedRows = ref([]); const entryObservationsRef = ref(null); -const entryObservationsOptions = ref([]); -const selected = ref([]); - -const sortEntryObservationOptions = (data) => { - entryObservationsOptions.value = [...data].sort((a, b) => - a.description.localeCompare(b.description), - ); -}; - +const entityId = ref(params.id); const columns = computed(() => [ { - name: 'observationType', - label: t('entry.notes.observationType'), - field: (row) => row.observationTypeFk, - sortable: true, - options: entryObservationsOptions.value, - required: true, - model: 'observationTypeFk', - optionValue: 'id', - optionLabel: 'description', - tabIndex: 1, - align: 'left', + name: 'id', + isId: true, + visible: false, + isEditable: false, + columnFilter: false, }, { + name: 'observationTypeFk', + label: t('entry.notes.observationType'), + component: 'select', + columnFilter: { inWhere: true }, + attrs: { + inWhere: true, + url: 'ObservationTypes', + fields: ['id', 'description'], + optionValue: 'id', + optionLabel: 'description', + sortBy: 'description', + }, + width: '30px', + create: true, + }, + { + align: 'left', name: 'description', label: t('globals.description'), - field: (row) => row.description, - tabIndex: 2, - align: 'left', + component: 'input', + columnFilter: false, + attrs: { autogrow: true }, + create: true, }, ]); + +const filter = computed(() => ({ + fields: ['id', 'entryFk', 'observationTypeFk', 'description'], + include: ['observationType'], + where: { entryFk: entityId }, +})); es: - Add note: Añadir nota - Remove note: Quitar nota + Create note: Crear nota diff --git a/src/pages/Entry/EntryFilter.vue b/src/pages/Entry/EntryFilter.vue index c283e4a0b..82bcb1a79 100644 --- a/src/pages/Entry/EntryFilter.vue +++ b/src/pages/Entry/EntryFilter.vue @@ -85,7 +85,7 @@ const entryFilterPanel = ref(); @@ -102,6 +102,7 @@ const entryFilterPanel = ref(); v-model="params.landed" @update:model-value="searchFn()" is-outlined + data-cy="landed" /> @@ -121,13 +122,6 @@ const entryFilterPanel = ref(); rounded /> - - - @@ -171,6 +165,7 @@ const entryFilterPanel = ref(); @update:model-value="searchFn()" url="Warehouses" :fields="['id', 'name']" + sort-by="name ASC" hide-selected dense outlined @@ -186,6 +181,7 @@ const entryFilterPanel = ref(); @update:model-value="searchFn()" url="Warehouses" :fields="['id', 'name']" + sort-by="name ASC" hide-selected dense outlined @@ -233,15 +229,6 @@ const entryFilterPanel = ref(); /> - - - - - @@ -267,7 +254,7 @@ en: hasToShowDeletedEntries: Show deleted entries es: params: - isExcludedFromAvailable: Inventario + isExcludedFromAvailable: Excluida isOrdered: Pedida isConfirmed: Confirmado isReceived: Recibida diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue deleted file mode 100644 index 73fdcbbbf..000000000 --- a/src/pages/Entry/EntryLatestBuys.vue +++ /dev/null @@ -1,264 +0,0 @@ - - - diff --git a/src/pages/Entry/EntryLatestBuysFilter.vue b/src/pages/Entry/EntryLatestBuysFilter.vue deleted file mode 100644 index 658ba3847..000000000 --- a/src/pages/Entry/EntryLatestBuysFilter.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index f66151cc9..b8edc7ff5 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -107,9 +107,8 @@ const columns = computed(() => [ attrs: { url: 'suppliers', fields: ['id', 'name'], - where: { order: 'name DESC' }, + sortBy: 'name ASC', }, - format: (row, dashIfEmpty) => dashIfEmpty(row.supplierName), width: '110px', }, { @@ -145,6 +144,7 @@ const columns = computed(() => [ attrs: { url: 'agencyModes', fields: ['id', 'name'], + sortBy: 'name ASC', }, columnField: { component: null, @@ -158,7 +158,6 @@ const columns = computed(() => [ component: 'input', }, { - align: 'left', label: t('entry.list.tableVisibleColumns.warehouseOutFk'), name: 'warehouseOutFk', cardVisible: true, @@ -166,6 +165,7 @@ const columns = computed(() => [ attrs: { url: 'warehouses', fields: ['id', 'name'], + sortBy: 'name ASC', }, columnField: { component: null, @@ -174,7 +174,6 @@ const columns = computed(() => [ width: '65px', }, { - align: 'left', label: t('entry.list.tableVisibleColumns.warehouseInFk'), name: 'warehouseInFk', cardVisible: true, @@ -182,6 +181,7 @@ const columns = computed(() => [ attrs: { url: 'warehouses', fields: ['id', 'name'], + sortBy: 'name ASC', }, columnField: { component: null, @@ -190,7 +190,6 @@ const columns = computed(() => [ width: '65px', }, { - align: 'left', labelAbbreviation: t('Type'), label: t('entry.list.tableVisibleColumns.entryTypeDescription'), toolTip: t('entry.list.tableVisibleColumns.entryTypeDescription'), @@ -201,6 +200,7 @@ const columns = computed(() => [ fields: ['code', 'description'], optionValue: 'code', optionLabel: 'description', + sortBy: 'description ASC', }, width: '65px', format: (row, dashIfEmpty) => dashIfEmpty(row.entryTypeDescription), @@ -283,7 +283,13 @@ onBeforeMount(async () => {