From f666c3afa31be61e96b8ba07edfc72b9af6aa13d Mon Sep 17 00:00:00 2001 From: mipel Date: Wed, 4 Aug 2021 10:44:02 +0200 Subject: [PATCH] Compensation action * adds compensation action to compensation detail view * adds adding/removing logic for compensation action * adds bootstrap style to select fields in forms * refactors UnitEnum into UnitChoices using models.TextChoices (Django 3.x) * adds translations --- compensation/forms.py | 72 +++++++- compensation/models.py | 30 +++- .../compensation/detail/includes/actions.html | 61 +++++++ compensation/urls.py | 4 + compensation/views.py | 51 +++++- konova/enums.py | 20 --- locale/de/LC_MESSAGES/django.mo | Bin 13328 -> 14105 bytes locale/de/LC_MESSAGES/django.po | 165 +++++++++++++----- 8 files changed, 333 insertions(+), 70 deletions(-) diff --git a/compensation/forms.py b/compensation/forms.py index ea446d10..c20be69d 100644 --- a/compensation/forms.py +++ b/compensation/forms.py @@ -12,7 +12,7 @@ from django.http import HttpRequest from django.shortcuts import redirect, render from django.utils.translation import gettext_lazy as _ -from compensation.models import Payment, CompensationState +from compensation.models import Payment, CompensationState, CompensationAction, UnitChoices from konova.contexts import BaseContext from konova.forms import BaseForm, BaseModalForm from konova.models import Deadline, DeadlineType @@ -156,7 +156,12 @@ class NewDeadlineModalForm(BaseModalForm): label_suffix="", required=True, help_text=_("Select the deadline type"), - choices=DeadlineType.choices + choices=DeadlineType.choices, + widget=forms.Select( + attrs={ + "class": "custom-select" + } + ) ) date = forms.DateField( label=_("Date"), @@ -193,7 +198,7 @@ class NewDeadlineModalForm(BaseModalForm): with transaction.atomic(): action = UserActionLogEntry.objects.create( user=self.user, - action=UserAction.CREATED.value + action=UserAction.CREATED ) deadline = Deadline.objects.create( type=self.cleaned_data["type"], @@ -204,3 +209,64 @@ class NewDeadlineModalForm(BaseModalForm): self.instance.deadlines.add(deadline) return deadline + +class NewActionModalForm(BaseModalForm): + action_type = forms.CharField( + label=_("Action Type"), + label_suffix="", + required=True, + help_text=_("Select the deadline type"), + ) + unit = forms.ChoiceField( + label=_("Unit"), + label_suffix="", + required=True, + help_text=_("Select the unit"), + choices=UnitChoices.choices, + widget=forms.Select( + attrs={ + "class": "custom-select" + } + ) + ) + amount = forms.DecimalField( + label=_("Amount"), + label_suffix="", + required=True, + help_text=_("Insert the amount"), + decimal_places=2, + min_value=0.00, + ) + comment = forms.CharField( + required=False, + label=_("Comment"), + label_suffix=_(""), + help_text=_("Additional comment"), + widget=forms.Textarea( + attrs={ + "cols": 30, + "rows": 5, + } + ) + ) + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.form_title = _("New action") + self.form_caption = _("Insert data for the new action") + + def save(self): + with transaction.atomic(): + user_action = UserActionLogEntry.objects.create( + user=self.user, + action=UserAction.CREATED + ) + comp_action = CompensationAction.objects.create( + action_type=self.cleaned_data["action_type"], + amount=self.cleaned_data["amount"], + unit=self.cleaned_data["unit"], + created=user_action, + ) + self.instance.actions.add(comp_action) + return comp_action + diff --git a/compensation/models.py b/compensation/models.py index 4d54af41..106505f3 100644 --- a/compensation/models.py +++ b/compensation/models.py @@ -11,6 +11,7 @@ from django.core.validators import MinValueValidator, MaxValueValidator from django.db import transaction from django.utils import timezone from django.utils.timezone import now +from django.utils.translation import gettext_lazy as _ from compensation.settings import COMPENSATION_IDENTIFIER_LENGTH, COMPENSATION_IDENTIFIER_TEMPLATE from intervention.models import Intervention, ResponsibilityData @@ -63,18 +64,45 @@ class CompensationState(UuidModel): return "{} | {} m²".format(self.biotope_type, self.surface) +class UnitChoices(models.TextChoices): + """ + Predefines units for selection + """ + cm = "cm", _("cm") + m = "m", _("m") + km = "km", _("km") + qm = "qm", _("m²") + ha = "ha", _("ha") + st = "pcs", _("Pieces") # pieces + + class CompensationAction(BaseResource): """ Compensations include actions like planting trees, refreshing rivers and so on. """ action_type = models.CharField(max_length=500, null=True, blank=True) amount = models.FloatField() - unit = models.CharField(max_length=100, null=True, blank=True) + unit = models.CharField(max_length=100, null=True, blank=True, choices=UnitChoices.choices) control = models.ForeignKey(CompensationControl, on_delete=models.SET_NULL, null=True, blank=True) def __str__(self): return "{} | {} {}".format(self.action_type, self.amount, self.unit) + @property + def unit_humanize(self): + """ Returns humanized version of enum + + Used for template rendering + + Returns: + + """ + choices = UnitChoices.choices + for choice in choices: + if choice[0] == self.unit: + return choice[1] + return None + class AbstractCompensation(BaseObject): """ diff --git a/compensation/templates/compensation/detail/includes/actions.html b/compensation/templates/compensation/detail/includes/actions.html index e69de29b..f2d8fe46 100644 --- a/compensation/templates/compensation/detail/includes/actions.html +++ b/compensation/templates/compensation/detail/includes/actions.html @@ -0,0 +1,61 @@ +{% load i18n l10n fontawesome_5 %} + \ No newline at end of file diff --git a/compensation/urls.py b/compensation/urls.py index cbbd8ad2..be40c0a3 100644 --- a/compensation/urls.py +++ b/compensation/urls.py @@ -18,6 +18,7 @@ urlpatterns = [ path('/edit', edit_view, name='edit'), path('/remove', remove_view, name='remove'), path('/state/new', state_new_view, name='new-state'), + path('/action/new', action_new_view, name='new-action'), path('/deadline/new', deadline_new_view, name="new-deadline"), # Documents @@ -41,4 +42,7 @@ urlpatterns = [ # Generic state routes path('state//remove', state_remove_view, name='state-remove'), + + # Generic action routes + path('action//remove', action_remove_view, name='action-remove'), ] \ No newline at end of file diff --git a/compensation/views.py b/compensation/views.py index 563c1f75..0927cf3b 100644 --- a/compensation/views.py +++ b/compensation/views.py @@ -5,8 +5,8 @@ from django.http import HttpRequest, Http404 from django.shortcuts import render, get_object_or_404 from django.utils.translation import gettext_lazy as _ -from compensation.forms import NewPaymentForm, NewStateModalForm, NewDeadlineModalForm -from compensation.models import Compensation, EcoAccount, Payment, CompensationState +from compensation.forms import NewPaymentForm, NewStateModalForm, NewDeadlineModalForm, NewActionModalForm +from compensation.models import Compensation, EcoAccount, Payment, CompensationState, CompensationAction from compensation.tables import CompensationTable, EcoAccountTable from intervention.models import Intervention from konova.contexts import BaseContext @@ -300,6 +300,25 @@ def state_new_view(request: HttpRequest, id: str): ) +@login_required +def action_new_view(request: HttpRequest, id: str): + """ Renders a form for adding new actions for a compensation + + Args: + request (HttpRequest): The incoming request + id (str): The compensation's id to which the new state will be related + + Returns: + + """ + comp = get_object_or_404(Compensation, id=id) + form = NewActionModalForm(request.POST or None, instance=comp, user=request.user) + return form.process_request( + request, + msg_success=_("Action added") + ) + + @login_required def deadline_new_view(request: HttpRequest, id: str): """ Renders a form for adding new states for a compensation @@ -321,9 +340,37 @@ def deadline_new_view(request: HttpRequest, id: str): @login_required def state_remove_view(request: HttpRequest, id: str): + """ Renders a form for removing a compensation state + + Args: + request (HttpRequest): The incoming request + id (str): The state's id + + Returns: + + """ state = get_object_or_404(CompensationState, id=id) form = RemoveModalForm(request.POST or None, instance=state, user=request.user) return form.process_request( request, msg_success=_("State removed") ) + + +@login_required +def action_remove_view(request: HttpRequest, id: str): + """ Renders a form for removing a compensation action + + Args: + request (HttpRequest): The incoming request + id (str): The action's id + + Returns: + + """ + action = get_object_or_404(CompensationAction, id=id) + form = RemoveModalForm(request.POST or None, instance=action, user=request.user) + return form.process_request( + request, + msg_success=_("Action removed") + ) diff --git a/konova/enums.py b/konova/enums.py index 70938b11..9e097910 100644 --- a/konova/enums.py +++ b/konova/enums.py @@ -18,23 +18,3 @@ class BaseEnum(Enum): empty_choice = [] if drop_empty_choice else [(None, "---")] choices = empty_choice + [(enum.value, enum.name) for enum in cls] return choices - - -class UnitEnum(BaseEnum): - """ - Predefines units for selection - """ - mm = "mm" - dm = "dm" - cm = "cm" - m = "m" - km = "km" - - qmm = "qmm" - qdm = "qdm" - qcm = "qcm" - qm = "qm" - qkm = "qkm" - ha = "ha" - - st = "St." # pieces diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 5a3a96b2b155ecc82e8ee2a9bca6459aa09b3add..82dda8d606685f200db2a0e1f817f68164c89980 100644 GIT binary patch delta 5267 zcmYk;3w({|0mt#@L@sWTh`X2`x5Xuq610q_qHZNcl-9iwM{-JzG>&V_Sy5Z7;&Ld8 zQnay-GAE;5Q5C6<&Q>i&DOL(bJPBB&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Wo8*w2iGD}+kqXk6 zsIcDVO){H|Bp0duyQ#cER4yeG$sV$jXuVa2kSED3vW)y&I#Ov#YDg-nB>jj=AD8gw z4SZ%0_Hg)Zsm42q9lyKYTRGfDdg(l6sLOw!&roBj%^319xrO|{l-h$Xcrn>b=8;E; z%BwE!l-s%qmiXeG=^Q;}&kV+mWIO3k*sbC1`!b$Ot|CEl4Y`%5+(zCG*Z5ZoN87qy zlT0#*j3*3vVo{fBNIq_GKIWI z29T~q&nr;oAP*r|~C-if{aZl)2VUhPA)=#~a diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 23e45ebf..67ac0199 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -4,17 +4,17 @@ # FIRST AUTHOR , YEAR. # #: compensation/forms.py:34 compensation/forms.py:39 compensation/forms.py:52 -#: compensation/forms.py:177 intervention/filters.py:26 -#: intervention/filters.py:40 intervention/filters.py:47 -#: intervention/filters.py:48 konova/forms.py:84 konova/forms.py:213 -#: konova/forms.py:244 konova/forms.py:249 konova/forms.py:261 -#: konova/forms.py:272 konova/forms.py:285 user/forms.py:38 +#: compensation/forms.py:182 compensation/forms.py:241 +#: intervention/filters.py:26 intervention/filters.py:40 +#: intervention/filters.py:47 intervention/filters.py:48 konova/forms.py:91 +#: konova/forms.py:220 konova/forms.py:251 konova/forms.py:256 +#: konova/forms.py:268 konova/forms.py:279 konova/forms.py:292 user/forms.py:38 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-03 17:21+0200\n" +"POT-Creation-Date: 2021-08-04 10:37+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,7 +24,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: compensation/forms.py:33 +#: compensation/forms.py:33 compensation/forms.py:233 #: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:33 msgid "Amount" msgstr "Menge" @@ -84,7 +84,7 @@ msgstr "Neuer Zustand" msgid "Insert data for the new state" msgstr "Geben Sie die Daten des neuen Zustandes ein" -#: compensation/forms.py:113 konova/forms.py:134 +#: compensation/forms.py:113 konova/forms.py:141 msgid "Object removed" msgstr "Objekt entfernt" @@ -92,39 +92,88 @@ msgstr "Objekt entfernt" msgid "Deadline Type" msgstr "Fristart" -#: compensation/forms.py:158 +#: compensation/forms.py:158 compensation/forms.py:218 msgid "Select the deadline type" msgstr "Fristart wählen" -#: compensation/forms.py:162 +#: compensation/forms.py:167 #: compensation/templates/compensation/detail/includes/deadlines.html:31 msgid "Date" msgstr "Datum" -#: compensation/forms.py:165 +#: compensation/forms.py:170 msgid "Select date" msgstr "Datum wählen" -#: compensation/forms.py:176 +#: compensation/forms.py:181 compensation/forms.py:240 #: compensation/templates/compensation/detail/includes/deadlines.html:34 #: compensation/templates/compensation/detail/includes/documents.html:31 #: intervention/templates/intervention/detail/includes/documents.html:31 -#: konova/forms.py:271 +#: konova/forms.py:278 msgid "Comment" msgstr "Kommentar" -#: compensation/forms.py:178 +#: compensation/forms.py:183 compensation/forms.py:242 msgid "Additional comment" msgstr "Zusätzlicher Kommentar" -#: compensation/forms.py:189 +#: compensation/forms.py:194 msgid "New deadline" msgstr "Neue Frist" -#: compensation/forms.py:190 +#: compensation/forms.py:195 msgid "Insert data for the new deadline" msgstr "Geben Sie die Daten der neuen Frist ein" +#: compensation/forms.py:215 +msgid "Action Type" +msgstr "Maßnahmentyp" + +#: compensation/forms.py:221 +#: compensation/templates/compensation/detail/includes/actions.html:34 +msgid "Unit" +msgstr "Einheit" + +#: compensation/forms.py:224 +msgid "Select the unit" +msgstr "Einheit wählen" + +#: compensation/forms.py:236 +msgid "Insert the amount" +msgstr "Menge eingeben" + +#: compensation/forms.py:253 +msgid "New action" +msgstr "Neue Maßnahme" + +#: compensation/forms.py:254 +msgid "Insert data for the new action" +msgstr "Geben Sie die Daten der neuen Maßnahme ein" + +#: compensation/models.py:71 +msgid "cm" +msgstr "" + +#: compensation/models.py:72 +msgid "m" +msgstr "" + +#: compensation/models.py:73 +msgid "km" +msgstr "" + +#: compensation/models.py:74 +msgid "m²" +msgstr "" + +#: compensation/models.py:75 +msgid "ha" +msgstr "" + +#: compensation/models.py:76 +msgid "Pieces" +msgstr "Stück" + #: compensation/tables.py:24 compensation/tables.py:164 #: intervention/forms.py:28 intervention/tables.py:23 #: intervention/templates/intervention/detail/includes/compensations.html:30 @@ -137,7 +186,7 @@ msgstr "Kennung" #: intervention/forms.py:35 intervention/tables.py:28 #: intervention/templates/intervention/detail/includes/compensations.html:33 #: intervention/templates/intervention/detail/includes/documents.html:28 -#: intervention/templates/intervention/detail/view.html:64 konova/forms.py:243 +#: intervention/templates/intervention/detail/view.html:64 konova/forms.py:250 msgid "Title" msgstr "Bezeichnung" @@ -206,7 +255,7 @@ msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden" msgid "Access not granted" msgstr "Nicht freigegeben - Datensatz nur lesbar" -#: compensation/tables.py:174 konova/forms.py:248 +#: compensation/tables.py:174 konova/forms.py:255 msgid "Created on" msgstr "Erstellt" @@ -226,6 +275,40 @@ msgstr "Bearbeite {}" msgid "Delete {}" msgstr "Lösche {}" +#: compensation/templates/compensation/detail/includes/actions.html:8 +msgctxt "Compensation" +msgid "Actions" +msgstr "Maßnahmen" + +#: compensation/templates/compensation/detail/includes/actions.html:14 +msgid "Add new action" +msgstr "Neue Maßnahme hinzufügen" + +#: compensation/templates/compensation/detail/includes/actions.html:28 +msgid "Action type" +msgstr "Maßnahmentyp" + +#: compensation/templates/compensation/detail/includes/actions.html:31 +msgctxt "Compensation" +msgid "Amount" +msgstr "Menge" + +#: compensation/templates/compensation/detail/includes/actions.html:37 +#: compensation/templates/compensation/detail/includes/deadlines.html:37 +#: compensation/templates/compensation/detail/includes/documents.html:34 +#: compensation/templates/compensation/detail/includes/states-after.html:39 +#: compensation/templates/compensation/detail/includes/states-before.html:39 +#: intervention/templates/intervention/detail/includes/compensations.html:36 +#: intervention/templates/intervention/detail/includes/documents.html:34 +#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:36 +#: intervention/templates/intervention/detail/includes/payments.html:37 +msgid "Action" +msgstr "Aktionen" + +#: compensation/templates/compensation/detail/includes/actions.html:51 +msgid "Remove action" +msgstr "Maßnahme entfernen" + #: compensation/templates/compensation/detail/includes/deadlines.html:8 msgid "Deadlines" msgstr "Termine und Fristen" @@ -239,17 +322,6 @@ msgstr "Neue Frist hinzufügen" msgid "Type" msgstr "Typ" -#: compensation/templates/compensation/detail/includes/deadlines.html:37 -#: compensation/templates/compensation/detail/includes/documents.html:34 -#: compensation/templates/compensation/detail/includes/states-after.html:39 -#: compensation/templates/compensation/detail/includes/states-before.html:39 -#: intervention/templates/intervention/detail/includes/compensations.html:36 -#: intervention/templates/intervention/detail/includes/documents.html:34 -#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:36 -#: intervention/templates/intervention/detail/includes/payments.html:37 -msgid "Action" -msgstr "Aktionen" - #: compensation/templates/compensation/detail/includes/deadlines.html:51 msgid "Remove deadline" msgstr "Frist löschen" @@ -261,7 +333,7 @@ msgstr "Dokumente" #: compensation/templates/compensation/detail/includes/documents.html:14 #: intervention/templates/intervention/detail/includes/documents.html:14 -#: konova/forms.py:284 +#: konova/forms.py:291 msgid "Add new document" msgstr "Neues Dokument hinzufügen" @@ -384,13 +456,21 @@ msgid "State added" msgstr "Zustand hinzugefügt" #: compensation/views.py:318 +msgid "Action added" +msgstr "Maßnahme hinzugefügt" + +#: compensation/views.py:337 msgid "Deadline added" msgstr "Frist hinzugefügt" -#: compensation/views.py:328 +#: compensation/views.py:356 msgid "State removed" msgstr "Zustand gelöscht" +#: compensation/views.py:375 +msgid "Action removed" +msgstr "Maßnahme entfernt" + #: intervention/filters.py:25 msgid "Show unshared" msgstr "Nicht freigegebene anzeigen" @@ -648,40 +728,40 @@ msgstr "" msgid "You need to be part of another user group." msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" -#: konova/forms.py:57 +#: konova/forms.py:64 msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms.py:83 konova/forms.py:212 +#: konova/forms.py:90 konova/forms.py:219 msgid "Confirm" msgstr "Bestätige" -#: konova/forms.py:95 konova/forms.py:221 +#: konova/forms.py:102 konova/forms.py:228 msgid "Remove" msgstr "Löschen" -#: konova/forms.py:97 +#: konova/forms.py:104 msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" -#: konova/forms.py:222 +#: konova/forms.py:229 msgid "Are you sure?" msgstr "Sind Sie sicher?" -#: konova/forms.py:250 +#: konova/forms.py:257 msgid "When has this file been created? Important for photos." msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" -#: konova/forms.py:260 +#: konova/forms.py:267 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231 msgid "File" msgstr "Datei" -#: konova/forms.py:262 +#: konova/forms.py:269 msgid "Must be smaller than 15 Mb" msgstr "Muss kleiner als 15 Mb sein" -#: konova/forms.py:273 +#: konova/forms.py:280 msgid "Additional comment on this file" msgstr "Zusätzlicher Kommentar" @@ -897,7 +977,7 @@ msgstr "Abbrechen" msgid "Save" msgstr "Speichern" -#: templates/table/generic_table_form_body.html:20 +#: templates/table/generic_table_form_body.html:21 msgid "Fields with * are required." msgstr "* sind Pflichtfelder." @@ -2247,9 +2327,6 @@ msgstr "" #~ msgid "Withdraw from eco-account" #~ msgstr "Von Konto abbuchen" -#~ msgid "Show actions" -#~ msgstr "Zeige Maßnahmen" - #~ msgid "You are currently working as " #~ msgstr "Sie arbeiten gerade als "