diff --git a/src/pages/Zone/Card/ZoneEventInclusionForm.vue b/src/pages/Zone/Card/ZoneEventInclusionForm.vue index ca0157238..00ad63aee 100644 --- a/src/pages/Zone/Card/ZoneEventInclusionForm.vue +++ b/src/pages/Zone/Card/ZoneEventInclusionForm.vue @@ -45,7 +45,7 @@ const { openConfirmationModal } = useVnConfirm(); const isNew = computed(() => props.isNewMode); const eventInclusionFormData = ref({}); -const _inclusionType = ref('day'); +const _inclusionType = ref('indefinitely'); const inclusionType = computed({ get: () => _inclusionType.value, set: (val) => { @@ -111,7 +111,10 @@ onMounted(() => { if (props.event) { eventInclusionFormData.value = { ...props.event }; inclusionType.value = props.event?.type || 'day'; - } else if (props.date) eventInclusionFormData.value.dated = props.date; + } else if (props.date) { + eventInclusionFormData.value.dated = props.date; + inclusionType.value = 'day'; + } else inclusionType.value = 'indefinitely'; }); diff --git a/src/pages/Zone/Card/ZoneEvents.vue b/src/pages/Zone/Card/ZoneEvents.vue index a63bd8573..90a5cef8f 100644 --- a/src/pages/Zone/Card/ZoneEvents.vue +++ b/src/pages/Zone/Card/ZoneEvents.vue @@ -25,7 +25,7 @@ const zoneEventsFormProps = reactive({ }); const openForm = (data) => { - const { date, isNewMode, event, eventType, geoIds = [] } = data; + const { date = null, isNewMode, event, eventType, geoIds = [] } = data; zoneEventsFormProps.date = date; zoneEventsFormProps.isNewMode = isNewMode; zoneEventsFormProps.event = event; @@ -90,5 +90,20 @@ const onZoneEventFormClose = () => { @close-form="onZoneEventFormClose()" /> + + + + {{ t('eventsInclusionForm.addEvent') }} + +