Merge branch 'dev' of https: refs #7119//gitea.verdnatura.es/verdnatura/salix-front into 7119-createVehicle
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
d3cc62d910
|
@ -30,9 +30,11 @@ export default defineConfig({
|
|||
testFiles: '**/*.spec.js',
|
||||
supportFile: 'test/cypress/support/unit.js',
|
||||
},
|
||||
setupNodeEvents(on, config) {
|
||||
import('cypress-mochawesome-reporter/plugin').then((plugin) => plugin.default(on));
|
||||
// implement node event listeners here
|
||||
setupNodeEvents: async (on, config) => {
|
||||
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
||||
plugin.default(on);
|
||||
|
||||
return config;
|
||||
},
|
||||
viewportWidth: 1280,
|
||||
viewportHeight: 720,
|
||||
|
|
|
@ -349,4 +349,11 @@ es:
|
|||
floramondo: Floramondo
|
||||
salesPersonFk: Comprador
|
||||
categoryFk: Categoría
|
||||
Plant: Planta natural
|
||||
Flower: Flor fresca
|
||||
Handmade: Hecho a mano
|
||||
Artificial: Artificial
|
||||
Green: Verdes frescos
|
||||
Accessories: Complementos florales
|
||||
Fruit: Fruta
|
||||
</i18n>
|
||||
|
|
|
@ -26,6 +26,7 @@ onMounted(() => {
|
|||
round
|
||||
dense
|
||||
icon="dock_to_left"
|
||||
data-cy="toggle-right-drawer"
|
||||
>
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('globals.collapseMenu') }}
|
||||
|
|
|
@ -175,7 +175,11 @@ const handleUppercase = () => {
|
|||
v-if="!$attrs.disabled && !($attrs.readonly) && $props.uppercase"
|
||||
@click="handleUppercase"
|
||||
class="uppercase-icon"
|
||||
/>
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Convert to uppercase') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
|
||||
<slot name="append" v-if="$slots.append && !$attrs.disabled" />
|
||||
<QIcon v-if="info" name="info">
|
||||
|
@ -188,13 +192,26 @@ const handleUppercase = () => {
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.uppercase-icon {
|
||||
transition: color 0.3s, transform 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uppercase-icon:hover {
|
||||
color: #ed9937;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
maxLength: The value exceeds {value} characters
|
||||
inputMax: Must be less than {value}
|
||||
|
||||
es:
|
||||
inputMin: Debe ser mayor a {value}
|
||||
maxLength: El valor excede los {value} carácteres
|
||||
inputMax: Debe ser menor a {value}
|
||||
Convert to uppercase: Convertir a mayúsculas
|
||||
</i18n>
|
|
@ -170,7 +170,7 @@ function emitStoreData() {
|
|||
async function paginate() {
|
||||
const { page, rowsPerPage, sortBy, descending } = pagination.value;
|
||||
|
||||
if (!props.url) return;
|
||||
if (!arrayData.store.url) return;
|
||||
|
||||
isLoading.value = true;
|
||||
await arrayData.loadMore();
|
||||
|
|
|
@ -114,7 +114,7 @@ const columns = computed(() => [
|
|||
action: ({ id }) =>
|
||||
window.open(
|
||||
router.resolve({ params: { id }, name: 'TicketSale' }).href,
|
||||
'_blank'
|
||||
'_blank',
|
||||
),
|
||||
isPrimary: true,
|
||||
},
|
||||
|
@ -122,7 +122,7 @@ const columns = computed(() => [
|
|||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
isPrimary: true,
|
||||
action: (row) => viewSummary(row.id, TicketSummary),
|
||||
action: (row) => viewSummary(row.id, TicketSummary, 'lg-width'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -44,7 +44,7 @@ const transferEntry = async () => {
|
|||
|
||||
<template>
|
||||
<QItem v-ripple clickable @click="showEntryReport">
|
||||
<QItemSection>{{ $t('entryList.list.showEntryReport') }}</QItemSection>
|
||||
<QItemSection>{{ $t('entry.descriptorMenu.showEntryReport') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable @click="openDialog">
|
||||
<QItemSection>{{ t('transferEntry') }}</QItemSection>
|
||||
|
|
|
@ -76,6 +76,8 @@ entry:
|
|||
warehouseInFk: Warehouse in
|
||||
search: Search entries
|
||||
searchInfo: You can search by entry reference
|
||||
descriptorMenu:
|
||||
showEntryReport: Show entry report
|
||||
entryFilter:
|
||||
params:
|
||||
invoiceNumber: Invoice number
|
||||
|
|
|
@ -75,6 +75,8 @@ entry:
|
|||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
descriptorMenu:
|
||||
showEntryReport: Ver informe del pedido
|
||||
search: Buscar entradas
|
||||
searchInfo: Puedes buscar por referencia de entrada
|
||||
entryFilter:
|
||||
|
|
|
@ -48,14 +48,14 @@ const itemPackingTypesOptions = ref([]);
|
|||
>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
<VnInput v-model="data.code" :label="t('shared.code')" />
|
||||
<VnInput v-model="data.name" :label="t('shared.name')" />
|
||||
<VnInput v-model="data.code" :label="t('itemType.shared.code')" />
|
||||
<VnInput v-model="data.name" :label="t('itemType.shared.name')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
url="Workers/search"
|
||||
v-model="data.workerFk"
|
||||
:label="t('shared.worker')"
|
||||
:label="t('itemType.shared.worker')"
|
||||
sort-by="nickname ASC"
|
||||
:fields="['id', 'nickname']"
|
||||
option-label="nickname"
|
||||
|
@ -83,7 +83,7 @@ const itemPackingTypesOptions = ref([]);
|
|||
>
|
||||
<VnSelect
|
||||
v-model="data.categoryFk"
|
||||
:label="t('shared.category')"
|
||||
:label="t('itemType.shared.category')"
|
||||
:options="categoriesOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
|
@ -93,27 +93,30 @@ const itemPackingTypesOptions = ref([]);
|
|||
<VnRow>
|
||||
<VnSelect
|
||||
v-model="data.temperatureFk"
|
||||
:label="t('shared.temperature')"
|
||||
:label="t('itemType.shared.temperature')"
|
||||
:options="temperaturesOptions"
|
||||
option-value="code"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
/>
|
||||
<VnInput v-model="data.life" :label="t('shared.life')" />
|
||||
<VnInput v-model="data.life" :label="t('itemType.summary.life')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
v-model="data.itemPackingTypeFk"
|
||||
:label="t('shared.itemPackingType')"
|
||||
:label="t('itemType.shared.itemPackingType')"
|
||||
:options="itemPackingTypesOptions"
|
||||
option-value="code"
|
||||
option-label="description"
|
||||
hide-selected
|
||||
/>
|
||||
<VnInput v-model="data.maxRefs" :label="t('shared.maxRefs')" />
|
||||
<VnInput v-model="data.maxRefs" :label="t('itemType.shared.maxRefs')" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox v-model="data.isFragile" :label="t('shared.fragile')" />
|
||||
<QCheckbox
|
||||
v-model="data.isFragile"
|
||||
:label="t('itemType.shared.fragile')"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -50,15 +50,15 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
@on-fetch="setData"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('shared.code')" :value="entity.code" />
|
||||
<VnLv :label="t('shared.name')" :value="entity.name" />
|
||||
<VnLv :label="t('shared.worker')">
|
||||
<VnLv :label="t('itemType.shared.code')" :value="entity.code" />
|
||||
<VnLv :label="t('itemType.shared.name')" :value="entity.name" />
|
||||
<VnLv :label="t('itemType.shared.worker')">
|
||||
<template #value>
|
||||
<span class="link">{{ entity.worker?.firstName }}</span>
|
||||
<WorkerDescriptorProxy :id="entity.worker?.id" />
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('shared.category')" :value="entity.category?.name" />
|
||||
<VnLv :label="t('itemType.shared.category')" :value="entity.category?.name" />
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
</template>
|
||||
|
|
|
@ -76,13 +76,6 @@ itemTags:
|
|||
searchbar:
|
||||
label: Search item
|
||||
info: Search by item id
|
||||
itemType:
|
||||
shared:
|
||||
code: Code
|
||||
name: Name
|
||||
worker: Worker
|
||||
category: Category
|
||||
temperature: Temperature
|
||||
item:
|
||||
params:
|
||||
daysOnward: Days onward
|
||||
|
|
|
@ -80,6 +80,9 @@ itemType:
|
|||
worker: Trabajador
|
||||
category: Reino
|
||||
temperature: Temperatura
|
||||
searchbar:
|
||||
label: Buscar artículo
|
||||
info: Buscar por id de artículo
|
||||
params:
|
||||
state: asfsdf
|
||||
item:
|
||||
|
@ -216,6 +219,6 @@ item:
|
|||
item: 'Artículo'
|
||||
achieved: 'Conseguido'
|
||||
concept: 'Concepto'
|
||||
state: 'Estado'
|
||||
state: 'Estado'
|
||||
search: 'Buscar artículo'
|
||||
searchInfo: 'Puedes buscar por id'
|
||||
searchInfo: 'Puedes buscar por id'
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<script setup>
|
||||
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<VnCardBeta data-key="Route" base-url="Routes" :descriptor="RouteDescriptor" />
|
||||
<VnCardBeta data-key="Route" base-url="Routes/filter" :descriptor="RouteDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -185,33 +185,31 @@ const entriesTableRows = computed(() => {
|
|||
return entries.value;
|
||||
});
|
||||
|
||||
const entriesTotalHb = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { hb }) => acc + hb, 0)
|
||||
);
|
||||
const entriesTotals = computed(() => {
|
||||
const totals = {
|
||||
hb: 0,
|
||||
freightValue: 0,
|
||||
packageValue: 0,
|
||||
cc: 0,
|
||||
pallet: 0,
|
||||
m3: 0,
|
||||
};
|
||||
|
||||
const entriesTotalFreight = computed(() =>
|
||||
toCurrency(
|
||||
entriesTableRows.value.reduce((acc, { freightValue }) => acc + freightValue, 0)
|
||||
)
|
||||
);
|
||||
entriesTableRows.value.forEach((row) => {
|
||||
for (const key in totals) {
|
||||
totals[key] += row[key] || 0;
|
||||
}
|
||||
});
|
||||
|
||||
const entriesTotalPackageValue = computed(() =>
|
||||
toCurrency(
|
||||
entriesTableRows.value.reduce((acc, { packageValue }) => acc + packageValue, 0)
|
||||
)
|
||||
);
|
||||
|
||||
const entriesTotalCc = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { cc }) => acc + cc, 0)
|
||||
);
|
||||
|
||||
const entriesTotalPallet = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { pallet }) => acc + pallet, 0)
|
||||
);
|
||||
|
||||
const entriesTotalM3 = computed(() =>
|
||||
entriesTableRows.value.reduce((acc, { m3 }) => acc + m3, 0)
|
||||
);
|
||||
return {
|
||||
hb: totals.hb.toFixed(2),
|
||||
freight: toCurrency(totals.freightValue),
|
||||
packageValue: toCurrency(totals.packageValue),
|
||||
cc: totals.cc.toFixed(2),
|
||||
pallet: totals.pallet.toFixed(2),
|
||||
m3: totals.m3.toFixed(2),
|
||||
};
|
||||
});
|
||||
|
||||
const getTravelEntries = async (id) => {
|
||||
const { data } = await axios.get(`Travels/${id}/getEntries`);
|
||||
|
@ -382,12 +380,12 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<QTd></QTd>
|
||||
<QTd></QTd>
|
||||
<QTd></QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalHb }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalFreight }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalPackageValue }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalCc }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalPallet }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotalM3 }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.hb }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.freight }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.packageValue }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.cc }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.pallet }}</QTd>
|
||||
<QTd class="text-bold">{{ entriesTotals.m3 }}</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('InvoiceInList', () => {
|
|||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/invoice-in/list`);
|
||||
cy.get('#searchbar input').type('{enter}');
|
||||
cy.get('#searchbar input').should('be.visible').type('{enter}');
|
||||
});
|
||||
|
||||
it('should redirect on clicking a invoice', () => {
|
||||
|
@ -22,7 +22,7 @@ describe('InvoiceInList', () => {
|
|||
});
|
||||
});
|
||||
// https://redmine.verdnatura.es/issues/8420
|
||||
it.skip('should open the details', () => {
|
||||
it('should open the details', () => {
|
||||
cy.get(firstDetailBtn).click();
|
||||
cy.get(summaryHeaders).eq(1).contains('Basic data');
|
||||
cy.get(summaryHeaders).eq(4).contains('Vat');
|
||||
|
|
|
@ -10,14 +10,14 @@ describe('VnLog', () => {
|
|||
cy.openRightMenu();
|
||||
});
|
||||
|
||||
it.skip('should filter by insert actions', () => {
|
||||
it('should filter by insert actions', () => {
|
||||
cy.checkOption(':nth-child(7) > .q-checkbox');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Document');
|
||||
cy.validateContent(chips[1], 'Beginning');
|
||||
});
|
||||
|
||||
it.skip('should filter by entity', () => {
|
||||
it('should filter by entity', () => {
|
||||
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Claim');
|
||||
|
|
|
@ -71,7 +71,7 @@ Cypress.Commands.add('getValue', (selector) => {
|
|||
return cy
|
||||
.get(
|
||||
selector +
|
||||
'> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input'
|
||||
'> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input',
|
||||
)
|
||||
.invoke('val');
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ Cypress.Commands.add('openListSummary', (row) => {
|
|||
|
||||
Cypress.Commands.add('openRightMenu', (element) => {
|
||||
if (element) cy.waitForElement(element);
|
||||
cy.get('#actions-append').click();
|
||||
cy.get('[data-cy="toggle-right-drawer"]').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openLeftMenu', (element) => {
|
||||
|
@ -330,7 +330,7 @@ Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|||
|
||||
Cypress.Commands.add('openUserPanel', () => {
|
||||
cy.get(
|
||||
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
|
||||
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image',
|
||||
).click();
|
||||
});
|
||||
|
||||
|
@ -356,7 +356,7 @@ Cypress.Commands.add('checkValueForm', (id, search) => {
|
|||
|
||||
Cypress.Commands.add('checkValueSelectForm', (id, search) => {
|
||||
cy.get(
|
||||
`.grid-create > :nth-child(${id}) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`
|
||||
`.grid-create > :nth-child(${id}) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`,
|
||||
).should('have.value', search);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue