diff --git a/src/pages/Zone/Card/ZoneEventExclusionForm.vue b/src/pages/Zone/Card/ZoneEventExclusionForm.vue
index 456c16373..6b253067a 100644
--- a/src/pages/Zone/Card/ZoneEventExclusionForm.vue
+++ b/src/pages/Zone/Card/ZoneEventExclusionForm.vue
@@ -67,7 +67,7 @@ const exclusionGeoCreate = async () => {
await axios.post('Zones/exclusionGeo', params);
} else {
const params = {
- zoneExclusionFk: props.event?.id,
+ zoneExclusionFk: props.event?.zoneExclusionFk,
geoIds: tickedNodes.value,
};
await axios.post('Zones/updateExclusionGeo', params);
@@ -103,9 +103,8 @@ const onSubmit = async () => {
const deleteEvent = async () => {
try {
if (!props.event) return;
- await axios.delete(
- `Zones/${route.params.id}/exclusions/${props.event?.zoneExclusionFk}`
- );
+ const exclusionId = props.event?.zoneExclusionFk || props.event?.id;
+ await axios.delete(`Zones/${route.params.id}/exclusions/${exclusionId}`);
await refetchEvents();
} catch (err) {
console.error('Error deleting event: ', err);
@@ -120,6 +119,7 @@ const refetchEvents = async () => {
};
onMounted(() => {
+ console.log('event.eventType: ', props.eventType);
if (props.event) {
dated.value = props.event?.dated;
excludeType.value =
@@ -160,9 +160,9 @@ onMounted(() => {
{{ node.name }}
diff --git a/src/pages/Zone/Card/ZoneEventInclusionForm.vue b/src/pages/Zone/Card/ZoneEventInclusionForm.vue
index 00ad63aee..808f14a53 100644
--- a/src/pages/Zone/Card/ZoneEventInclusionForm.vue
+++ b/src/pages/Zone/Card/ZoneEventInclusionForm.vue
@@ -1,7 +1,6 @@
+
+
+
+
+