Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
12fdf567c4
|
@ -42,7 +42,11 @@ const groupedStates = ref([]);
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel
|
||||||
|
:data-key="props.dataKey"
|
||||||
|
:search-button="true"
|
||||||
|
:unremovableParams="['from', 'to']"
|
||||||
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -68,7 +68,7 @@ const arrayData = useArrayData('ZoneEvents');
|
||||||
const exclusionGeoCreate = async () => {
|
const exclusionGeoCreate = async () => {
|
||||||
const params = {
|
const params = {
|
||||||
zoneFk: parseInt(route.params.id),
|
zoneFk: parseInt(route.params.id),
|
||||||
date: dated,
|
date: dated.value,
|
||||||
geoIds: tickedNodes.value,
|
geoIds: tickedNodes.value,
|
||||||
};
|
};
|
||||||
await axios.post('Zones/exclusionGeo', params);
|
await axios.post('Zones/exclusionGeo', params);
|
||||||
|
@ -101,9 +101,17 @@ const exclusionCreate = async () => {
|
||||||
const existsEvent = data.events.find(
|
const existsEvent = data.events.find(
|
||||||
(event) => toDateFormat(event.dated) === toDateFormat(dated.value),
|
(event) => toDateFormat(event.dated) === toDateFormat(dated.value),
|
||||||
);
|
);
|
||||||
|
const existsGeoEvent = data.geoExclusions.find(
|
||||||
|
(event) => toDateFormat(event.dated) === toDateFormat(dated.value),
|
||||||
|
);
|
||||||
if (existsEvent) {
|
if (existsEvent) {
|
||||||
await axios.delete(`Zones/${existsEvent?.zoneFk}/events/${existsEvent?.id}`);
|
await axios.delete(`Zones/${existsEvent?.zoneFk}/events/${existsEvent?.id}`);
|
||||||
}
|
}
|
||||||
|
if (existsGeoEvent) {
|
||||||
|
await axios.delete(
|
||||||
|
`Zones/${existsGeoEvent?.zoneFk}/exclusions/${existsGeoEvent?.zoneExclusionFk}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (isNew.value || props.event?.type) await axios.post(`${url}`, [body]);
|
if (isNew.value || props.event?.type) await axios.post(`${url}`, [body]);
|
||||||
else await axios.put(`${url}/${props.event?.id}`, body);
|
else await axios.put(`${url}/${props.event?.id}`, body);
|
||||||
|
|
|
@ -107,14 +107,27 @@ const createEvent = async () => {
|
||||||
`Zones/${existsExclusion?.zoneFk}/exclusions/${existsExclusion?.id}`,
|
`Zones/${existsExclusion?.zoneFk}/exclusions/${existsExclusion?.id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const {
|
||||||
|
dated: formDated,
|
||||||
|
started,
|
||||||
|
ended,
|
||||||
|
type,
|
||||||
|
weekDays,
|
||||||
|
wdays,
|
||||||
|
} = eventInclusionFormData.value;
|
||||||
|
|
||||||
if (isNew.value)
|
const payload = {
|
||||||
await axios.post(`Zones/${id}/events`, eventInclusionFormData.value);
|
dated: formDated,
|
||||||
else
|
started,
|
||||||
await axios.put(
|
ended,
|
||||||
`Zones/${id}/events/${props.event?.id}`,
|
type,
|
||||||
eventInclusionFormData.value,
|
weekDays,
|
||||||
);
|
wdays,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNew.value || props.eventType === 'exclusion')
|
||||||
|
await axios.post(`Zones/${id}/events`, payload);
|
||||||
|
else await axios.put(`Zones/${id}/events/${props.event?.id}`, payload);
|
||||||
}
|
}
|
||||||
quasar.notify({
|
quasar.notify({
|
||||||
message: t('globals.dataSaved'),
|
message: t('globals.dataSaved'),
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
const firstRow = 'tbody > :nth-child(1)';
|
const firstRow = 'tbody > :nth-child(1)';
|
||||||
|
|
||||||
describe('TicketSale', () => {
|
describe('TicketSale', () => {
|
||||||
describe.skip('#23', () => {
|
describe.skip('Ticket #23', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('claimManager');
|
cy.login('claimManager');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
|
|
Loading…
Reference in New Issue