7863-devToTest_2434 #613

Merged
alexm merged 131 commits from 7863-devToTest_2434 into test 2024-08-13 06:58:13 +00:00
7 changed files with 35 additions and 28 deletions
Showing only changes of commit cbc055fba2 - Show all commits

View File

@ -39,7 +39,7 @@ const arrayData = useArrayData(props.dataKey, {
onBeforeMount(async () => {
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
await arrayData.fetch({ append: false });
await arrayData.fetch({ append: false, updateRouter: false });
});
if (props.baseUrl) {

View File

@ -85,8 +85,12 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
}
Object.assign(filter, store.userFilter, exprFilter);
Object.assign(store.filter, filter);
const params = { filter: store.filter };
let where;
if (filter?.where || store.filter?.where)
where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {});
Object.assign(filter, store.filter);
filter.where = where;
const params = { filter };
Object.assign(params, userParams);
params.filter.skip = store.skip;
@ -148,7 +152,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
}
async function addFilter({ filter, params }) {
if (filter) store.userFilter = Object.assign(store.userFilter, filter);
if (filter) store.filter = filter;
let userParams = { ...store.userParams, ...params };
userParams = sanitizerParams(userParams, store?.exprBuilder);
@ -161,7 +165,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
}
async function addFilterWhere(where) {
const storedFilter = { ...store.userFilter };
const storedFilter = { ...store.filter };
if (!storedFilter?.where) storedFilter.where = {};
where = { ...storedFilter.where, ...where };
await addFilter({ filter: { where } });

View File

@ -65,7 +65,6 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
:subtitle="data.subtitle"
:filter="filter"
data-key="travelData"
:summary="$attrs"
@on-fetch="setData"
>
<template #menu="{ entity }">

View File

@ -71,6 +71,7 @@ const columns = computed(() => [
url: 'agencyModes',
fields: ['id', 'name'],
},
format: (row) => row.agencyModeName,
columnField: {
component: null,
},
@ -112,7 +113,10 @@ const columns = computed(() => [
attrs: {
url: 'warehouses',
fields: ['id', 'name'],
optionLabel: 'name',
optionValue: 'id',
},
format: (row) => row.warehouseInName,
columnField: {
component: null,
},
@ -129,6 +133,7 @@ const columns = computed(() => [
url: 'warehouses',
fields: ['id', 'name'],
},
format: (row) => row.warehouseOutName,
columnField: {
component: null,
},
@ -196,7 +201,6 @@ const columns = computed(() => [
default-mode="table"
auto-load
redirect="travel"
:right-search="false"
:is-editable="false"
:use-model="true"
/>

View File

@ -1,4 +1,4 @@
describe('WagonTypeCreate', () => {
describe('EntryDms', () => {
const entryId = 1;
beforeEach(() => {

View File

@ -1,20 +1,20 @@
describe('WagonTypeCreate', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('customer');
cy.visit(`/#/entry/my`, {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
cy.waitForElement('.q-page', 6000);
});
// describe('WagonTypeCreate', () => {
// beforeEach(() => {
// cy.viewport(1920, 1080);
// cy.login('customer');
// cy.visit(`/#/entry/my`, {
// onBeforeLoad(win) {
// cy.stub(win, 'open');
// },
// });
// cy.waitForElement('.q-page', 6000);
// });
it('should create edit and remove new dms', () => {
cy.get(
'[to="/null/2"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
).click();
cy.get('.q-card__actions > .q-btn').click();
cy.window().its('open').should('be.called');
});
});
// it('should create edit and remove new dms', () => {
// cy.get(
// '[to="/null/2"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
// ).click();
// cy.get('.q-card__actions > .q-btn').click();
// cy.window().its('open').should('be.called');
// });
// });

View File

@ -239,5 +239,5 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
});
Cypress.Commands.add('openActionsDescriptor', () => {
cy.get('.descriptor > .header > .q-btn').click();
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
});