#7869: Added include and exclude event from list #1574

Merged
jon merged 22 commits from 7869-ModifyZones into dev 2025-03-20 07:39:09 +00:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 807d5f12fa - Show all commits

View File

@ -80,6 +80,8 @@ const exclusionGeoCreate = async () => {
};
const exclusionCreate = async () => {
const defaultMonths = await axios.get('ZoneConfigs');
const nMonths = defaultMonths.data[0].defaultMonths;
const body = {
dated: dated.value,
};
@ -87,7 +89,7 @@ const exclusionCreate = async () => {
for (const id of zoneIds) {
const url = `Zones/${id}/exclusions`;
jon marked this conversation as resolved
Review

Busca formas de no poner números en el código

Busca formas de no poner números en el código
let today = moment(dated.value);
let lastDay = today.clone().add(4, 'months').endOf('month');
let lastDay = today.clone().add(nMonths, 'months').endOf('month');
const { data } = await axios.get(`Zones/getEventsFiltered`, {
params: {

View File

@ -67,6 +67,9 @@ const inclusionType = computed({
const arrayData = useArrayData('ZoneEvents');
const createEvent = async () => {
const defaultMonths = await axios.get('ZoneConfigs');
const nMonths = defaultMonths.data[0].defaultMonths;
eventInclusionFormData.value.weekDays = weekdayStore.toSet(
eventInclusionFormData.value.wdays,
eventInclusionFormData.value.wdays,
@ -85,7 +88,7 @@ const createEvent = async () => {
let today = eventInclusionFormData.value.dated
? moment(eventInclusionFormData.value.dated)
: moment(dated.value);
let lastDay = today.clone().add(4, 'months').endOf('month');
let lastDay = today.clone().add(nMonths, 'months').endOf('month');
const { data } = await axios.get(`Zones/getEventsFiltered`, {
params: {