From efe8cdbeac65a1336bf116a7bf06a05781115f0d Mon Sep 17 00:00:00 2001 From: mainlyIt Date: Mon, 28 Oct 2024 18:30:49 +0100 Subject: [PATCH 1/4] add visible to response (#243) --- vespadb/observations/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vespadb/observations/serializers.py b/vespadb/observations/serializers.py index 7484a50..5329251 100644 --- a/vespadb/observations/serializers.py +++ b/vespadb/observations/serializers.py @@ -49,6 +49,7 @@ "eradication_result", "wn_id", "wn_validation_status", + "visible", ] # Define the fields that authenticated users can read @@ -92,6 +93,7 @@ "reserved_by_first_name", "modified_by_first_name", "created_by_first_name", + "visible", ] # Define the conditional fields for authenticated users with specific permissions From 6eb0d64439523318434f2265ef9ee9dd17e34819 Mon Sep 17 00:00:00 2001 From: mainlyIt Date: Sun, 24 Nov 2024 17:03:43 +0100 Subject: [PATCH 2/4] vespa db 1.1 (#253) * vespa db 1.1 --- src/components/MapPage.vue | 1 - .../ObservationDetailsComponent.vue | 120 ++++++----- src/components/TableViewPage.vue | 3 - src/stores/vespaStore.js | 8 - vespadb/observations/admin.py | 2 +- .../migrations/0031_observation_source_id.py | 18 ++ .../0032_rename_wn_notes_observation_notes.py | 18 ++ vespadb/observations/models.py | 3 +- vespadb/observations/serializers.py | 38 ++-- .../observations/tasks/observation_mapper.py | 105 +++++---- vespadb/observations/views.py | 202 +++++++++++------- vespadb/permissions.py | 2 +- vespadb/users/admin.py | 2 - ...7_remove_vespauser_personal_data_access.py | 17 ++ vespadb/users/models.py | 18 +- vespadb/users/serializers.py | 4 +- 16 files changed, 357 insertions(+), 204 deletions(-) create mode 100644 vespadb/observations/migrations/0031_observation_source_id.py create mode 100644 vespadb/observations/migrations/0032_rename_wn_notes_observation_notes.py create mode 100644 vespadb/users/migrations/0007_remove_vespauser_personal_data_access.py diff --git a/src/components/MapPage.vue b/src/components/MapPage.vue index 249edd6..5d76b27 100644 --- a/src/components/MapPage.vue +++ b/src/components/MapPage.vue @@ -123,7 +123,6 @@ export default { try { await vespaStore.fetchObservationDetails(properties.id); if (vespaStore.selectedObservation && !vespaStore.selectedObservation.visible) { - console.error("Observation is not visible"); return; } vespaStore.isDetailsPaneOpen = true; diff --git a/src/components/ObservationDetailsComponent.vue b/src/components/ObservationDetailsComponent.vue index 340f2a1..3e8ae53 100644 --- a/src/components/ObservationDetailsComponent.vue +++ b/src/components/ObservationDetailsComponent.vue @@ -29,7 +29,7 @@ class="btn btn-sm btn-outline-danger" @click="cancelReservation">Reservatie annuleren -
+
-
+
-
+
-
+
-
+
-
+
-
+