86_User_suggestions_and_feedback #106
@ -533,7 +533,8 @@ def new_deduction_view(request: HttpRequest, id: str):
|
|||||||
form = NewDeductionModalForm(request.POST or None, instance=acc, request=request)
|
form = NewDeductionModalForm(request.POST or None, instance=acc, request=request)
|
||||||
return form.process_request(
|
return form.process_request(
|
||||||
request,
|
request,
|
||||||
msg_success=_("Deduction added")
|
msg_success=_("Deduction added"),
|
||||||
|
redirect_url=reverse("compensation:detail", args=(id,)) + "#related_data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ Contact: michel.peltriaux@sgdnord.rlp.de
|
|||||||
Created on: 09.08.21
|
Created on: 09.08.21
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
@ -33,7 +34,8 @@ def new_payment_view(request: HttpRequest, intervention_id: str):
|
|||||||
form = NewPaymentForm(request.POST or None, instance=intervention, request=request)
|
form = NewPaymentForm(request.POST or None, instance=intervention, request=request)
|
||||||
return form.process_request(
|
return form.process_request(
|
||||||
request,
|
request,
|
||||||
msg_success=_("Payment added")
|
msg_success=_("Payment added"),
|
||||||
|
redirect_url=reverse("intervention:detail", args=(intervention_id,)) + "#related_data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -54,5 +56,6 @@ def payment_remove_view(request: HttpRequest, id: str):
|
|||||||
return form.process_request(
|
return form.process_request(
|
||||||
request=request,
|
request=request,
|
||||||
msg_success=_("Payment removed"),
|
msg_success=_("Payment removed"),
|
||||||
|
redirect_url=reverse("intervention:detail", args=(payment.intervention_id,)) + "#related_data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -26,6 +26,10 @@ class Revocation(BaseResource):
|
|||||||
self.document.delete(*args, **kwargs)
|
self.document.delete(*args, **kwargs)
|
||||||
super().delete()
|
super().delete()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def intervention(self):
|
||||||
|
return self.legal.intervention
|
||||||
|
|
||||||
|
|
||||||
class RevocationDocument(AbstractDocument):
|
class RevocationDocument(AbstractDocument):
|
||||||
"""
|
"""
|
||||||
|
@ -136,27 +136,29 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="row">
|
<div id="related_data">
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
<div class="row">
|
||||||
{% include 'intervention/detail/includes/compensations.html' %}
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
|
{% include 'intervention/detail/includes/compensations.html' %}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
|
{% include 'intervention/detail/includes/payments.html' %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
<div class="row">
|
||||||
{% include 'intervention/detail/includes/payments.html' %}
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
|
{% include 'intervention/detail/includes/deductions.html' %}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
|
{% include 'intervention/detail/includes/revocation.html' %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
{% include 'intervention/detail/includes/documents.html' %}
|
||||||
{% include 'intervention/detail/includes/deductions.html' %}
|
</div>
|
||||||
</div>
|
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
</div>
|
||||||
{% include 'intervention/detail/includes/revocation.html' %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
|
||||||
{% include 'intervention/detail/includes/documents.html' %}
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -129,7 +129,8 @@ def new_document_view(request: HttpRequest, id: str):
|
|||||||
form = NewInterventionDocumentForm(request.POST or None, request.FILES or None, instance=intervention, request=request)
|
form = NewInterventionDocumentForm(request.POST or None, request.FILES or None, instance=intervention, request=request)
|
||||||
return form.process_request(
|
return form.process_request(
|
||||||
request,
|
request,
|
||||||
msg_success=_("Document added")
|
msg_success=_("Document added"),
|
||||||
|
redirect_url=reverse("intervention:detail", args=(id,)) + "#related_data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -348,10 +349,12 @@ def remove_revocation_view(request: HttpRequest, id: str):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
obj = Revocation.objects.get(id=id)
|
obj = Revocation.objects.get(id=id)
|
||||||
|
|
||||||
form = RemoveModalForm(request.POST or None, instance=obj, request=request)
|
form = RemoveModalForm(request.POST or None, instance=obj, request=request)
|
||||||
return form.process_request(
|
return form.process_request(
|
||||||
request,
|
request,
|
||||||
_("Revocation removed"),
|
_("Revocation removed"),
|
||||||
|
redirect_url=reverse("intervention:detail", args=(obj.intervention.id,)) + "#related_data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -455,7 +458,8 @@ def new_revocation_view(request: HttpRequest, id: str):
|
|||||||
form = NewRevocationModalForm(request.POST or None, request.FILES or None, instance=intervention, request=request)
|
form = NewRevocationModalForm(request.POST or None, request.FILES or None, instance=intervention, request=request)
|
||||||
return form.process_request(
|
return form.process_request(
|
||||||
request,
|
request,
|
||||||
msg_success=_("Revocation added")
|
msg_success=_("Revocation added"),
|
||||||
|
redirect_url=reverse("intervention:detail", args=(id,)) + "#related_data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -502,7 +506,8 @@ def new_deduction_view(request: HttpRequest, id: str):
|
|||||||
form = NewDeductionModalForm(request.POST or None, instance=intervention, request=request)
|
form = NewDeductionModalForm(request.POST or None, instance=intervention, request=request)
|
||||||
return form.process_request(
|
return form.process_request(
|
||||||
request,
|
request,
|
||||||
msg_success=_("Deduction added")
|
msg_success=_("Deduction added"),
|
||||||
|
redirect_url=reverse("intervention:detail", args=(id,)) + "#related_data",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user