[EcoAccount] See recorded state of withdraw #6

* adds prefiltering of withdraws --> excludes withdraws of as deleted flagged interventions
* renders intervention-recorded icon into eco account withdraws details view
* fixes bug in case of document deleting which does not contain any files
* renames RecordForm into RecordModalForm for more clarity
This commit is contained in:
mipel
2021-08-26 15:45:24 +02:00
parent c7fd0037bd
commit 280510d729
8 changed files with 46 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ from intervention.models import Intervention, Revocation
from intervention.tables import InterventionTable
from konova.contexts import BaseContext
from konova.decorators import *
from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordForm
from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordModalForm
from konova.sub_settings.django_settings import DEFAULT_DATE_FORMAT
from konova.utils.message_templates import FORM_INVALID, INTERVENTION_INVALID
from konova.utils.user_checks import in_group
@@ -372,7 +372,7 @@ def record_view(request: HttpRequest, id: str):
"""
intervention = get_object_or_404(Intervention, id=id)
form = RecordForm(request.POST or None, instance=intervention, user=request.user)
form = RecordModalForm(request.POST or None, instance=intervention, user=request.user)
msg_succ = _("{} unrecorded") if intervention.recorded else _("{} recorded")
msg_succ = msg_succ.format(intervention.identifier)
return form.process_request(