Compare commits

..

No commits in common. "caa840849e3a50b7ecb01b707b7e55dc4b4a811c" and "e715be3ca11cf9e017b6114c720c15ecb2976d5b" have entirely different histories.

26 changed files with 158 additions and 448 deletions

View File

@ -8,10 +8,7 @@
"responsible": {
"conservation_office": null,
"conservation_file_number": null,
"handler": {
"type": null,
"detail": "Someone"
}
"handler": null
},
"legal": {
"agreement_date": null

View File

@ -7,10 +7,7 @@
"responsible": {
"conservation_office": null,
"conservation_file_number": null,
"handler": {
"type": null,
"detail": "Someone"
}
"handler": null
},
"before_states": [
],

View File

@ -9,10 +9,7 @@
"registration_file_number": null,
"conservation_office": null,
"conservation_file_number": null,
"handler": {
"type": null,
"detail": "Someone"
}
"handler": null
},
"legal": {
"registration_date": null,

View File

@ -48,10 +48,7 @@
"responsible": {
"conservation_office": null,
"conservation_file_number": "123-TEST",
"handler": {
"type": null,
"detail": "TEST HANDLER CHANGED"
}
"handler": "TEST_HANDLER_CHANGED"
},
"legal": {
"agreement_date": "2022-01-11"

View File

@ -47,10 +47,7 @@
"responsible": {
"conservation_office": null,
"conservation_file_number": "TEST_CHANGED",
"handler": {
"type": null,
"detail": "TEST_HANDLER_CHANGED"
}
"handler": "TEST_HANDLER_CHANGED"
},
"before_states": [],
"after_states": [],

View File

@ -49,10 +49,7 @@
"registration_file_number": "CHANGED",
"conservation_office": null,
"conservation_file_number": "CHANGED",
"handler": {
"type": null,
"detail": "TEST_HANDLER_CHANGED"
}
"handler": null
},
"legal": {
"registration_date": "2022-02-01",

View File

@ -126,7 +126,7 @@ class APIV1UpdateTestCase(BaseAPIV1TestCase):
self.assertEqual(put_props["deductable_surface"], str(self.eco_account.deductable_surface))
self.assertEqual(put_props["responsible"]["conservation_office"], self.eco_account.responsible.conservation_office)
self.assertEqual(put_props["responsible"]["conservation_file_number"], self.eco_account.responsible.conservation_file_number)
self.assertEqual(put_props["responsible"]["handler"]["detail"], self.eco_account.responsible.handler.detail)
self.assertEqual(put_props["responsible"]["handler"], self.eco_account.responsible.handler)
self.assertEqual(put_props["legal"]["agreement_date"], str(self.eco_account.legal.registration_date))
self.assertEqual(len(put_props["actions"]), self.eco_account.actions.count())
self.assertEqual(len(put_props["before_states"]), self.eco_account.before_states.count())
@ -156,7 +156,7 @@ class APIV1UpdateTestCase(BaseAPIV1TestCase):
self.assertNotEqual(modified_on, self.ema.modified)
self.assertEqual(put_props["responsible"]["conservation_office"], self.ema.responsible.conservation_office)
self.assertEqual(put_props["responsible"]["conservation_file_number"], self.ema.responsible.conservation_file_number)
self.assertEqual(put_props["responsible"]["handler"]["detail"], self.ema.responsible.handler.detail)
self.assertEqual(put_props["responsible"]["handler"], self.ema.responsible.handler)
self.assertEqual(len(put_props["actions"]), self.ema.actions.count())
self.assertEqual(len(put_props["before_states"]), self.ema.before_states.count())
self.assertEqual(len(put_props["after_states"]), self.ema.after_states.count())

View File

@ -9,9 +9,9 @@ from django.db import transaction
from api.utils.serializer.v1.serializer import AbstractModelAPISerializerV1, AbstractCompensationAPISerializerV1Mixin, \
LegalAPISerializerV1Mixin, ResponsibilityAPISerializerV1Mixin, DeductableAPISerializerV1Mixin
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID, CODELIST_HANDLER_ID
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID
from compensation.models import EcoAccount
from intervention.models import Legal, Responsibility, Handler
from intervention.models import Legal, Responsibility
from konova.models import Geometry
from konova.tasks import celery_update_parcels
from user.models import UserActionLogEntry
@ -44,7 +44,7 @@ class EcoAccountAPISerializerV1(AbstractModelAPISerializerV1,
return {
"conservation_office": self._konova_code_to_json(responsible.conservation_office),
"conservation_file_number": responsible.conservation_file_number,
"handler": self._handler_to_json(responsible.handler),
"handler": responsible.handler,
}
def _set_responsibility(self, obj, responsibility_data: dict):
@ -64,11 +64,7 @@ class EcoAccountAPISerializerV1(AbstractModelAPISerializerV1,
CODELIST_CONSERVATION_OFFICE_ID,
)
obj.responsible.conservation_file_number = responsibility_data["conservation_file_number"]
obj.responsible.handler.type = self._konova_code_from_json(
responsibility_data["handler"]["type"],
CODELIST_HANDLER_ID,
)
obj.responsible.handler.detail = responsibility_data["handler"]["detail"]
obj.responsible.handler = responsibility_data["handler"]
return obj
def _set_legal(self, obj, legal_data):
@ -96,9 +92,7 @@ class EcoAccountAPISerializerV1(AbstractModelAPISerializerV1,
# Create linked objects
obj = EcoAccount()
obj.responsible = Responsibility(
handler=Handler()
)
obj.responsible = Responsibility()
obj.legal = Legal()
created = create_action
obj.created = created
@ -134,7 +128,6 @@ class EcoAccountAPISerializerV1(AbstractModelAPISerializerV1,
obj = self._set_legal(obj, properties["legal"])
obj.geometry.save()
obj.responsible.handler.save()
obj.responsible.save()
obj.legal.save()
obj.save()
@ -177,7 +170,6 @@ class EcoAccountAPISerializerV1(AbstractModelAPISerializerV1,
obj = self._set_legal(obj, properties["legal"])
obj.geometry.save()
obj.responsible.handler.save()
obj.responsible.save()
obj.legal.save()
obj.save()

View File

@ -9,9 +9,9 @@ from django.db import transaction
from api.utils.serializer.v1.serializer import AbstractModelAPISerializerV1, AbstractCompensationAPISerializerV1Mixin, \
ResponsibilityAPISerializerV1Mixin
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID, CODELIST_HANDLER_ID
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID
from ema.models import Ema
from intervention.models import Responsibility, Handler
from intervention.models import Responsibility
from konova.models import Geometry
from konova.tasks import celery_update_parcels
from user.models import UserActionLogEntry
@ -31,7 +31,7 @@ class EmaAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensationAPISe
return {
"conservation_office": self._konova_code_to_json(responsible.conservation_office),
"conservation_file_number": responsible.conservation_file_number,
"handler": self._handler_to_json(responsible.handler),
"handler": responsible.handler,
}
def _set_responsibility(self, obj, responsibility_data: dict):
@ -51,11 +51,7 @@ class EmaAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensationAPISe
CODELIST_CONSERVATION_OFFICE_ID,
)
obj.responsible.conservation_file_number = responsibility_data["conservation_file_number"]
obj.responsible.handler.type = self._konova_code_from_json(
responsibility_data["handler"]["type"],
CODELIST_HANDLER_ID,
)
obj.responsible.handler.detail = responsibility_data["handler"]["detail"]
obj.responsible.handler = responsibility_data["handler"]
return obj
def _initialize_objects(self, json_model, user):
@ -79,9 +75,7 @@ class EmaAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensationAPISe
# Create linked objects
obj = Ema()
obj.responsible = Responsibility(
handler=Handler()
)
obj.responsible = Responsibility()
created = create_action
obj.created = created
obj.geometry = geometry
@ -107,7 +101,6 @@ class EmaAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensationAPISe
obj = self._set_responsibility(obj, properties["responsible"])
obj.geometry.save()
obj.responsible.handler.save()
obj.responsible.save()
obj.save()
@ -147,7 +140,6 @@ class EmaAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensationAPISe
obj = self._set_responsibility(obj, properties["responsible"])
obj.geometry.save()
obj.responsible.handler.save()
obj.responsible.save()
obj.save()

View File

@ -11,7 +11,7 @@ from django.db.models import QuerySet
from api.utils.serializer.v1.serializer import AbstractModelAPISerializerV1, \
ResponsibilityAPISerializerV1Mixin, LegalAPISerializerV1Mixin, DeductableAPISerializerV1Mixin
from compensation.models import Payment
from intervention.models import Intervention, Responsibility, Legal, Handler
from intervention.models import Intervention, Responsibility, Legal
from konova.models import Geometry
from konova.tasks import celery_update_parcels
from user.models import UserActionLogEntry
@ -69,9 +69,7 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
# Create linked objects
obj = Intervention()
resp = Responsibility(
handler=Handler()
)
resp = Responsibility()
legal = Legal()
created = create_action
obj.legal = legal
@ -154,7 +152,6 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
self._set_responsibility(obj, properties["responsible"])
self._set_legal(obj, properties["legal"])
obj.responsible.handler.save()
obj.responsible.save()
obj.geometry.save()
obj.legal.save()
@ -191,7 +188,6 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
obj.geometry.geom = self._create_geometry_from_json(json_model)
obj.geometry.modified = update_action
obj.responsible.handler.save()
obj.responsible.save()
obj.geometry.save()
obj.legal.save()

View File

@ -15,9 +15,9 @@ from api.utils.serializer.serializer import AbstractModelAPISerializer
from codelist.models import KonovaCode
from codelist.settings import CODELIST_COMPENSATION_ACTION_ID, CODELIST_BIOTOPES_ID, CODELIST_PROCESS_TYPE_ID, \
CODELIST_LAW_ID, CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVATION_OFFICE_ID, \
CODELIST_COMPENSATION_ACTION_DETAIL_ID, CODELIST_BIOTOPES_EXTRA_CODES_ID, CODELIST_HANDLER_ID
CODELIST_COMPENSATION_ACTION_DETAIL_ID, CODELIST_BIOTOPES_EXTRA_CODES_ID
from compensation.models import CompensationAction, UnitChoices, CompensationState
from intervention.models import Responsibility, Legal, Handler
from intervention.models import Responsibility, Legal
from konova.models import Deadline, DeadlineType
from konova.utils.message_templates import DATA_UNSHARED
@ -176,12 +176,6 @@ class ResponsibilityAPISerializerV1Mixin:
class Meta:
abstract = True
def _handler_to_json(self, handler: Handler):
return {
"type": self._konova_code_to_json(handler.type),
"detail": handler.detail
}
def _responsible_to_json(self, responsible: Responsibility):
""" Serializes Responsibility model into json
@ -196,7 +190,7 @@ class ResponsibilityAPISerializerV1Mixin:
"registration_file_number": responsible.registration_file_number,
"conservation_office": self._konova_code_to_json(responsible.conservation_office),
"conservation_file_number": responsible.conservation_file_number,
"handler": self._handler_to_json(responsible.handler),
"handler": responsible.handler,
}
def _set_responsibility(self, obj, responsibility_data: dict):
@ -221,11 +215,7 @@ class ResponsibilityAPISerializerV1Mixin:
CODELIST_CONSERVATION_OFFICE_ID,
)
obj.responsible.conservation_file_number = responsibility_data["conservation_file_number"]
obj.responsible.handler.type = self._konova_code_from_json(
responsibility_data["handler"]["type"],
CODELIST_HANDLER_ID,
)
obj.responsible.handler.detail = responsibility_data["handler"]["detail"]
obj.responsible.handler = responsibility_data["handler"]
return obj

View File

@ -11,7 +11,7 @@ from xml.etree import ElementTree as etree
from codelist.models import KonovaCode, KonovaCodeList
from codelist.settings import CODELIST_INTERVENTION_HANDLER_ID, CODELIST_CONSERVATION_OFFICE_ID, \
CODELIST_REGISTRATION_OFFICE_ID, CODELIST_BIOTOPES_ID, CODELIST_LAW_ID, CODELIST_HANDLER_ID, \
CODELIST_REGISTRATION_OFFICE_ID, CODELIST_BIOTOPES_ID, CODELIST_LAW_ID, CODELIST_COMPENSATION_HANDLER_ID, \
CODELIST_COMPENSATION_ACTION_ID, CODELIST_COMPENSATION_ACTION_CLASS_ID, CODELIST_COMPENSATION_ADDITIONAL_TYPE_ID, \
CODELIST_BASE_URL, CODELIST_PROCESS_TYPE_ID, CODELIST_BIOTOPES_EXTRA_CODES_ID, \
CODELIST_COMPENSATION_ACTION_DETAIL_ID
@ -36,7 +36,7 @@ class Command(BaseKonovaCommand):
CODELIST_BIOTOPES_ID,
CODELIST_BIOTOPES_EXTRA_CODES_ID,
CODELIST_LAW_ID,
CODELIST_HANDLER_ID,
CODELIST_COMPENSATION_HANDLER_ID,
CODELIST_COMPENSATION_ACTION_ID,
CODELIST_COMPENSATION_ACTION_CLASS_ID,
CODELIST_COMPENSATION_ACTION_DETAIL_ID,

View File

@ -1,13 +1,9 @@
# Generated by Django 3.1.3 on 2022-01-14 08:36
from django.core.management import call_command
from django.db import migrations, models
import django.db.models.deletion
def load_initial_codes(apps, schema_editor):
call_command('update_codelist')
class Migration(migrations.Migration):
initial = True
@ -36,5 +32,4 @@ class Migration(migrations.Migration):
('codes', models.ManyToManyField(blank=True, help_text='Codes for this list', related_name='code_lists', to='codelist.KonovaCode')),
],
),
migrations.RunPython(load_initial_codes),
]

View File

@ -19,7 +19,7 @@ CODELIST_BIOTOPES_EXTRA_CODES_ID = 975 # CLZusatzbezeichnung
CODELIST_LAW_ID = 1048 # CLVerfahrensrecht
CODELIST_PROCESS_TYPE_ID = 44382 # CLVerfahrenstyp
CODELIST_HANDLER_ID = 1052 # CLEingreifer
CODELIST_COMPENSATION_HANDLER_ID = 1052 # CLEingreifer
CODELIST_COMPENSATION_ACTION_ID = 1026 # CLMassnahmedetail
CODELIST_COMPENSATION_ACTION_DETAIL_ID = 1035 # CLZusatzmerkmal
CODELIST_COMPENSATION_ACTION_CLASS_ID = 1034 # CLMassnahmeklasse

View File

@ -13,10 +13,10 @@ from django.utils.translation import gettext_lazy as _
from django import forms
from codelist.models import KonovaCode
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID, CODELIST_HANDLER_ID
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID
from compensation.models import Compensation, EcoAccount
from intervention.inputs import GenerateInput
from intervention.models import Intervention, Responsibility, Legal, Handler
from intervention.models import Intervention, Responsibility, Legal
from konova.forms import BaseForm, SimpleGeomForm
from konova.utils.message_templates import EDITED_GENERAL_DATA, COMPENSATION_ADDED_TEMPLATE
from user.models import UserActionLogEntry
@ -101,30 +101,12 @@ class CompensationResponsibleFormMixin(forms.Form):
}
)
)
handler_type = forms.ModelChoiceField(
label=_("Eco-Account handler type"),
label_suffix="",
help_text=_("What type of handler is responsible for the ecoaccount?"),
required=False,
queryset=KonovaCode.objects.filter(
is_archived=False,
is_leaf=True,
code_lists__in=[CODELIST_HANDLER_ID],
),
widget=autocomplete.ModelSelect2(
url="codes-handler-autocomplete",
attrs={
"data-placeholder": _("Click for selection"),
}
),
)
handler_detail = forms.CharField(
label=_("Eco-Account handler detail"),
handler = forms.CharField(
label=_("Eco-account handler"),
label_suffix="",
max_length=255,
required=False,
help_text=_("Detail input on the handler"),
help_text=_("Who handles the eco-account"),
widget=forms.TextInput(
attrs={
"placeholder": _("Company Mustermann"),
@ -363,8 +345,7 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
"registration_date",
"surface",
"conservation_file_number",
"handler_type",
"handler_detail",
"handler",
"comment",
]
@ -387,8 +368,7 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
identifier = self.cleaned_data.get("identifier", None)
title = self.cleaned_data.get("title", None)
registration_date = self.cleaned_data.get("registration_date", None)
handler_type = self.cleaned_data.get("handler_type", None)
handler_detail = self.cleaned_data.get("handler_detail", None)
handler = self.cleaned_data.get("handler", None)
surface = self.cleaned_data.get("surface", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
@ -399,11 +379,6 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
# Process the geometry form
geometry = geom_form.save(action)
handler = Handler.objects.create(
type=handler_type,
detail=handler_detail,
)
responsible = Responsibility.objects.create(
handler=handler,
conservation_file_number=conservation_file_number,
@ -448,13 +423,11 @@ class EditEcoAccountForm(NewEcoAccountForm):
reg_date = self.instance.legal.registration_date
if reg_date is not None:
reg_date = reg_date.isoformat()
form_data = {
"identifier": self.instance.identifier,
"title": self.instance.title,
"surface": self.instance.deductable_surface,
"handler_type": self.instance.responsible.handler.type,
"handler_detail": self.instance.responsible.handler.detail,
"handler": self.instance.responsible.handler,
"registration_date": reg_date,
"conservation_office": self.instance.responsible.conservation_office,
"conservation_file_number": self.instance.responsible.conservation_file_number,
@ -472,8 +445,7 @@ class EditEcoAccountForm(NewEcoAccountForm):
identifier = self.cleaned_data.get("identifier", None)
title = self.cleaned_data.get("title", None)
registration_date = self.cleaned_data.get("registration_date", None)
handler_type = self.cleaned_data.get("handler_type", None)
handler_detail = self.cleaned_data.get("handler_detail", None)
handler = self.cleaned_data.get("handler", None)
surface = self.cleaned_data.get("surface", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
@ -486,9 +458,7 @@ class EditEcoAccountForm(NewEcoAccountForm):
geometry = geom_form.save(action)
# Update responsible data
self.instance.responsible.handler.type = handler_type
self.instance.responsible.handler.detail = handler_detail
self.instance.responsible.handler.save()
self.instance.responsible.handler = handler
self.instance.responsible.conservation_office = conservation_office
self.instance.responsible.conservation_file_number = conservation_file_number
self.instance.responsible.save()

View File

@ -14,7 +14,7 @@ from django.utils.translation import gettext_lazy as _
from compensation.forms.forms import AbstractCompensationForm, CompensationResponsibleFormMixin
from ema.models import Ema, EmaDocument
from intervention.models import Responsibility, Handler
from intervention.models import Responsibility
from konova.forms import SimpleGeomForm, NewDocumentModalForm
from user.models import UserActionLogEntry
@ -31,8 +31,7 @@ class NewEmaForm(AbstractCompensationForm, CompensationResponsibleFormMixin):
"title",
"conservation_office",
"conservation_file_number",
"handler_type",
"handler_detail",
"handler",
"comment",
]
@ -54,8 +53,7 @@ class NewEmaForm(AbstractCompensationForm, CompensationResponsibleFormMixin):
# Fetch data from cleaned POST values
identifier = self.cleaned_data.get("identifier", None)
title = self.cleaned_data.get("title", None)
handler_type = self.cleaned_data.get("handler_type", None)
handler_detail = self.cleaned_data.get("handler_detail", None)
handler = self.cleaned_data.get("handler", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
comment = self.cleaned_data.get("comment", None)
@ -65,10 +63,6 @@ class NewEmaForm(AbstractCompensationForm, CompensationResponsibleFormMixin):
# Process the geometry form
geometry = geom_form.save(action)
handler = Handler.objects.create(
type=handler_type,
detail=handler_detail
)
responsible = Responsibility.objects.create(
handler=handler,
conservation_file_number=conservation_file_number,
@ -111,8 +105,7 @@ class EditEmaForm(NewEmaForm):
form_data = {
"identifier": self.instance.identifier,
"title": self.instance.title,
"handler_type": self.instance.responsible.handler.type,
"handler_detail": self.instance.responsible.handler.detail,
"handler": self.instance.responsible.handler,
"conservation_office": self.instance.responsible.conservation_office,
"conservation_file_number": self.instance.responsible.conservation_file_number,
"comment": self.instance.comment,
@ -128,8 +121,7 @@ class EditEmaForm(NewEmaForm):
# Fetch data from cleaned POST values
identifier = self.cleaned_data.get("identifier", None)
title = self.cleaned_data.get("title", None)
handler_type = self.cleaned_data.get("handler_type", None)
handler_detail = self.cleaned_data.get("handler_detail", None)
handler = self.cleaned_data.get("handler", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
comment = self.cleaned_data.get("comment", None)
@ -140,9 +132,7 @@ class EditEmaForm(NewEmaForm):
geometry = geom_form.save(action)
# Update responsible data
self.instance.responsible.handler.type = handler_type
self.instance.responsible.handler.detail = handler_detail
self.instance.responsible.handler.save()
self.instance.responsible.handler = handler
self.instance.responsible.conservation_office = conservation_office
self.instance.responsible.conservation_file_number = conservation_file_number
self.instance.responsible.save()

View File

@ -79,9 +79,7 @@ class EmaViewTestCase(CompensationViewTestCase):
# Create log entry
action = UserActionLogEntry.get_created_action(self.superuser)
# Create responsible data object
responsibility_data = Responsibility.objects.create(
handler=self.handler
)
responsibility_data = Responsibility.objects.create()
geometry = Geometry.objects.create()
self.ema = Ema.objects.create(
identifier="TEST",

View File

@ -16,9 +16,9 @@ from django.utils.translation import gettext_lazy as _
from codelist.models import KonovaCode
from codelist.settings import CODELIST_PROCESS_TYPE_ID, CODELIST_LAW_ID, \
CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVATION_OFFICE_ID, CODELIST_HANDLER_ID
CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVATION_OFFICE_ID
from intervention.inputs import GenerateInput
from intervention.models import Intervention, Legal, Responsibility, Handler
from intervention.models import Intervention, Legal, Responsibility
from konova.forms import BaseForm, SimpleGeomForm
from user.models import UserActionLogEntry
@ -138,29 +138,12 @@ class NewInterventionForm(BaseForm):
}
)
)
handler_type = forms.ModelChoiceField(
label=_("Intervention handler type"),
label_suffix="",
help_text=_("What type of handler is responsible for the intervention?"),
required=False,
queryset=KonovaCode.objects.filter(
is_archived=False,
is_leaf=True,
code_lists__in=[CODELIST_HANDLER_ID],
),
widget=autocomplete.ModelSelect2(
url="codes-handler-autocomplete",
attrs={
"data-placeholder": _("Click for selection"),
}
),
)
handler_detail = forms.CharField(
label=_("Intervention handler detail"),
handler = forms.CharField(
label=_("Intervention handler"),
label_suffix="",
max_length=255,
required=False,
help_text=_("Detail input on the handler"),
help_text=_("Who performs the intervention"),
widget=forms.TextInput(
attrs={
"placeholder": _("Company Mustermann"),
@ -168,7 +151,6 @@ class NewInterventionForm(BaseForm):
}
)
)
registration_date = forms.DateField(
label=_("Registration date"),
label_suffix=_(""),
@ -223,8 +205,7 @@ class NewInterventionForm(BaseForm):
title = self.cleaned_data.get("title", None)
_type = self.cleaned_data.get("type", None)
laws = self.cleaned_data.get("laws", None)
handler_type = self.cleaned_data.get("handler_type", None)
handler_detail = self.cleaned_data.get("handler_detail", None)
handler = self.cleaned_data.get("handler", None)
registration_office = self.cleaned_data.get("registration_office", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
@ -245,10 +226,6 @@ class NewInterventionForm(BaseForm):
# Then add the M2M laws to the object
legal_data.laws.set(laws)
handler = Handler.objects.create(
type=handler_type,
detail=handler_detail
)
# Create responsible data object
responsibility_data = Responsibility.objects.create(
registration_office=registration_office,
@ -307,8 +284,7 @@ class EditInterventionForm(NewInterventionForm):
"title": self.instance.title,
"type": self.instance.legal.process_type,
"laws": list(self.instance.legal.laws.values_list("id", flat=True)),
"handler_type": self.instance.responsible.handler.type,
"handler_detail": self.instance.responsible.handler.detail,
"handler": self.instance.responsible.handler,
"registration_office": self.instance.responsible.registration_office,
"registration_file_number": self.instance.responsible.registration_file_number,
"conservation_office": self.instance.responsible.conservation_office,
@ -337,8 +313,7 @@ class EditInterventionForm(NewInterventionForm):
title = self.cleaned_data.get("title", None)
process_type = self.cleaned_data.get("type", None)
laws = self.cleaned_data.get("laws", None)
handler_type = self.cleaned_data.get("handler_type", None)
handler_detail = self.cleaned_data.get("handler_detail", None)
handler = self.cleaned_data.get("handler", None)
registration_office = self.cleaned_data.get("registration_office", None)
registration_file_number = self.cleaned_data.get("registration_file_number", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
@ -353,10 +328,7 @@ class EditInterventionForm(NewInterventionForm):
self.instance.legal.laws.set(laws)
self.instance.legal.save()
self.instance.responsible.handler.type = handler_type
self.instance.responsible.handler.detail = handler_detail
self.instance.responsible.handler.save()
self.instance.responsible.handler = handler
self.instance.responsible.registration_office = registration_office
self.instance.responsible.registration_file_number = registration_file_number
self.instance.responsible.conservation_office = conservation_office

View File

@ -1,64 +0,0 @@
# Generated by Django 3.1.3 on 2022-03-03 08:56
from django.db import migrations, models, transaction
import django.db.models.deletion
import uuid
def migrate_handler(apps, schema_editor):
KonovaCode = apps.get_model('codelist', 'KonovaCode')
Responsibility = apps.get_model('intervention', 'Responsibility')
Handler = apps.get_model('intervention', 'Handler')
all_responsibs = Responsibility.objects.all()
if all_responsibs.exists():
handler_tmp_code = KonovaCode.objects.get(
atom_id=710185,
)
with transaction.atomic():
for resp in all_responsibs:
handler_old = resp.handler_old
handler = Handler.objects.create(
type=handler_tmp_code,
detail=handler_old
)
resp.handler = handler
resp.save()
class Migration(migrations.Migration):
dependencies = [
('codelist', '0001_initial'),
('intervention', '0003_intervention_teams'),
]
operations = [
migrations.CreateModel(
name='Handler',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('detail', models.CharField(blank=True, max_length=500, null=True)),
('type', models.ForeignKey(blank=True, limit_choices_to={'code_lists__in': [1052], 'is_archived': False, 'is_selectable': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='codelist.konovacode')),
],
options={
'abstract': False,
},
),
migrations.RenameField(
model_name='responsibility',
old_name='handler',
new_name='handler_old',
),
migrations.AddField(
model_name='responsibility',
name='handler',
field=models.ForeignKey(blank=True, help_text="Refers to 'Eingriffsverursacher' or 'Maßnahmenträger'", null=True, on_delete=django.db.models.deletion.SET_NULL, to='intervention.handler'),
),
migrations.RunPython(migrate_handler),
migrations.RemoveField(
model_name='responsibility',
name='handler_old'
),
]

View File

@ -6,42 +6,10 @@ Created on: 15.11.21
"""
from django.db import models
from django.utils.translation import gettext_lazy as _
from codelist.models import KonovaCode
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID, CODELIST_REGISTRATION_OFFICE_ID, \
CODELIST_HANDLER_ID
from codelist.settings import CODELIST_CONSERVATION_OFFICE_ID, CODELIST_REGISTRATION_OFFICE_ID
from konova.models import UuidModel
from konova.utils.message_templates import UNKNOWN, NO_DETAILS
class Handler(UuidModel):
""" The handler of an entry
Refers to 'Eingriffsverursacher' or 'Maßnahmenträger'
"""
type = models.ForeignKey(
KonovaCode,
on_delete=models.SET_NULL,
null=True,
blank=True,
limit_choices_to={
"code_lists__in": [CODELIST_HANDLER_ID],
"is_selectable": True,
"is_archived": False,
}
)
detail = models.CharField(
max_length=500,
null=True,
blank=True,
)
def __str__(self):
detail = self.detail or NO_DETAILS
_type = self.type.long_name if self.type is not None else UNKNOWN
return f'{_type}, {detail}'
class Responsibility(UuidModel):
@ -75,17 +43,11 @@ class Responsibility(UuidModel):
}
)
conservation_file_number = models.CharField(max_length=1000, blank=True, null=True)
handler = models.ForeignKey(
Handler,
null=True,
blank=True,
help_text="Refers to 'Eingriffsverursacher' or 'Maßnahmenträger'",
on_delete=models.SET_NULL,
)
handler = models.CharField(max_length=500, null=True, blank=True, help_text="Refers to 'Eingriffsverursacher' or 'Maßnahmenträger'")
def __str__(self):
return "ZB: {} | ETS: {} | Handler: {}".format(
self.registration_office,
self.conservation_office,
str(self.handler)
self.handler
)

View File

@ -17,7 +17,7 @@ from django.db.models import Q
from codelist.models import KonovaCode
from codelist.settings import CODELIST_COMPENSATION_ACTION_ID, CODELIST_BIOTOPES_ID, CODELIST_LAW_ID, \
CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVATION_OFFICE_ID, CODELIST_PROCESS_TYPE_ID, \
CODELIST_BIOTOPES_EXTRA_CODES_ID, CODELIST_COMPENSATION_ACTION_DETAIL_ID, CODELIST_HANDLER_ID
CODELIST_BIOTOPES_EXTRA_CODES_ID, CODELIST_COMPENSATION_ACTION_DETAIL_ID
from compensation.models import EcoAccount
from intervention.models import Intervention
@ -357,18 +357,3 @@ class ConservationOfficeCodeAutocomplete(KonovaCodeAutocomplete):
def get_result_label(self, result):
return f"{result.long_name} ({result.short_name})"
class HandlerCodeAutocomplete(KonovaCodeAutocomplete):
"""
Due to limitations of the django dal package, we need to subclass for each code list
"""
group_by_related = "parent"
related_field_name = "long_name"
def __init__(self, *args, **kwargs):
self.c = CODELIST_HANDLER_ID
super().__init__(*args, **kwargs)
def get_result_label(self, result):
return result.long_name

View File

@ -18,7 +18,7 @@ from django.urls import reverse
from codelist.models import KonovaCode, KonovaCodeList
from compensation.models import Compensation, CompensationState, CompensationAction, EcoAccount, EcoAccountDeduction
from intervention.models import Legal, Responsibility, Intervention, Handler
from intervention.models import Legal, Responsibility, Intervention
from konova.management.commands.setup_data import GROUPS_DATA
from konova.models import Geometry
from konova.settings import DEFAULT_GROUP
@ -57,7 +57,6 @@ class BaseTestCase(TestCase):
self.create_users()
self.create_groups()
self.handler = self.create_dummy_handler()
self.intervention = self.create_dummy_intervention()
self.compensation = self.create_dummy_compensation()
self.eco_account = self.create_dummy_eco_account()
@ -123,9 +122,7 @@ class BaseTestCase(TestCase):
# Create legal data object (without M2M laws first)
legal_data = Legal.objects.create()
# Create responsible data object
responsibility_data = Responsibility.objects.create(
handler=self.handler
)
responsibility_data = Responsibility.objects.create()
geometry = Geometry.objects.create()
# Finally create main object, holding the other objects
intervention = Intervention.objects.create(
@ -176,9 +173,6 @@ class BaseTestCase(TestCase):
# Create responsible data object
lega_data = Legal.objects.create()
responsible_data = Responsibility.objects.create()
handler = self.handler
responsible_data.handler = handler
responsible_data.save()
# Finally create main object, holding the other objects
eco_account = EcoAccount.objects.create(
identifier="TEST",
@ -203,8 +197,6 @@ class BaseTestCase(TestCase):
geometry = Geometry.objects.create()
# Create responsible data object
responsible_data = Responsibility.objects.create()
responsible_data.handler = self.handler
responsible_data.save()
# Finally create main object, holding the other objects
ema = Ema.objects.create(
identifier="TEST",
@ -290,18 +282,6 @@ class BaseTestCase(TestCase):
polygon = polygon.transform(3857, clone=True)
return MultiPolygon(polygon, srid=3857) # 3857 is the default srid used for MultiPolygonField in the form
def create_dummy_handler(self) -> Handler:
""" Creates a Handler
Returns:
"""
handler = Handler.objects.get_or_create(
type=KonovaCode.objects.all().first(),
detail="Test handler"
)[0]
return handler
def fill_out_intervention(self, intervention: Intervention) -> Intervention:
""" Adds all required (dummy) data to an intervention
@ -315,7 +295,7 @@ class BaseTestCase(TestCase):
intervention.responsible.conservation_office = KonovaCode.objects.get(id=2)
intervention.responsible.registration_file_number = "test"
intervention.responsible.conservation_file_number = "test"
intervention.responsible.handler = self.handler
intervention.responsible.handler = "handler"
intervention.responsible.save()
intervention.legal.registration_date = datetime.date.fromisoformat("1970-01-01")
intervention.legal.binding_date = datetime.date.fromisoformat("1970-01-01")
@ -363,7 +343,7 @@ class BaseTestCase(TestCase):
"""
ema.responsible.conservation_office = self.get_conservation_office_code()
ema.responsible.conservation_file_number = "test"
ema.responsible.handler = self.handler
ema.responsible.handler = "handler"
ema.responsible.save()
ema.after_states.add(self.comp_state)
ema.before_states.add(self.comp_state)
@ -381,7 +361,7 @@ class BaseTestCase(TestCase):
eco_account.legal.save()
eco_account.responsible.conservation_office = self.get_conservation_office_code()
eco_account.responsible.conservation_file_number = "test"
eco_account.responsible.handler = self.handler
eco_account.responsible.handler = "handler"
eco_account.responsible.save()
eco_account.after_states.add(self.comp_state)
eco_account.before_states.add(self.comp_state)

View File

@ -20,8 +20,7 @@ from django.urls import path, include
from konova.autocompletes import EcoAccountAutocomplete, \
InterventionAutocomplete, CompensationActionCodeAutocomplete, BiotopeCodeAutocomplete, LawCodeAutocomplete, \
RegistrationOfficeCodeAutocomplete, ConservationOfficeCodeAutocomplete, ProcessTypeCodeAutocomplete, \
ShareUserAutocomplete, BiotopeExtraCodeAutocomplete, CompensationActionDetailCodeAutocomplete, \
ShareTeamAutocomplete, HandlerCodeAutocomplete
ShareUserAutocomplete, BiotopeExtraCodeAutocomplete, CompensationActionDetailCodeAutocomplete, ShareTeamAutocomplete
from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG
from konova.sso.sso import KonovaSSOClient
from konova.views import logout_view, home_view, get_geom_parcels
@ -53,7 +52,6 @@ urlpatterns = [
path("atcmplt/codes/prc-type", ProcessTypeCodeAutocomplete.as_view(), name="codes-process-type-autocomplete"),
path("atcmplt/codes/reg-off", RegistrationOfficeCodeAutocomplete.as_view(), name="codes-registration-office-autocomplete"),
path("atcmplt/codes/cons-off", ConservationOfficeCodeAutocomplete.as_view(), name="codes-conservation-office-autocomplete"),
path("atcmplt/codes/handler", HandlerCodeAutocomplete.as_view(), name="codes-handler-autocomplete"),
path("atcmplt/share/u", ShareUserAutocomplete.as_view(), name="share-user-autocomplete"),
path("atcmplt/share/t", ShareTeamAutocomplete.as_view(), name="share-team-autocomplete"),
]

View File

@ -7,8 +7,6 @@ Created on: 02.08.21
"""
from django.utils.translation import gettext_lazy as _
NO_DETAILS = _("no further details")
UNKNOWN = _("Unknown")
UNGROUPED = _("Ungrouped")
FORM_INVALID = _("There was an error on this form.")
PARAMS_INVALID = _("Invalid parameters")

Binary file not shown.

View File

@ -6,8 +6,8 @@
#: compensation/filters.py:123 compensation/forms/modalForms.py:36
#: compensation/forms/modalForms.py:47 compensation/forms/modalForms.py:63
#: compensation/forms/modalForms.py:358 compensation/forms/modalForms.py:466
#: intervention/forms/forms.py:54 intervention/forms/forms.py:174
#: intervention/forms/forms.py:186 intervention/forms/modalForms.py:150
#: intervention/forms/forms.py:54 intervention/forms/forms.py:156
#: intervention/forms/forms.py:168 intervention/forms/modalForms.py:150
#: intervention/forms/modalForms.py:163 intervention/forms/modalForms.py:176
#: konova/filters/mixins.py:53 konova/filters/mixins.py:54
#: konova/filters/mixins.py:81 konova/filters/mixins.py:82
@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-03 12:08+0100\n"
"POT-Creation-Date: 2022-02-21 14:44+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -61,10 +61,9 @@ msgid "Select the responsible office"
msgstr "Verantwortliche Stelle"
#: analysis/forms.py:58 compensation/forms/forms.py:88
#: compensation/forms/forms.py:118 compensation/forms/forms.py:183
#: intervention/forms/forms.py:64 intervention/forms/forms.py:81
#: intervention/forms/forms.py:97 intervention/forms/forms.py:113
#: intervention/forms/forms.py:154 intervention/forms/modalForms.py:49
#: compensation/forms/forms.py:165 intervention/forms/forms.py:64
#: intervention/forms/forms.py:81 intervention/forms/forms.py:97
#: intervention/forms/forms.py:113 intervention/forms/modalForms.py:49
#: intervention/forms/modalForms.py:63 user/forms.py:196
msgid "Click for selection"
msgstr "Auswählen..."
@ -350,7 +349,7 @@ msgstr "Bezeichnung"
msgid "An explanatory name"
msgstr "Aussagekräftiger Titel"
#: compensation/forms/forms.py:50 ema/forms.py:50 ema/forms.py:108
#: compensation/forms/forms.py:50 ema/forms.py:49 ema/forms.py:102
msgid "Compensation XY; Location ABC"
msgstr "Kompensation XY; Flur ABC"
@ -365,7 +364,7 @@ msgstr "Kompensation XY; Flur ABC"
#: ema/templates/ema/detail/includes/actions.html:34
#: ema/templates/ema/detail/includes/deadlines.html:34
#: ema/templates/ema/detail/includes/documents.html:34
#: intervention/forms/forms.py:198 intervention/forms/modalForms.py:175
#: intervention/forms/forms.py:180 intervention/forms/modalForms.py:175
#: intervention/templates/intervention/detail/includes/documents.html:34
#: intervention/templates/intervention/detail/includes/payments.html:34
#: intervention/templates/intervention/detail/includes/revocation.html:38
@ -374,7 +373,7 @@ msgid "Comment"
msgstr "Kommentar"
#: compensation/forms/forms.py:59 compensation/forms/modalForms.py:467
#: intervention/forms/forms.py:200
#: intervention/forms/forms.py:182
msgid "Additional comment"
msgstr "Zusätzlicher Kommentar"
@ -394,88 +393,80 @@ msgstr "Aktenzeichen Eintragungsstelle"
msgid "ETS-123/ABC.456"
msgstr ""
#: compensation/forms/forms.py:106
msgid "Eco-Account handler type"
msgstr "Art des Maßnahmenträgers"
#: compensation/forms/forms.py:105
msgid "Eco-account handler"
msgstr "Maßnahmenträger"
#: compensation/forms/forms.py:108
msgid "What type of handler is responsible for the ecoaccount?"
msgstr "Zu welcher Kategorie dieser Maßnahmenträger gehört"
#: compensation/forms/forms.py:109
msgid "Who handles the eco-account"
msgstr "Wer für die Herrichtung des Ökokontos verantwortlich ist"
#: compensation/forms/forms.py:123
msgid "Eco-Account handler detail"
msgstr "Detailangabe zum Maßnahmenträger"
#: compensation/forms/forms.py:127 intervention/forms/forms.py:163
msgid "Detail input on the handler"
msgstr "Name der Behörde, Stadt, Firma, ..."
#: compensation/forms/forms.py:130 intervention/forms/forms.py:166
#: compensation/forms/forms.py:112 intervention/forms/forms.py:149
msgid "Company Mustermann"
msgstr "Firma Mustermann"
#: compensation/forms/forms.py:143
#: compensation/forms/forms.py:125
msgid "Is CEF"
msgstr "Ist CEF-Maßnahme"
#: compensation/forms/forms.py:144
#: compensation/forms/forms.py:126
msgid "Optionally: Whether this compensation is a CEF compensation?"
msgstr "Optional: Handelt es sich um eine CEF-Maßnahme?"
#: compensation/forms/forms.py:156
#: compensation/forms/forms.py:138
msgid "Is coherence keeping"
msgstr "Ist Kohärenzsicherungsmaßnahme"
#: compensation/forms/forms.py:157
#: compensation/forms/forms.py:139
msgid ""
"Optionally: Whether this compensation is a coherence keeping compensation?"
msgstr "Optional: Handelt es sich um eine Kohärenzsicherungsmaßnahme?"
#: compensation/forms/forms.py:174
#: compensation/forms/forms.py:156
#: compensation/templates/compensation/detail/compensation/view.html:36
#: compensation/templates/compensation/report/compensation/report.html:16
msgid "compensates intervention"
msgstr "kompensiert Eingriff"
#: compensation/forms/forms.py:176
#: compensation/forms/forms.py:158
msgid "Select the intervention for which this compensation compensates"
msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist"
#: compensation/forms/forms.py:202 compensation/views/compensation.py:96
#: compensation/forms/forms.py:184 compensation/views/compensation.py:96
msgid "New compensation"
msgstr "Neue Kompensation"
#: compensation/forms/forms.py:273
#: compensation/forms/forms.py:255
msgid "Edit compensation"
msgstr "Bearbeite Kompensation"
#: compensation/forms/forms.py:334 compensation/utils/quality.py:84
#: compensation/forms/forms.py:316 compensation/utils/quality.py:84
msgid "Available Surface"
msgstr "Verfügbare Fläche"
#: compensation/forms/forms.py:337
#: compensation/forms/forms.py:319
msgid "The amount that can be used for deductions"
msgstr "Die für Abbuchungen zur Verfügung stehende Menge"
#: compensation/forms/forms.py:346
#: compensation/forms/forms.py:328
#: compensation/templates/compensation/detail/eco_account/view.html:67
#: compensation/utils/quality.py:72
msgid "Agreement date"
msgstr "Vereinbarungsdatum"
#: compensation/forms/forms.py:348
#: compensation/forms/forms.py:330
msgid "When did the parties agree on this?"
msgstr "Wann wurde dieses Ökokonto offiziell vereinbart?"
#: compensation/forms/forms.py:373 compensation/views/eco_account.py:107
#: compensation/forms/forms.py:354 compensation/views/eco_account.py:107
msgid "New Eco-Account"
msgstr "Neues Ökokonto"
#: compensation/forms/forms.py:382
#: compensation/forms/forms.py:363
msgid "Eco-Account XY; Location ABC"
msgstr "Ökokonto XY; Flur ABC"
#: compensation/forms/forms.py:442
#: compensation/forms/forms.py:417
msgid "Edit Eco-Account"
msgstr "Ökokonto bearbeiten"
@ -1159,7 +1150,7 @@ msgstr "Daten zu den verantwortlichen Stellen"
msgid "Compensations - Overview"
msgstr "Kompensationen - Übersicht"
#: compensation/views/compensation.py:151 konova/utils/message_templates.py:35
#: compensation/views/compensation.py:151 konova/utils/message_templates.py:33
msgid "Compensation {} edited"
msgstr "Kompensation {} bearbeitet"
@ -1224,11 +1215,11 @@ msgstr "Freigabelink ungültig"
msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert"
#: ema/forms.py:41 ema/views.py:98
#: ema/forms.py:40 ema/views.py:98
msgid "New EMA"
msgstr "Neue EMA hinzufügen"
#: ema/forms.py:102
#: ema/forms.py:96
msgid "Edit EMA"
msgstr "Bearbeite EMA"
@ -1302,35 +1293,33 @@ msgid "ZB-123/ABC.456"
msgstr ""
#: intervention/forms/forms.py:142
msgid "Intervention handler type"
msgstr "Art des Eingriffsverursachers"
#: intervention/templates/intervention/detail/view.html:64
#: intervention/utils/quality.py:52
msgid "Intervention handler"
msgstr "Eingriffsverursacher"
#: intervention/forms/forms.py:144
msgid "What type of handler is responsible for the intervention?"
msgstr "Zu welcher Kategorie dieser Eingriffsverursacher gehört"
#: intervention/forms/forms.py:146
msgid "Who performs the intervention"
msgstr "Wer führt den Eingriff durch"
#: intervention/forms/forms.py:159
msgid "Intervention handler detail"
msgstr "Detailangabe zum Eingriffsverursacher"
#: intervention/forms/forms.py:173
#: intervention/forms/forms.py:155
#: intervention/templates/intervention/detail/view.html:96
#: intervention/templates/intervention/report/report.html:79
#: intervention/utils/quality.py:73
msgid "Registration date"
msgstr "Datum Zulassung bzw. Satzungsbeschluss"
#: intervention/forms/forms.py:185
#: intervention/forms/forms.py:167
#: intervention/templates/intervention/detail/view.html:100
#: intervention/templates/intervention/report/report.html:83
msgid "Binding on"
msgstr "Datum Bestandskraft"
#: intervention/forms/forms.py:211 intervention/views.py:94
#: intervention/forms/forms.py:193 intervention/views.py:94
msgid "New intervention"
msgstr "Neuer Eingriff"
#: intervention/forms/forms.py:294
#: intervention/forms/forms.py:271
msgid "Edit intervention"
msgstr "Eingriff bearbeiten"
@ -1502,11 +1491,6 @@ msgstr "Widerspruch"
msgid "Remove revocation"
msgstr "Widerspruch entfernen"
#: intervention/templates/intervention/detail/view.html:64
#: intervention/utils/quality.py:52
msgid "Intervention handler"
msgstr "Eingriffsverursacher"
#: intervention/templates/intervention/detail/view.html:103
msgid "Exists"
msgstr "vorhanden"
@ -1755,9 +1739,7 @@ msgstr ""
#: konova/templates/konova/includes/parcel_table.html:5
msgid "Parcels can not be calculated, since no geometry is given."
msgstr ""
"Flurstücke können nicht berechnet werden, da keine Geometrie eingegeben "
"wurde."
msgstr "Flurstücke können nicht berechnet werden, da keine Geometrie eingegeben wurde."
#: konova/templates/konova/includes/parcel_table.html:11
msgid "Kreis"
@ -1767,11 +1749,11 @@ msgstr "Kreis"
msgid "Gemarkung"
msgstr "Gemarkung"
#: konova/templates/konova/includes/parcels.html:7
#: konova/templates/konova/includes/parcels.html:3
msgid "Spatial reference"
msgstr "Raumreferenz"
#: konova/templates/konova/includes/parcels.html:11
#: konova/templates/konova/includes/parcels.html:6
msgid "Loading..."
msgstr "Lade..."
@ -1839,31 +1821,22 @@ msgid "Request for new API token"
msgstr "Anfrage für neuen API Token"
#: konova/utils/message_templates.py:10
msgid "no further details"
msgstr "keine weitere Angabe"
#: konova/utils/message_templates.py:11
#: venv/lib/python3.7/site-packages/django/forms/widgets.py:709
msgid "Unknown"
msgstr "Unbekannt"
#: konova/utils/message_templates.py:12
msgid "Ungrouped"
msgstr "Ohne Zuordnung"
#: konova/utils/message_templates.py:13
#: konova/utils/message_templates.py:11
msgid "There was an error on this form."
msgstr "Es gab einen Fehler im Formular."
#: konova/utils/message_templates.py:14
#: konova/utils/message_templates.py:12
msgid "Invalid parameters"
msgstr "Parameter ungültig"
#: konova/utils/message_templates.py:15
#: konova/utils/message_templates.py:13
msgid "There are errors in this intervention."
msgstr "Es liegen Fehler in diesem Eingriff vor:"
#: konova/utils/message_templates.py:16
#: konova/utils/message_templates.py:14
msgid ""
"The identifier '{}' had to be changed to '{}' since another entry has been "
"added in the meanwhile, which uses this identifier"
@ -1871,26 +1844,26 @@ msgstr ""
"Die Kennung '{}' musste zu '{}' geändert werden, da ein anderer Eintrag in "
"der Zwischenzeit angelegt wurde, welcher diese Kennung nun bereits verwendet"
#: konova/utils/message_templates.py:17
#: konova/utils/message_templates.py:15
msgid ""
"Only conservation or registration office users are allowed to remove entries."
msgstr ""
"Nur Mitarbeiter der Naturschutz- oder Zulassungsbehördengruppe dürfen "
"Einträge entfernen"
#: konova/utils/message_templates.py:18
#: konova/utils/message_templates.py:16
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/utils/message_templates.py:19
#: konova/utils/message_templates.py:17
msgid "Status of Checked and Recorded reseted"
msgstr "'Geprüft'/'Verzeichnet' wurde zurückgesetzt"
#: konova/utils/message_templates.py:22
#: konova/utils/message_templates.py:20
msgid "This data is not shared with you"
msgstr "Diese Daten sind für Sie nicht freigegeben"
#: konova/utils/message_templates.py:23
#: konova/utils/message_templates.py:21
msgid ""
"Remember: This data has not been shared with you, yet. This means you can "
"only read but can not edit or perform any actions like running a check or "
@ -1900,15 +1873,15 @@ msgstr ""
"bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, "
"noch Prüfungen durchführen oder verzeichnen können."
#: konova/utils/message_templates.py:26
#: konova/utils/message_templates.py:24
msgid "Unsupported file type"
msgstr "Dateiformat nicht unterstützt"
#: konova/utils/message_templates.py:27
#: konova/utils/message_templates.py:25
msgid "File too large"
msgstr "Datei zu groß"
#: konova/utils/message_templates.py:30
#: konova/utils/message_templates.py:28
msgid ""
"Action canceled. Eco account is recorded or deductions exist. Only "
"conservation office member can perform this action."
@ -1916,119 +1889,119 @@ msgstr ""
"Aktion abgebrochen. Ökokonto ist bereits verzeichnet oder Abbuchungen liegen "
"vor. Nur Eintragungsstellennutzer können diese Aktion jetzt durchführen."
#: konova/utils/message_templates.py:33
#: konova/utils/message_templates.py:31
msgid "Compensation {} added"
msgstr "Kompensation {} hinzugefügt"
#: konova/utils/message_templates.py:34
#: konova/utils/message_templates.py:32
msgid "Compensation {} removed"
msgstr "Kompensation {} entfernt"
#: konova/utils/message_templates.py:36
#: konova/utils/message_templates.py:34
msgid "Added compensation action"
msgstr "Maßnahme hinzugefügt"
#: konova/utils/message_templates.py:37
#: konova/utils/message_templates.py:35
msgid "Added compensation state"
msgstr "Zustand hinzugefügt"
#: konova/utils/message_templates.py:40
#: konova/utils/message_templates.py:38
msgid "State removed"
msgstr "Zustand gelöscht"
#: konova/utils/message_templates.py:41
#: konova/utils/message_templates.py:39
msgid "State edited"
msgstr "Zustand bearbeitet"
#: konova/utils/message_templates.py:42
#: konova/utils/message_templates.py:40
msgid "State added"
msgstr "Zustand hinzugefügt"
#: konova/utils/message_templates.py:45
#: konova/utils/message_templates.py:43
msgid "Action added"
msgstr "Maßnahme hinzugefügt"
#: konova/utils/message_templates.py:46
#: konova/utils/message_templates.py:44
msgid "Action edited"
msgstr "Maßnahme bearbeitet"
#: konova/utils/message_templates.py:47
#: konova/utils/message_templates.py:45
msgid "Action removed"
msgstr "Maßnahme entfernt"
#: konova/utils/message_templates.py:50
#: konova/utils/message_templates.py:48
msgid "Deduction added"
msgstr "Abbuchung hinzugefügt"
#: konova/utils/message_templates.py:51
#: konova/utils/message_templates.py:49
msgid "Deduction edited"
msgstr "Abbuchung bearbeitet"
#: konova/utils/message_templates.py:52
#: konova/utils/message_templates.py:50
msgid "Deduction removed"
msgstr "Abbuchung entfernt"
#: konova/utils/message_templates.py:55
#: konova/utils/message_templates.py:53
msgid "Deadline added"
msgstr "Frist/Termin hinzugefügt"
#: konova/utils/message_templates.py:56
#: konova/utils/message_templates.py:54
msgid "Deadline edited"
msgstr "Frist/Termin bearbeitet"
#: konova/utils/message_templates.py:57
#: konova/utils/message_templates.py:55
msgid "Deadline removed"
msgstr "Frist/Termin gelöscht"
#: konova/utils/message_templates.py:60
#: konova/utils/message_templates.py:58
msgid "Payment added"
msgstr "Zahlung hinzugefügt"
#: konova/utils/message_templates.py:61
#: konova/utils/message_templates.py:59
msgid "Payment edited"
msgstr "Zahlung bearbeitet"
#: konova/utils/message_templates.py:62
#: konova/utils/message_templates.py:60
msgid "Payment removed"
msgstr "Zahlung gelöscht"
#: konova/utils/message_templates.py:65
#: konova/utils/message_templates.py:63
msgid "Revocation added"
msgstr "Widerspruch hinzugefügt"
#: konova/utils/message_templates.py:66
#: konova/utils/message_templates.py:64
msgid "Revocation edited"
msgstr "Widerspruch bearbeitet"
#: konova/utils/message_templates.py:67
#: konova/utils/message_templates.py:65
msgid "Revocation removed"
msgstr "Widerspruch entfernt"
#: konova/utils/message_templates.py:70
#: konova/utils/message_templates.py:68
msgid "Document '{}' deleted"
msgstr "Dokument '{}' gelöscht"
#: konova/utils/message_templates.py:71
#: konova/utils/message_templates.py:69
msgid "Document added"
msgstr "Dokument hinzugefügt"
#: konova/utils/message_templates.py:72
#: konova/utils/message_templates.py:70
msgid "Document edited"
msgstr "Dokument bearbeitet"
#: konova/utils/message_templates.py:75
#: konova/utils/message_templates.py:73
msgid "Edited general data"
msgstr "Allgemeine Daten bearbeitet"
#: konova/utils/message_templates.py:76
#: konova/utils/message_templates.py:74
msgid "Added deadline"
msgstr "Frist/Termin hinzugefügt"
#: konova/utils/message_templates.py:79
#: konova/utils/message_templates.py:77
msgid "Geometry conflict detected with {}"
msgstr "Geometriekonflikt mit folgenden Einträgen erkannt: {}"
#: konova/utils/message_templates.py:82
#: konova/utils/message_templates.py:80
msgid "This intervention has {} revocations"
msgstr "Dem Eingriff liegen {} Widersprüche vor"
@ -2048,7 +2021,7 @@ msgstr "{} wurde erfolgreich vom Nutzer {} geprüft! {}"
msgid "missing"
msgstr "fehlt"
#: konova/views.py:96 templates/navbars/navbar.html:16
#: konova/views.py:99 templates/navbars/navbar.html:16
msgid "Home"
msgstr "Home"
@ -3604,6 +3577,10 @@ msgstr ""
msgid "Change"
msgstr ""
#: venv/lib/python3.7/site-packages/django/forms/widgets.py:709
msgid "Unknown"
msgstr ""
#. Translators: Please do not add spaces around commas.
#: venv/lib/python3.7/site-packages/django/template/defaultfilters.py:790
msgid "yes,no,maybe"
@ -4188,6 +4165,3 @@ msgstr ""
#, python-format
msgid "Unable to connect to qpid with SASL mechanism %s"
msgstr ""
#~ msgid "Who handles the eco-account"
#~ msgstr "Wer für die Herrichtung des Ökokontos verantwortlich ist"