forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7207-showPbx
This commit is contained in:
commit
86a82c5aad
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.40.0",
|
"version": "24.42.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -731,6 +731,10 @@ es:
|
||||||
border-color: var(--vn-section-color);
|
border-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-table__container > div:first-child {
|
||||||
|
background-color: var(--vn-page-color);
|
||||||
|
}
|
||||||
|
|
||||||
.grid-three {
|
.grid-three {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
|
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ item:
|
||||||
producer: Producer
|
producer: Producer
|
||||||
landed: Landed
|
landed: Landed
|
||||||
fixedPrice:
|
fixedPrice:
|
||||||
itemId: Item ID
|
itemFk: Item ID
|
||||||
groupingPrice: Grouping price
|
groupingPrice: Grouping price
|
||||||
packingPrice: Packing price
|
packingPrice: Packing price
|
||||||
hasMinPrice: Has min price
|
hasMinPrice: Has min price
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ item:
|
||||||
producer: Productor
|
producer: Productor
|
||||||
landed: F. entrega
|
landed: F. entrega
|
||||||
fixedPrice:
|
fixedPrice:
|
||||||
itemId: ID Artículo
|
itemFk: ID Artículo
|
||||||
groupingPrice: Precio grouping
|
groupingPrice: Precio grouping
|
||||||
packingPrice: Precio packing
|
packingPrice: Precio packing
|
||||||
hasMinPrice: Tiene precio mínimo
|
hasMinPrice: Tiene precio mínimo
|
||||||
|
|
|
@ -36,23 +36,23 @@ const user = state.getUser();
|
||||||
const fixedPrices = ref([]);
|
const fixedPrices = ref([]);
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
const rowsSelected = ref([]);
|
const rowsSelected = ref([]);
|
||||||
|
|
||||||
const itemFixedPriceFilterRef = ref();
|
const itemFixedPriceFilterRef = ref();
|
||||||
|
|
||||||
const params = reactive({});
|
const params = reactive({});
|
||||||
const defaultColumnAttrs = {
|
|
||||||
align: 'left',
|
|
||||||
sortable: true,
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
params.warehouseFk = user.value.warehouseFk;
|
params.warehouseFk = user.value.warehouseFk;
|
||||||
});
|
});
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
|
|
||||||
|
const defaultColumnAttrs = {
|
||||||
|
align: 'left',
|
||||||
|
sortable: true,
|
||||||
|
};
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('item.fixedPrice.itemId'),
|
label: t('item.fixedPrice.itemFk'),
|
||||||
name: 'itemId',
|
name: 'itemFk',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
isId: true,
|
isId: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
@ -426,7 +426,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
:default-save="false"
|
:default-save="false"
|
||||||
data-key="ItemFixedPrices"
|
data-key="ItemFixedPrices"
|
||||||
url="FixedPrices/filter"
|
url="FixedPrices/filter"
|
||||||
:order="['itemFk ASC']"
|
:order="['description DESC']"
|
||||||
save-url="FixedPrices/crud"
|
save-url="FixedPrices/crud"
|
||||||
:user-params="{ warehouseFk: user.warehouseFk }"
|
:user-params="{ warehouseFk: user.warehouseFk }"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
@ -460,7 +460,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
<QCheckbox flat v-model="scope.selected" />
|
<QCheckbox flat v-model="scope.selected" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #column-itemId="props">
|
<template #column-itemFk="props">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
style="max-width: 100px"
|
style="max-width: 100px"
|
||||||
url="Items/withName"
|
url="Items/withName"
|
||||||
|
|
|
@ -11,7 +11,9 @@ describe('WagonCreate', () => {
|
||||||
cy.get('input').eq(1).type('1234ABCD');
|
cy.get('input').eq(1).type('1234ABCD');
|
||||||
cy.get('input').eq(2).type('100');
|
cy.get('input').eq(2).type('100');
|
||||||
cy.get('input').eq(3).click();
|
cy.get('input').eq(3).click();
|
||||||
cy.get('div[role="listbox"]').find('div.q-item').click();
|
cy.get('.q-select > .q-field__inner > .q-field__control').type(
|
||||||
|
'{downarrow}{enter}'
|
||||||
|
);
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('button[type="submit"]').click();
|
||||||
|
@ -19,12 +21,22 @@ describe('WagonCreate', () => {
|
||||||
// Check data has been saved successfully
|
// Check data has been saved successfully
|
||||||
cy.waitForElement('.q-card');
|
cy.waitForElement('.q-card');
|
||||||
|
|
||||||
cy.get('.title').should('have.text', '1234');
|
cy.get(
|
||||||
cy.get('[title-label="Plate"] > .value > span').should('have.text', '1234ABCD');
|
'[to="/null/1"] > .q-card > .no-padding > .q-py-none > .cursor-text'
|
||||||
cy.get(':nth-child(2) > .value > span').should('have.text', '100');
|
).should('have.text', '1234');
|
||||||
cy.get(':nth-child(3) > .value > span').should('have.text', 'Wagon Type #1');
|
cy.get(
|
||||||
|
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(1) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||||
|
).should('have.text', '1234ABCD');
|
||||||
|
cy.get(
|
||||||
|
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(2) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||||
|
).should('have.text', '100');
|
||||||
|
cy.get(
|
||||||
|
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(3) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||||
|
).should('have.text', 'Wagon Type #1');
|
||||||
|
|
||||||
// Delete wagon type created
|
// Delete wagon type created
|
||||||
cy.get('.actions > .q-btn--standard').click();
|
cy.get(
|
||||||
|
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
||||||
|
).click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('WagonTypeCreate', () => {
|
||||||
});
|
});
|
||||||
it('delete a wagon type', () => {
|
it('delete a wagon type', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
':nth-child(2) > :nth-child(1) > .card-list-body > .actions > .q-btn--standard'
|
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('WagonTypeEdit', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/wagon/type/2/edit');
|
cy.visit('/#/wagon/type/1/edit');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the name and the divisible field of the wagon type', () => {
|
it('should edit the name and the divisible field of the wagon type', () => {
|
||||||
|
@ -14,14 +14,14 @@ describe('WagonTypeEdit', () => {
|
||||||
cy.get('.q-btn--standard').click();
|
cy.get('.q-btn--standard').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a tray', () => {
|
|
||||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').click();
|
|
||||||
cy.get('input').last().type('150');
|
|
||||||
cy.get(trayColorRow).type('{downArrow}{downArrow}{enter}');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should delete a tray', () => {
|
it('should delete a tray', () => {
|
||||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
|
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
|
||||||
cy.reload();
|
cy.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should create a tray', () => {
|
||||||
|
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').last().click();
|
||||||
|
cy.get('input').last().type('150');
|
||||||
|
cy.get(trayColorRow).type('{downArrow}{downArrow}{downArrow}{enter}');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue