diff --git a/src/components/VnTable/VnOrder.vue b/src/components/VnTable/VnOrder.vue index b879574a7..927083780 100644 --- a/src/components/VnTable/VnOrder.vue +++ b/src/components/VnTable/VnOrder.vue @@ -28,6 +28,7 @@ const hover = ref(); const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl }); async function orderBy(name, direction) { + console.log('orderBy'); if (!name) return; switch (direction) { case 'DESC': @@ -40,7 +41,11 @@ async function orderBy(name, direction) { direction = 'DESC'; break; } + console.log('name: ', name); if (!direction) return await arrayData.deleteOrder(name); + + console.log('direction: ', direction); + console.log('name: ', name); await arrayData.addOrder(name, direction); } diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 6d0a6b82d..87725f457 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -398,7 +398,6 @@ async function renderInput(rowId, field, clickedElement) { const isSelect = selectRegex.test(column?.component); if (isSelect) column.attrs = { ...column.attrs, 'emit-value': false }; - console.log('row[column.name]: ', row[column.name]); const node = h(VnColumn, { row: row, class: 'temp-input', @@ -410,7 +409,6 @@ async function renderInput(rowId, field, clickedElement) { eventHandlers: { 'update:modelValue': async (value) => { if (isSelect) { - console.log('value: ', value); row[column.name] = value[column.attrs?.optionValue ?? 'id']; row[column?.name + 'TextValue'] = value[column.attrs?.optionLabel ?? 'name']; @@ -521,7 +519,6 @@ function formatColumnValue(col, row, dashIfEmpty) { if (selectRegex.test(col?.component) && row[col?.name + 'TextValue']) { return dashIfEmpty(row[col?.name + 'TextValue']); } else { - console.log('format'); return col.format(row, dashIfEmpty); } } else { diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 05e22b9de..b327f35dd 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -498,7 +498,6 @@ entry: entryTypeDescription: Tipo entrada invoiceAmount: Importe dated: Fecha - ticket: params: ticketFk: Ticket ID diff --git a/src/pages/Entry/Card/EntryDescriptor.vue b/src/pages/Entry/Card/EntryDescriptor.vue index 039bb09b9..7ea3bd0d2 100644 --- a/src/pages/Entry/Card/EntryDescriptor.vue +++ b/src/pages/Entry/Card/EntryDescriptor.vue @@ -127,16 +127,26 @@ async function deleteEntry() { width="lg-width" > diff --git a/src/pages/Entry/EntryFilter.vue b/src/pages/Entry/EntryFilter.vue index 3446bcab6..8c60918a8 100644 --- a/src/pages/Entry/EntryFilter.vue +++ b/src/pages/Entry/EntryFilter.vue @@ -55,11 +55,7 @@ const entryFilterPanel = ref(); toggle-indeterminate > - {{ - t( - 'entry.list.tableVisibleColumns.isExcludedFromAvailable', - ) - }} + {{ t('params.isExcludedFromAvailable') }} @@ -218,70 +214,7 @@ const entryFilterPanel = ref(); /> - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index 30f336e12..ad66ebb58 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -268,7 +268,6 @@ onBeforeMount(async () => { url="Entries/filter" :array-data-props="{ url: 'Entries/filter', - order: 'id DESC', userFilter: entryQueryFilter, }" > @@ -292,7 +291,6 @@ onBeforeMount(async () => { companyFk: user?.companyFk, }, }" - order="id DESC" :columns="columns" redirect="entry" :right-search="false" @@ -320,6 +318,7 @@ onBeforeMount(async () => { :onFilterTravelSelected=" (data, result) => (data.travelFk = result) " + data-cy="entry-travel-select" /> diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 9d8dfdc8e..4d4c2382f 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -132,6 +132,7 @@ entry: showEntryReport: Show entry report entryFilter: params: + isExcludedFromAvailable: Exclude from inventory invoiceNumber: Invoice number travelFk: Travel companyFk: Company @@ -143,8 +144,16 @@ entryFilter: isBooked: Booked isConfirmed: Confirmed isOrdered: Ordered + isReceived: Received search: General search reference: Reference + landed: Landed + id: Id + agencyModeId: Agency + evaNotes: Notes + warehouseOutFk: Origin + warehouseInFk: Destiny + entryTypeCode: Entry type myEntries: id: ID landed: Landed diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 404ee335c..1c523792b 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -133,19 +133,22 @@ entry: workerFk: Comprador entryFilter: params: - invoiceNumber: Núm. factura - travelFk: Envío - companyFk: Empresa - currencyFk: Moneda - supplierFk: Proveedor - from: Desde - to: Hasta - created: Fecha creación - isBooked: Asentado - isConfirmed: Confirmado + isExcludedFromAvailable: Inventario isOrdered: Pedida - search: Búsqueda general - reference: Referencia + isConfirmed: Confirmado + isReceived: Recibida + isRaid: Raid + landed: Fecha + id: Id + supplierFk: Proveedor + invoiceNumber: Núm. factura + reference: Ref/Alb/Guía + agencyModeId: Modo agencia + evaNotes: Notas + warehouseOutFk: Origen + warehouseInFk: Destino + entryTypeCode: Tipo de entrada + hasToShowDeletedEntries: Mostrar entradas eliminadas myEntries: id: ID landed: F. llegada diff --git a/test/cypress/integration/entry/entrylist.spec.js b/test/cypress/integration/entry/entrylist.spec.js new file mode 100644 index 000000000..34bb0c2b8 --- /dev/null +++ b/test/cypress/integration/entry/entrylist.spec.js @@ -0,0 +1,18 @@ +describe('Entry', () => { + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('buyer'); + cy.visit(`/#/entry/list`); + }); + it('Filter deleted entries and other fields', () => { + cy.get('button[data-cy="vnTableCreateBtn"]').click(); + cy.get('input[data-cy="entry-travel-select"]').type('1{enter}'); + cy.get('button[data-cy="descriptor-more-opts"]').click(); + cy.get('div[data-cy="delete-entry"]').click(); + cy.visit(`/#/entry/list`); + cy.typeSearchbar('{enter}'); + cy.get('span[title="Date"]').click(); + cy.get('span[title="Date"]').click(); + cy.get('td[data-row-index="0"][data-col-field="landed"]').contains('-'); + }); +});