Skip to content

Commit

Permalink
remove computed in entry form
Browse files Browse the repository at this point in the history
  • Loading branch information
arnold-pichler committed Sep 6, 2024
1 parent 18b4075 commit 13cff3e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/components/TheEntryForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
<v-row no-gutters>
<v-col cols="6" class="px-4 obligatory mb-3">
<v-text-field
v-model="nitratRisikoGebiet"
:model-value="
entry.flaeche_nitratrisikogebiet > entry.flaeche / 2 ? 'JA' : 'NEIN'
"
label="Nitratrisikogebiet"
variant="outlined"
density="compact"
Expand Down Expand Up @@ -578,7 +580,7 @@

<script setup>
import { useDataEntries } from '../composables/useDataEntries.js';
import { watch, ref, computed } from 'vue';
import { watch, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useSchlag } from '../composables/useSchlag.js';
import { mapReady, useMap } from '../composables/useMap.js';
Expand Down Expand Up @@ -748,7 +750,6 @@ function cancelData() {
}
watch(schlagInfo, (value) => {
console.log(value);
if (value?.id !== Number(route.params.schlagId)) {
if (value) {
if (entry.value.flaeche_schwereboeden) {
Expand Down Expand Up @@ -811,10 +812,6 @@ map.on('singleclick', (event) => {
}
});
const nitratRisikoGebiet = computed(() => {
return entry.value.flaeche_nitratrisikogebiet > entry.value.flaeche / 2 ? 'JA' : 'NEIN';
});
watch(() => route.params.schlagId, setSchlagId);
setSchlagId(route.params.schlagId);
</script>
Expand Down

0 comments on commit 13cff3e

Please sign in to comment.