Compensation enhancements

* compensations won't be listed in index table if related intervention has been deleted
* adds functionality for intervention remove button
* adds outcommented code
* adds configurable redirect_url for RemoveModalForm's process_request method
* adds translation
This commit is contained in:
mipel
2021-08-02 15:39:33 +02:00
parent d203046666
commit 63b2d3ef66
8 changed files with 17 additions and 34 deletions

View File

@@ -26,9 +26,9 @@ def index_view(request: HttpRequest):
A rendered view
"""
template = "generic_index.html"
user = request.user
compensations = Compensation.objects.filter(
deleted=None,
deleted=None, # only show those which are not deleted individually
intervention__deleted=None, # and don't show the ones whose intervention has been deleted
)
table = CompensationTable(
request=request,