forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6897-entryBuyListRefactor
This commit is contained in:
commit
ce89d4a31b
|
@ -328,7 +328,6 @@ en:
|
||||||
active: Is active
|
active: Is active
|
||||||
visible: Is visible
|
visible: Is visible
|
||||||
floramondo: Is floramondo
|
floramondo: Is floramondo
|
||||||
salesPersonFk: Buyer
|
|
||||||
categoryFk: Category
|
categoryFk: Category
|
||||||
|
|
||||||
es:
|
es:
|
||||||
|
@ -339,7 +338,6 @@ es:
|
||||||
active: Activo
|
active: Activo
|
||||||
visible: Visible
|
visible: Visible
|
||||||
floramondo: Floramondo
|
floramondo: Floramondo
|
||||||
salesPersonFk: Comprador
|
|
||||||
categoryFk: Categoría
|
categoryFk: Categoría
|
||||||
Plant: Planta natural
|
Plant: Planta natural
|
||||||
Flower: Flor fresca
|
Flower: Flor fresca
|
||||||
|
|
|
@ -15,6 +15,7 @@ const model = defineModel({ type: [String, Number, Object] });
|
||||||
:fields="['id', 'name', 'nickname', 'nif']"
|
:fields="['id', 'name', 'nickname', 'nif']"
|
||||||
:filter-options="['id', 'name', 'nickname', 'nif']"
|
:filter-options="['id', 'name', 'nickname', 'nif']"
|
||||||
sort-by="name ASC"
|
sort-by="name ASC"
|
||||||
|
data-cy="vnSupplierSelect"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -796,7 +796,6 @@ supplier:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
nif: NIF/CIF
|
nif: NIF/CIF
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
|
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsable
|
responsible: Responsable
|
||||||
verified: Verificado
|
verified: Verificado
|
||||||
|
|
|
@ -117,7 +117,7 @@ const toCustomerAddressEdit = (addressId) => {
|
||||||
data-key="CustomerAddresses"
|
data-key="CustomerAddresses"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
ref="vnPaginateRef"
|
ref="vnPaginateRef"
|
||||||
:user-filter="addressFilter"
|
:filter="addressFilter"
|
||||||
:url="`Clients/${route.params.id}/addresses`"
|
:url="`Clients/${route.params.id}/addresses`"
|
||||||
/>
|
/>
|
||||||
<div class="full-width flex justify-center">
|
<div class="full-width flex justify-center">
|
||||||
|
@ -189,11 +189,11 @@ const toCustomerAddressEdit = (addressId) => {
|
||||||
|
|
||||||
<QSeparator
|
<QSeparator
|
||||||
class="q-mx-lg"
|
class="q-mx-lg"
|
||||||
v-if="item.observations.length"
|
v-if="item?.observations?.length"
|
||||||
vertical
|
vertical
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-if="item.observations.length">
|
<div v-if="item?.observations?.length">
|
||||||
<div
|
<div
|
||||||
:key="obIndex"
|
:key="obIndex"
|
||||||
class="flex q-mb-sm"
|
class="flex q-mb-sm"
|
||||||
|
|
|
@ -61,6 +61,23 @@ const columns = computed(() => [
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'buyerId',
|
||||||
|
label: t('customer.params.buyerId'),
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'TicketRequests/getItemTypeWorker',
|
||||||
|
optionLabel: 'nickname',
|
||||||
|
optionValue: 'id',
|
||||||
|
|
||||||
|
fields: ['id', 'nickname'],
|
||||||
|
sortBy: ['nickname ASC'],
|
||||||
|
optionFilter: 'firstName',
|
||||||
|
},
|
||||||
|
cardVisible: false,
|
||||||
|
visible: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'description',
|
name: 'description',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -74,6 +91,7 @@ const columns = computed(() => [
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
label: t('globals.quantity'),
|
label: t('globals.quantity'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
visible: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
|
@ -138,11 +156,11 @@ const updateDateParams = (value, params) => {
|
||||||
const campaign = campaignList.value.find((c) => c.id === value);
|
const campaign = campaignList.value.find((c) => c.id === value);
|
||||||
if (!campaign) return;
|
if (!campaign) return;
|
||||||
|
|
||||||
const { dated, previousDays, scopeDays } = campaign;
|
const { dated, scopeDays } = campaign;
|
||||||
const _date = new Date(dated);
|
const from = new Date(dated);
|
||||||
const [from, to] = dateRange(_date);
|
from.setDate(from.getDate() - scopeDays);
|
||||||
params.from = new Date(from.setDate(from.getDate() - previousDays)).toISOString();
|
params.from = from;
|
||||||
params.to = new Date(to.setDate(to.getDate() + scopeDays)).toISOString();
|
params.to = dated;
|
||||||
return params;
|
return params;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -205,24 +223,57 @@ const updateDateParams = (value, params) => {
|
||||||
<template #moreFilterPanel="{ params }">
|
<template #moreFilterPanel="{ params }">
|
||||||
<div class="column no-wrap flex-center q-gutter-y-md q-mt-xs q-pr-xl">
|
<div class="column no-wrap flex-center q-gutter-y-md q-mt-xs q-pr-xl">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="params.campaign"
|
|
||||||
:options="campaignList"
|
|
||||||
:label="t('globals.campaign')"
|
|
||||||
:filled="true"
|
:filled="true"
|
||||||
class="q-px-sm q-pt-none fit"
|
class="q-px-sm q-pt-none fit"
|
||||||
|
url="ItemTypes"
|
||||||
|
v-model="params.typeId"
|
||||||
|
:label="t('item.list.typeName')"
|
||||||
|
:fields="['id', 'name', 'categoryFk']"
|
||||||
|
:include="'category'"
|
||||||
|
:sortBy="'name ASC'"
|
||||||
dense
|
dense
|
||||||
option-label="code"
|
|
||||||
@update:model-value="(data) => updateDateParams(data, params)"
|
@update:model-value="(data) => updateDateParams(data, params)"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QItemLabel>
|
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||||
{{ scope.opt?.code }}
|
<QItemLabel caption>{{
|
||||||
{{
|
scope.opt?.category?.name
|
||||||
new Date(scope.opt?.dated).getFullYear()
|
}}</QItemLabel>
|
||||||
}}</QItemLabel
|
</QItemSection>
|
||||||
>
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
|
<VnSelect
|
||||||
|
:filled="true"
|
||||||
|
class="q-px-sm q-pt-none fit"
|
||||||
|
url="ItemCategories"
|
||||||
|
v-model="params.categoryId"
|
||||||
|
:label="t('item.list.category')"
|
||||||
|
:fields="['id', 'name']"
|
||||||
|
:sortBy="'name ASC'"
|
||||||
|
dense
|
||||||
|
@update:model-value="(data) => updateDateParams(data, params)"
|
||||||
|
/>
|
||||||
|
<VnSelect
|
||||||
|
v-model="params.campaign"
|
||||||
|
:options="campaignList"
|
||||||
|
:label="t('globals.campaign')"
|
||||||
|
:filled="true"
|
||||||
|
class="q-px-sm q-pt-none fit"
|
||||||
|
:option-label="(opt) => t(opt.code)"
|
||||||
|
:fields="['id', 'code', 'dated', 'scopeDays']"
|
||||||
|
@update:model-value="(data) => updateDateParams(data, params)"
|
||||||
|
dense
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel> {{ t(scope.opt?.code) }} </QItemLabel>
|
||||||
|
<QItemLabel caption>
|
||||||
|
{{ new Date(scope.opt?.dated).getFullYear() }}
|
||||||
|
</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
|
@ -247,7 +298,19 @@ const updateDateParams = (value, params) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
en:
|
||||||
|
|
||||||
|
valentinesDay: Valentine's Day
|
||||||
|
mothersDay: Mother's Day
|
||||||
|
allSaints: All Saints' Day
|
||||||
es:
|
es:
|
||||||
Enter a new search: Introduce una nueva búsqueda
|
Enter a new search: Introduce una nueva búsqueda
|
||||||
Group by items: Agrupar por artículos
|
Group by items: Agrupar por artículos
|
||||||
|
valentinesDay: Día de San Valentín
|
||||||
|
mothersDay: Día de la Madre
|
||||||
|
allSaints: Día de Todos los Santos
|
||||||
|
Campaign consumption: Consumo campaña
|
||||||
|
Campaign: Campaña
|
||||||
|
From: Desde
|
||||||
|
To: Hasta
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -107,6 +107,9 @@ customer:
|
||||||
defaulterSinced: Defaulted Since
|
defaulterSinced: Defaulted Since
|
||||||
hasRecovery: Has Recovery
|
hasRecovery: Has Recovery
|
||||||
socialName: Social name
|
socialName: Social name
|
||||||
|
typeId: Type
|
||||||
|
buyerId: Buyer
|
||||||
|
categoryId: Category
|
||||||
city: City
|
city: City
|
||||||
phone: Phone
|
phone: Phone
|
||||||
postcode: Postcode
|
postcode: Postcode
|
||||||
|
|
|
@ -108,6 +108,9 @@ customer:
|
||||||
hasRecovery: Tiene recobro
|
hasRecovery: Tiene recobro
|
||||||
socialName: Razón social
|
socialName: Razón social
|
||||||
campaign: Campaña
|
campaign: Campaña
|
||||||
|
typeId: Familia
|
||||||
|
buyerId: Comprador
|
||||||
|
categoryId: Reino
|
||||||
city: Ciudad
|
city: Ciudad
|
||||||
phone: Teléfono
|
phone: Teléfono
|
||||||
postcode: Código postal
|
postcode: Código postal
|
||||||
|
|
|
@ -54,8 +54,8 @@ const transferEntry = async () => {
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
transferEntryDialog: The entries will be transferred to the next day
|
transferEntryDialog: The entries will be transferred to the next day
|
||||||
transferEntry: Transfer Entry
|
transferEntry: Partial delay
|
||||||
es:
|
es:
|
||||||
transferEntryDialog: Se van a transferir las compras al dia siguiente
|
transferEntryDialog: Se van a transferir las compras al dia siguiente
|
||||||
transferEntry: Transferir Entrada
|
transferEntry: Retraso parcial
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -149,6 +149,7 @@ function deleteFile(dmsFk) {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="id"
|
option-label="id"
|
||||||
:filter-options="['id', 'name']"
|
:filter-options="['id', 'name']"
|
||||||
|
data-cy="UnDeductibleVatSelect"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -97,12 +97,19 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'companyCode',
|
name: 'companyFk',
|
||||||
label: t('globals.company'),
|
label: t('globals.company'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' },
|
attrs: {
|
||||||
columnField: { component: null },
|
url: 'Companies',
|
||||||
|
optionLabel: 'code',
|
||||||
|
optionValue: 'id',
|
||||||
|
},
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.companyCode),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceInBasicData', () => {
|
describe('InvoiceInBasicData', () => {
|
||||||
const formInputs = '.q-form > .q-card input';
|
|
||||||
const firstFormSelect = '.q-card > .vn-row:nth-child(1) > .q-select';
|
const firstFormSelect = '.q-card > .vn-row:nth-child(1) > .q-select';
|
||||||
const documentBtns = '[data-cy="dms-buttons"] button';
|
|
||||||
const dialogInputs = '.q-dialog input';
|
const dialogInputs = '.q-dialog input';
|
||||||
|
const resetBtn = '.q-btn-group--push > .q-btn--flat';
|
||||||
|
const getDocumentBtns = (opt) => `[data-cy="dms-buttons"] > :nth-child(${opt})`;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -11,13 +11,16 @@ describe('InvoiceInBasicData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the provideer and supplier ref', () => {
|
it('should edit the provideer and supplier ref', () => {
|
||||||
cy.selectOption(firstFormSelect, 'Bros');
|
cy.dataCy('UnDeductibleVatSelect').type('4751000000');
|
||||||
cy.get('[title="Reset"]').click();
|
cy.get('.q-menu .q-item').contains('4751000000').click();
|
||||||
cy.get(formInputs).eq(1).type('{selectall}4739');
|
cy.get(resetBtn).click();
|
||||||
cy.saveCard();
|
|
||||||
|
|
||||||
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Plants nick');
|
cy.waitForElement('#formModel').within(() => {
|
||||||
cy.get(formInputs).eq(1).invoke('val').should('eq', '4739');
|
cy.dataCy('vnSupplierSelect').type('Bros nick');
|
||||||
|
})
|
||||||
|
cy.get('.q-menu .q-item').contains('Bros nick').click();
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get(`${firstFormSelect} input`).invoke('val').should('eq', 'Bros nick');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit, remove and create the dms data', () => {
|
it('should edit, remove and create the dms data', () => {
|
||||||
|
@ -25,18 +28,18 @@ describe('InvoiceInBasicData', () => {
|
||||||
const secondInput = "I don't know what posting here!";
|
const secondInput = "I don't know what posting here!";
|
||||||
|
|
||||||
//edit
|
//edit
|
||||||
cy.get(documentBtns).eq(1).click();
|
cy.get(getDocumentBtns(2)).click();
|
||||||
cy.get(dialogInputs).eq(0).type(`{selectall}${firtsInput}`);
|
cy.get(dialogInputs).eq(0).type(`{selectall}${firtsInput}`);
|
||||||
cy.get('textarea').type(`{selectall}${secondInput}`);
|
cy.get('textarea').type(`{selectall}${secondInput}`);
|
||||||
cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.get(documentBtns).eq(1).click();
|
cy.get(getDocumentBtns(2)).click();
|
||||||
cy.get(dialogInputs).eq(0).invoke('val').should('eq', firtsInput);
|
cy.get(dialogInputs).eq(0).invoke('val').should('eq', firtsInput);
|
||||||
cy.get('textarea').invoke('val').should('eq', secondInput);
|
cy.get('textarea').invoke('val').should('eq', secondInput);
|
||||||
cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
|
|
||||||
//remove
|
//remove
|
||||||
cy.get(documentBtns).eq(2).click();
|
cy.get(getDocumentBtns(3)).click();
|
||||||
cy.get('[data-cy="VnConfirm_confirm"]').click();
|
cy.get('[data-cy="VnConfirm_confirm"]').click();
|
||||||
cy.checkNotification('Data saved');
|
cy.checkNotification('Data saved');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue