forked from verdnatura/salix-front
Merge pull request '#7623 add updateRoute prop in VnPaginate' (!475) from 7623-fix-redirection into dev
Reviewed-on: verdnatura/salix-front#475 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
152bd5ff08
|
@ -60,7 +60,7 @@ const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
|
||||||
const arrayData = useArrayData($props.dataKey, {
|
const arrayData = useArrayData($props.dataKey, {
|
||||||
exprBuilder: $props.exprBuilder,
|
exprBuilder: $props.exprBuilder,
|
||||||
searchUrl: $props.searchUrl,
|
searchUrl: $props.searchUrl,
|
||||||
navigate: {},
|
navigate: $props.redirect ? {} : null,
|
||||||
});
|
});
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
|
|
|
@ -78,6 +78,7 @@ async function insert() {
|
||||||
ref="vnPaginateRef"
|
ref="vnPaginateRef"
|
||||||
class="show"
|
class="show"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
search-url="notes"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<TransitionGroup name="list" tag="div" class="column items-center full-width">
|
<TransitionGroup name="list" tag="div" class="column items-center full-width">
|
||||||
|
|
|
@ -73,7 +73,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
const filter = {
|
const filter = {
|
||||||
order: store.order,
|
order: store.order,
|
||||||
limit: store.limit,
|
limit: store.limit,
|
||||||
skip: store.skip,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let exprFilter;
|
let exprFilter;
|
||||||
|
@ -88,7 +87,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(filter, store.userFilter, exprFilter);
|
Object.assign(filter, store.userFilter, exprFilter);
|
||||||
Object.assign(store.filter, filter);
|
Object.assign(store.filter, { ...filter, skip: store.skip });
|
||||||
const params = {
|
const params = {
|
||||||
filter: JSON.stringify(store.filter),
|
filter: JSON.stringify(store.filter),
|
||||||
};
|
};
|
||||||
|
|
|
@ -119,7 +119,7 @@ const departments = ref();
|
||||||
emit-value
|
emit-value
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
map-options
|
||||||
option-label="country"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
|
|
@ -219,6 +219,7 @@ const useLang = (values) => {
|
||||||
:expr-builder="exprBuilder"
|
:expr-builder="exprBuilder"
|
||||||
:custom-tags="['tagGroups']"
|
:custom-tags="['tagGroups']"
|
||||||
@remove="clearFilter"
|
@remove="clearFilter"
|
||||||
|
:redirect="false"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<strong v-if="tag.label === 'categoryFk'">
|
<strong v-if="tag.label === 'categoryFk'">
|
||||||
|
|
|
@ -104,10 +104,14 @@ const totalEntryPrice = (rows) => {
|
||||||
for (const row of rows) {
|
for (const row of rows) {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
let quantity = 0;
|
let quantity = 0;
|
||||||
|
|
||||||
|
if (row.buys) {
|
||||||
for (const buy of row.buys) {
|
for (const buy of row.buys) {
|
||||||
total = total + buy.total;
|
total = total + buy.total;
|
||||||
quantity = quantity + buy.quantity;
|
quantity = quantity + buy.quantity;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
row.total = total;
|
row.total = total;
|
||||||
row.quantity = quantity;
|
row.quantity = quantity;
|
||||||
totalPrice = totalPrice + total;
|
totalPrice = totalPrice + total;
|
||||||
|
|
|
@ -50,7 +50,7 @@ const itemCategoriesOptions = ref([]);
|
||||||
@on-fetch="(data) => (itemCategoriesOptions = data)"
|
@on-fetch="(data) => (itemCategoriesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true" :redirect="false">
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -6,15 +6,14 @@ describe('InvoiceInCorrective', () => {
|
||||||
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
||||||
|
|
||||||
it('should create a correcting invoice', () => {
|
it('should create a correcting invoice', () => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
||||||
|
|
||||||
cy.openLeftMenu();
|
|
||||||
cy.openActionsDescriptor();
|
cy.openActionsDescriptor();
|
||||||
|
|
||||||
cy.get(createRectificative).click();
|
cy.get(createRectificative).click();
|
||||||
cy.get(saveDialog).click();
|
cy.get(saveDialog).click();
|
||||||
cy.openLeftMenu();
|
|
||||||
cy.get(rectificativeSection).click();
|
cy.get(rectificativeSection).click();
|
||||||
cy.get('tbody > tr:visible').should('have.length', 1);
|
cy.get('tbody > tr:visible').should('have.length', 1);
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,18 +5,15 @@ describe('InvoiceInDescriptor', () => {
|
||||||
'.q-card:nth-child(3) .vn-label-value:nth-child(5) > .value > span';
|
'.q-card:nth-child(3) .vn-label-value:nth-child(5) > .value > span';
|
||||||
|
|
||||||
it('should booking and unbooking the invoice properly', () => {
|
it('should booking and unbooking the invoice properly', () => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/1/summary?limit=10`);
|
cy.visit('/#/invoice-in/1/summary');
|
||||||
|
|
||||||
cy.openLeftMenu();
|
|
||||||
cy.openActionsDescriptor();
|
cy.openActionsDescriptor();
|
||||||
cy.get(firstDescritorOpt).click();
|
cy.get(firstDescritorOpt).click();
|
||||||
cy.get(dialogBtns).eq(1).click();
|
cy.get(dialogBtns).eq(1).click();
|
||||||
cy.get('.fullscreen').first().click();
|
|
||||||
cy.get(isBookedField).should('have.attr', 'title', 'true');
|
cy.get(isBookedField).should('have.attr', 'title', 'true');
|
||||||
|
|
||||||
cy.openLeftMenu();
|
|
||||||
cy.openActionsDescriptor();
|
|
||||||
cy.get(firstDescritorOpt).click();
|
cy.get(firstDescritorOpt).click();
|
||||||
cy.get(dialogBtns).eq(1).click();
|
cy.get(dialogBtns).eq(1).click();
|
||||||
cy.get(isBookedField).should('have.attr', 'title', 'false');
|
cy.get(isBookedField).should('have.attr', 'title', 'false');
|
||||||
|
|
Loading…
Reference in New Issue