2022-08-19 08:27:42 +02:00
|
|
|
"""
|
|
|
|
Author: Michel Peltriaux
|
|
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
|
|
Contact: ksp-servicestelle@sgdnord.rlp.de
|
|
|
|
Created on: 19.08.22
|
|
|
|
|
|
|
|
"""
|
|
|
|
from django.contrib.auth.decorators import login_required
|
2022-08-22 08:07:35 +02:00
|
|
|
from django.utils.decorators import method_decorator
|
2022-08-19 08:27:42 +02:00
|
|
|
|
|
|
|
from compensation.models import EcoAccount
|
2022-08-25 11:34:09 +02:00
|
|
|
from konova.decorators import shared_access_required, default_group_required, login_required_modal
|
2022-08-22 08:07:35 +02:00
|
|
|
from konova.views.deadline import AbstractNewDeadlineView, AbstractEditDeadlineView, AbstractRemoveDeadlineView
|
2022-08-19 08:27:42 +02:00
|
|
|
|
|
|
|
|
2022-08-22 08:07:35 +02:00
|
|
|
class NewEcoAccountDeadlineView(AbstractNewDeadlineView):
|
|
|
|
model = EcoAccount
|
|
|
|
redirect_url = "compensation:acc:detail"
|
2022-08-19 08:27:42 +02:00
|
|
|
|
2022-08-25 11:34:09 +02:00
|
|
|
@method_decorator(login_required_modal)
|
2022-08-22 08:07:35 +02:00
|
|
|
@method_decorator(login_required)
|
|
|
|
@method_decorator(default_group_required)
|
|
|
|
@method_decorator(shared_access_required(EcoAccount, "id"))
|
|
|
|
def dispatch(self, request, *args, **kwargs):
|
|
|
|
return super().dispatch(request, *args, **kwargs)
|
2022-08-19 08:27:42 +02:00
|
|
|
|
|
|
|
|
2022-08-22 08:07:35 +02:00
|
|
|
class EditEcoAccountDeadlineView(AbstractEditDeadlineView):
|
|
|
|
model = EcoAccount
|
|
|
|
redirect_url = "compensation:acc:detail"
|
2022-08-19 08:27:42 +02:00
|
|
|
|
2022-08-25 11:34:09 +02:00
|
|
|
@method_decorator(login_required_modal)
|
2022-08-22 08:07:35 +02:00
|
|
|
@method_decorator(login_required)
|
|
|
|
@method_decorator(default_group_required)
|
|
|
|
@method_decorator(shared_access_required(EcoAccount, "id"))
|
|
|
|
def dispatch(self, request, *args, **kwargs):
|
|
|
|
return super().dispatch(request, *args, **kwargs)
|
2022-08-19 08:27:42 +02:00
|
|
|
|
|
|
|
|
2022-08-22 08:07:35 +02:00
|
|
|
class RemoveEcoAccountDeadlineView(AbstractRemoveDeadlineView):
|
|
|
|
model = EcoAccount
|
|
|
|
redirect_url = "compensation:acc:detail"
|
2022-08-19 08:27:42 +02:00
|
|
|
|
2022-08-25 11:34:09 +02:00
|
|
|
@method_decorator(login_required_modal)
|
2022-08-22 08:07:35 +02:00
|
|
|
@method_decorator(login_required)
|
|
|
|
@method_decorator(default_group_required)
|
|
|
|
@method_decorator(shared_access_required(EcoAccount, "id"))
|
|
|
|
def dispatch(self, request, *args, **kwargs):
|
|
|
|
return super().dispatch(request, *args, **kwargs)
|