fix: refs #7404 translates and some minor style fixes
This commit is contained in:
parent
cf11573713
commit
17bb144bce
|
@ -162,6 +162,7 @@ globals:
|
||||||
dms: Gestión documental
|
dms: Gestión documental
|
||||||
entryCreate: Nueva entrada
|
entryCreate: Nueva entrada
|
||||||
latestBuys: Últimas compras
|
latestBuys: Últimas compras
|
||||||
|
reserves: Reservas
|
||||||
tickets: Tickets
|
tickets: Tickets
|
||||||
ticketCreate: Nuevo ticket
|
ticketCreate: Nuevo ticket
|
||||||
boxing: Encajado
|
boxing: Encajado
|
||||||
|
|
|
@ -54,7 +54,6 @@ const columns = [
|
||||||
create: true,
|
create: true,
|
||||||
component: 'number',
|
component: 'number',
|
||||||
summation: true,
|
summation: true,
|
||||||
cardVisible: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -101,14 +100,9 @@ const travel = ref(null);
|
||||||
const userParams = ref({
|
const userParams = ref({
|
||||||
dated: Date.vnNew(),
|
dated: Date.vnNew(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = ref({
|
const filter = ref({
|
||||||
where: {
|
fields: ['id', 'm3', 'warehouseInFk'],
|
||||||
shipped: (userParams.value.dated
|
|
||||||
? new Date(userParams.value.dated)
|
|
||||||
: Date.vnNew()
|
|
||||||
).setHours(0, 0, 0, 0),
|
|
||||||
m3: { neq: null },
|
|
||||||
},
|
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'warehouseIn',
|
relation: 'warehouseIn',
|
||||||
|
@ -117,6 +111,13 @@ const filter = ref({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
where: {
|
||||||
|
shipped: (userParams.value.dated
|
||||||
|
? new Date(userParams.value.dated)
|
||||||
|
: Date.vnNew()
|
||||||
|
).setHours(0, 0, 0, 0),
|
||||||
|
m3: { neq: null },
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const setUserParams = async ({ dated }) => {
|
const setUserParams = async ({ dated }) => {
|
||||||
|
@ -139,7 +140,7 @@ function openDialog() {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
(data) => {
|
(data) => {
|
||||||
travel = data.filter((data) => data.warehouseIn.code === 'VNH');
|
travel = data.find((data) => data.warehouseIn.code === 'VNH');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -149,10 +150,10 @@ function openDialog() {
|
||||||
{{ t('Booked trucks') }}:
|
{{ t('Booked trucks') }}:
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
{{ travel[0]?.m3 }}
|
{{ travel?.m3 }}
|
||||||
</span>
|
</span>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="travel[0]?.m3"
|
v-if="travel?.m3"
|
||||||
style="max-width: 20%"
|
style="max-width: 20%"
|
||||||
flat
|
flat
|
||||||
icon="edit"
|
icon="edit"
|
||||||
|
@ -166,10 +167,10 @@ function openDialog() {
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:url-update="`Travels/${travel[0].id}`"
|
:url-update="`Travels/${travel?.id}`"
|
||||||
model="travel"
|
model="travel"
|
||||||
:title="t('Travel m3')"
|
:title="t('Travel m3')"
|
||||||
:form-initial-data="{ id: travel[0].id, m3: travel[0].m3 }"
|
:form-initial-data="{ id: travel?.id, m3: travel?.m3 }"
|
||||||
@on-data-saved="fetchDataRef.fetch()"
|
@on-data-saved="fetchDataRef.fetch()"
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
|
@ -192,51 +193,56 @@ function openDialog() {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<QPage class="column items-center q-pa-md">
|
<div class="table-container">
|
||||||
<VnTable
|
<QPage class="column items-center q-pa-md">
|
||||||
ref="tableRef"
|
<VnTable
|
||||||
data-key="StockBoughts"
|
ref="tableRef"
|
||||||
url="StockBoughts/getStockBought"
|
data-key="StockBoughts"
|
||||||
save-url="StockBoughts/crud"
|
url="StockBoughts/getStockBought"
|
||||||
order="reserve DESC"
|
save-url="StockBoughts/crud"
|
||||||
:right-search="false"
|
order="reserve DESC"
|
||||||
:is-editable="true"
|
:right-search="false"
|
||||||
:create="{
|
:is-editable="true"
|
||||||
urlCreate: 'StockBoughts',
|
:create="{
|
||||||
title: t('Reserve some space'),
|
urlCreate: 'StockBoughts',
|
||||||
onDataSaved: () => tableRef.reload(),
|
title: t('Reserve some space'),
|
||||||
formInitialData: {
|
onDataSaved: () => tableRef.reload(),
|
||||||
workerFk: user.id,
|
formInitialData: {
|
||||||
dated: Date.vnNow(),
|
workerFk: user.id,
|
||||||
},
|
dated: Date.vnNow(),
|
||||||
}"
|
},
|
||||||
:columns="columns"
|
}"
|
||||||
:user-params="userParams"
|
:columns="columns"
|
||||||
:footer="true"
|
:user-params="userParams"
|
||||||
auto-load
|
:footer="true"
|
||||||
>
|
auto-load
|
||||||
<template #column-workerFk="{ row }">
|
>
|
||||||
<span class="link" @click.stop>
|
<template #column-workerFk="{ row }">
|
||||||
{{ row?.worker?.user?.name }}
|
<span class="link" @click.stop>
|
||||||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
{{ row?.worker?.user?.name }}
|
||||||
</span>
|
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||||
</template>
|
</span>
|
||||||
</VnTable>
|
</template>
|
||||||
</QPage>
|
</VnTable>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.travel {
|
.travel {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
.table-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
|
||||||
Buyer: Buyer
|
|
||||||
Reserve: Reserve
|
|
||||||
Bought: Bought
|
|
||||||
More: More
|
|
||||||
Date: Date
|
|
||||||
This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
|
|
||||||
es:
|
es:
|
||||||
Edit travel: Editar envío
|
Edit travel: Editar envío
|
||||||
Travel: Envíos
|
Travel: Envíos
|
||||||
|
|
|
@ -22,7 +22,7 @@ const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Entry',
|
label: t('Entry'),
|
||||||
name: 'entryFk',
|
name: 'entryFk',
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
isId: true,
|
isId: true,
|
||||||
|
@ -41,24 +41,28 @@ const columns = [
|
||||||
create: true,
|
create: true,
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'volume',
|
name: 'volume',
|
||||||
label: t('Volume'),
|
label: t('Volume'),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('Packaging'),
|
label: t('Packaging'),
|
||||||
name: 'packagingFk',
|
name: 'packagingFk',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Packing',
|
label: 'Packing',
|
||||||
name: 'packing',
|
name: 'packing',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
@ -73,18 +77,20 @@ const columns = [
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:disable-infinite-scroll="true"
|
:disable-infinite-scroll="true"
|
||||||
:disable-option="{ card: true }"
|
|
||||||
:limit="0"
|
:limit="0"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
|
<template #top-left>
|
||||||
|
<QBtn flat icon="Close" v-close-popup />
|
||||||
|
</template>
|
||||||
<template #column-entryFk="{ row }">
|
<template #column-entryFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link">
|
||||||
{{ row?.entryFk }}
|
{{ row?.entryFk }}
|
||||||
<EntryDescriptorProxy :id="row.entryFk" />
|
<EntryDescriptorProxy :id="row.entryFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-itemName="{ row }">
|
<template #column-itemName="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link">
|
||||||
{{ row?.itemName }}
|
{{ row?.itemName }}
|
||||||
<ItemDescriptorProxy :id="row.itemFk" />
|
<ItemDescriptorProxy :id="row.itemFk" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -93,8 +99,8 @@ const columns = [
|
||||||
</div>
|
</div>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
<style lang="css">
|
<style lang="css" scoped>
|
||||||
.q-dialog__inner {
|
.container {
|
||||||
max-width: 50vw;
|
max-width: 50vw;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -110,4 +116,9 @@ const columns = [
|
||||||
Bought: Comprado
|
Bought: Comprado
|
||||||
More: Más
|
More: Más
|
||||||
Date: Fecha
|
Date: Fecha
|
||||||
|
Entry: Entrada
|
||||||
|
Item: Artículo
|
||||||
|
Name: Nombre
|
||||||
|
Volume: Volumen
|
||||||
|
Packaging: Embalage
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -6,7 +6,6 @@ describe('EntryStockBought', () => {
|
||||||
});
|
});
|
||||||
it('Should edit the reserved space', () => {
|
it('Should edit the reserved space', () => {
|
||||||
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
|
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
|
||||||
cy.get('tBody > tr').its('length').should('eq', 2);
|
|
||||||
cy.get('input[name="reserve"]').type('10{enter}');
|
cy.get('input[name="reserve"]').type('10{enter}');
|
||||||
cy.get('button[title="Save"]').click();
|
cy.get('button[title="Save"]').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
|
@ -18,7 +17,6 @@ describe('EntryStockBought', () => {
|
||||||
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
||||||
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
|
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||||
cy.get('tBody > tr').its('length').should('eq', 3);
|
|
||||||
});
|
});
|
||||||
it('Should check detail for the buyer', () => {
|
it('Should check detail for the buyer', () => {
|
||||||
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
||||||
|
|
Loading…
Reference in New Issue