Bereich 6 fertig
This commit is contained in:
parent
f97d904bca
commit
8486081a84
|
|
@ -90,7 +90,7 @@ class StreamingAboF(forms.ModelForm):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(StreamingAboF, self).__init__(*args, **kwargs)
|
||||
self.fields['password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort")
|
||||
self.fields['password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort", required=False)
|
||||
|
||||
# DigitalAccountsF
|
||||
class DigitalAccountsF(forms.ModelForm):
|
||||
|
|
@ -109,7 +109,25 @@ class DigitalAccountsF(forms.ModelForm):
|
|||
}
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DigitalAccountsF, self).__init__(*args, **kwargs)
|
||||
self.fields['password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort")
|
||||
self.fields['password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort", required=False)
|
||||
|
||||
|
||||
class PersonalF(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = Personal
|
||||
fields = ['name','function','inorex','mail','pnr','onr','adresse','tel']
|
||||
labels = {
|
||||
'name':"Name",
|
||||
'function':"Funktion",
|
||||
'inorex':"Intern/Extern",
|
||||
'pnr':"Personalnummer",
|
||||
'onr': "ONR-Nummer",
|
||||
'adresse':"Adresse",
|
||||
'tel':"Telefon",
|
||||
'mail':"E-Mailadresse"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Familienkontakte
|
||||
|
|
@ -142,26 +160,28 @@ class ErgoVerDirF(forms.ModelForm):
|
|||
}
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ErgoVerDirF, self).__init__(*args, **kwargs)
|
||||
self.fields['ergo_password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort")
|
||||
self.fields['ergo_password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort", required=False)
|
||||
|
||||
|
||||
class OnlineBankF(forms.ModelForm):
|
||||
class Meta:
|
||||
model = OnlineBank
|
||||
|
||||
fields = ['web_address','web_username', 'web_password', 'accountactivity', 'vollmacht_doc']
|
||||
fields = ['web_address','web_username', 'web_password', 'bic', 'iban', 'accountactivity', 'vollmacht_doc', 'area']
|
||||
|
||||
labels = {
|
||||
'web_address':"Internetadresse",
|
||||
'web_address':"Internetadresse/Bankname",
|
||||
'web_username':"Benutzername",
|
||||
'web_password':"Passwort",
|
||||
'bic' : "BIC",
|
||||
'iban' : "IBAN",
|
||||
'accountactivity':"Was soll mit dem Account geschehen?",
|
||||
'vollmacht_doc':"Vollmacht als Dokument"
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(OnlineBankF, self).__init__(*args, **kwargs)
|
||||
self.fields['web_password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort")
|
||||
self.fields['web_password'] = forms.CharField(widget=forms.PasswordInput, label="Passwort", required=False)
|
||||
self.fields['area'] = forms.CharField(initial="", required=False, widget=forms.HiddenInput())
|
||||
|
||||
|
||||
# Vertrauensperson
|
||||
|
|
@ -215,4 +235,10 @@ class DocumentForm(forms.ModelForm):
|
|||
}
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DocumentForm, self).__init__(*args, **kwargs)
|
||||
self.fields['area'] = forms.CharField(initial="", required=False, widget=forms.HiddenInput())
|
||||
self.fields['area'] = forms.CharField(initial="", required=False, widget=forms.HiddenInput())
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -125,6 +125,9 @@ class ErgoVerDir(models.Model):
|
|||
class OnlineBank(models.Model):
|
||||
agency = models.ForeignKey(Agency, on_delete=models.CASCADE, null=True)
|
||||
web_address = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
area = models.IntegerField(default=0)
|
||||
bic = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
iban = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
web_username = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
web_password = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
accountactivity = encrypt(models.CharField(max_length=5000, blank=True, default="", null=True))
|
||||
|
|
@ -153,6 +156,25 @@ class DigitalAccounts(models.Model):
|
|||
|
||||
|
||||
|
||||
PERS_CHOICE = (
|
||||
("ex", "Intern"),
|
||||
("in", "Extern"),
|
||||
)
|
||||
class Personal(models.Model):
|
||||
agency = models.ForeignKey(Agency, on_delete=models.CASCADE, null=True)
|
||||
name = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
function = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
inorex = encrypt(models.CharField(max_length=500, blank=True, default=1, choices =PERS_CHOICE, null=True))
|
||||
pnr = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
onr = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
adresse = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
tel = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
mail = encrypt(models.CharField(max_length=500, blank=True, default="", null=True))
|
||||
history = HistoricalRecords()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -61,12 +61,12 @@
|
|||
|
||||
<hr>
|
||||
<h4>Online-Banking
|
||||
<a class="btn btn-primary btn mb-3 btn-sm " href="{% url 'rd-a2-addonlinebank' %}" style="float: right;"><i class="fas fa-plus"></i> Online-Banking</a>
|
||||
<a class="btn btn-primary btn mb-3 btn-sm " href="{% url 'rd-a2-addonlinebank' 2 %}" style="float: right;"><i class="fas fa-plus"></i> Online-Banking</a>
|
||||
</h4>
|
||||
<table class="table table-hover" id="area_2_onlinebank" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Internetadresse</th>
|
||||
<th scope="col">Internetadresse/Bankname</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
|||
|
|
@ -1 +1,106 @@
|
|||
FÜNFTE
|
||||
<h4>Personal, interne und externe Partner inkl. Funktionen usw.
|
||||
<a class="btn btn-primary btn btn-sm mb-3" href="{% url 'rd-a5-addpersonal' %}" style="float: right;"><i class="fas fa-plus"></i> Online-Account</a>
|
||||
</h4>
|
||||
<table class="table table-hover" id="a5_personal" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Funktion</th>
|
||||
<th scope="col">Intern/Extern</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
{% for ele in area_5_personal %}
|
||||
<tr>
|
||||
<td><a href="{% url 'rd-a5-viewpersonal' ele.pk %}">{{ele.name|default:""}}</a></td>
|
||||
<td>{{ele.function|default:""}}</td>
|
||||
<td>
|
||||
{% if ele.inorex == "in" %} Intern
|
||||
{% elif ele.inorex == "ex" %} Extern
|
||||
{% else %} {% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a5-viewpersonal' ele.pk %}"><i class="far fa-eye"></i></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a5-updatepersonal' ele.pk %}"><small><i class="fas fa-pen"></i></small></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a5-delpersonal' ele.pk %}"><small><i class="fas fa-trash"></i></small></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<h4>Dokumente, Vertretungsregeln & Zugriffsberechtigungen
|
||||
<a class="btn btn-primary btn-sm btn mb-3" href="{% url 'rd-a1-adddoc' 5 %}" style="float: right;"><i class="fas fa-plus"></i> Dokument</a>
|
||||
</h4>
|
||||
<table class="table table-hover" id="a5_docs" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Datum</th>
|
||||
<th scope="col">Beschreibung</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
{% for doc in area_5_doc %}
|
||||
<tr>
|
||||
<td><a href="{% url 'rd-a1-viewdoc' doc.pk %}" target="_blank">{{doc.document_name}}</a></td>
|
||||
<td>{{doc.document_date|date:"d.m.Y"|default:""}}</td>
|
||||
<td>{{doc.document_desc|default:""}}</td>
|
||||
<td>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a1-viewdoc' doc.pk %}"><i class="far fa-eye"></i></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a1-updatedoc' doc.pk %}"><small><i class="fas fa-pen"></i></small></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a1-deldoc' doc.pk %}"><small><i class="fas fa-trash"></i></small></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#a5_docs').DataTable({
|
||||
"language": {
|
||||
"search" : "Suche",
|
||||
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"lengthMenu": "Zeige _MENU_ Einträge",
|
||||
"zeroRecords": "Nichts gefunden",
|
||||
"infoEmpty": "Keine Einträge",
|
||||
"paginate": {
|
||||
"first": "Erste",
|
||||
"last": "Letzte",
|
||||
"next": "Nächste",
|
||||
"previous": "Zurück"
|
||||
},
|
||||
},
|
||||
"pageLength": 50,
|
||||
"buttons" : {
|
||||
"className" : "btn-danger"
|
||||
}
|
||||
});
|
||||
|
||||
$('#a5_personal').DataTable({
|
||||
"language": {
|
||||
"search" : "Suche",
|
||||
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"lengthMenu": "Zeige _MENU_ Einträge",
|
||||
"zeroRecords": "Nichts gefunden",
|
||||
"infoEmpty": "Keine Einträge",
|
||||
"paginate": {
|
||||
"first": "Erste",
|
||||
"last": "Letzte",
|
||||
"next": "Nächste",
|
||||
"previous": "Zurück"
|
||||
},
|
||||
},
|
||||
"pageLength": 50,
|
||||
"buttons" : {
|
||||
"className" : "btn-danger"
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1 +1,97 @@
|
|||
SECHSTE
|
||||
<h4>Bankkonten und Online-Bankzugänge
|
||||
<a class="btn btn-primary btn mb-3 btn-sm " href="{% url 'rd-a2-addonlinebank' 6 %}" style="float: right;"><i class="fas fa-plus"></i> Online-Banking</a>
|
||||
</h4>
|
||||
<table class="table table-hover" id="area_6_onlinebank" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Internetadresse/Bankname</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
{% for ele in area_6_onlinebank %}
|
||||
<tr>
|
||||
<td><a href="{% url 'rd-a2-viewonlinebank' ele.pk %}">{{ele.web_address}}</a></td>
|
||||
<td>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a2-viewonlinebank' ele.pk %}"><i class="far fa-eye"></i></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a2-updateonlinebank' ele.pk %}"><small><i class="fas fa-pen"></i></small></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a2-delonlinebank' ele.pk %}"><small><i class="fas fa-trash"></i></small></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<h4>Dokumente
|
||||
<a class="btn btn-primary btn-sm btn mb-3" href="{% url 'rd-a1-adddoc' 6 %}" style="float: right;"><i class="fas fa-plus"></i> Dokument</a>
|
||||
</h4>
|
||||
<table class="table table-hover" id="a6_docs" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Datum</th>
|
||||
<th scope="col">Beschreibung</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
{% for doc in area_5_doc %}
|
||||
<tr>
|
||||
<td><a href="{% url 'rd-a1-viewdoc' doc.pk %}" target="_blank">{{doc.document_name}}</a></td>
|
||||
<td>{{doc.document_date|date:"d.m.Y"|default:""}}</td>
|
||||
<td>{{doc.document_desc|default:""}}</td>
|
||||
<td>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a1-viewdoc' doc.pk %}"><i class="far fa-eye"></i></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a1-updatedoc' doc.pk %}"><small><i class="fas fa-pen"></i></small></a>
|
||||
<a style="float: right" class="btn btn-secondary btn-sm mr-2 " href="{% url 'rd-a1-deldoc' doc.pk %}"><small><i class="fas fa-trash"></i></small></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#a6_docs').DataTable({
|
||||
"language": {
|
||||
"search" : "Suche",
|
||||
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"lengthMenu": "Zeige _MENU_ Einträge",
|
||||
"zeroRecords": "Nichts gefunden",
|
||||
"infoEmpty": "Keine Einträge",
|
||||
"paginate": {
|
||||
"first": "Erste",
|
||||
"last": "Letzte",
|
||||
"next": "Nächste",
|
||||
"previous": "Zurück"
|
||||
},
|
||||
},
|
||||
"pageLength": 50,
|
||||
"buttons" : {
|
||||
"className" : "btn-danger"
|
||||
}
|
||||
});
|
||||
|
||||
$('#area_6_onlinebank').DataTable({
|
||||
"language": {
|
||||
"search" : "Suche",
|
||||
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
||||
"lengthMenu": "Zeige _MENU_ Einträge",
|
||||
"zeroRecords": "Nichts gefunden",
|
||||
"infoEmpty": "Keine Einträge",
|
||||
"paginate": {
|
||||
"first": "Erste",
|
||||
"last": "Letzte",
|
||||
"next": "Nächste",
|
||||
"previous": "Zurück"
|
||||
},
|
||||
},
|
||||
"pageLength": 50,
|
||||
"buttons" : {
|
||||
"className" : "btn-danger"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
{% block content %}
|
||||
{% if request.user.profile.agency.module_recoverdir %}
|
||||
<div class="content-section col-9">
|
||||
<h3>Zugang zur Online-Bank bearbeiten</h3>
|
||||
<h3>Zugang zur Bank/Online-Bankaccount bearbeiten</h3>
|
||||
<hr>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
{{form|crispy}}
|
||||
<hr>
|
||||
<a class="btn" href="{% url 'recoverdir' %} ">Abbrechen</a>
|
||||
<button type="submit" class="btn btn-primary" style="float: right;">Zugang zu Online-Bank speichern</button>
|
||||
<button type="submit" class="btn btn-primary" style="float: right;">Zugang zu Bank/Online-Bankaccount speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,14 @@
|
|||
<tr>
|
||||
<td>Passwort:</td>
|
||||
<td>{{onlinebank.web_password|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>BIC:</td>
|
||||
<td>{{onlinebank.bic|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IBAN:</td>
|
||||
<td>{{onlinebank.iban|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mit meinem Account soll Folgendes passieren:</td>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "users/base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
{% if request.user.profile.agency.module_recoverdir %}
|
||||
<div class="content-section col-9">
|
||||
<h3>Personal-Account bearbeiten</h3>
|
||||
<hr>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{form.media}}
|
||||
{{form|crispy}}
|
||||
<hr>
|
||||
<a class="btn" href="{% url 'recoverdir' %} ">Abbrechen</a>
|
||||
<button type="submit" class="btn btn-primary" style="float: right;">Personal-Account speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3>Das Modul Notfallhilfe wurden in ihrer Agentur deaktiviert.</h3>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "users/base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
{% if request.user.profile.agency.module_recoverdir %}
|
||||
<div class="content-section col-9">
|
||||
<h3>Personal-Partner-Account löschen</h3>
|
||||
<hr>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
Möchten Sie den Personal/Partner-Account von <i>{{account.name}}</i> wirklich endgültig löschen?
|
||||
<hr>
|
||||
<a class="btn" href="{% url 'recoverdir' %} ">Abbrechen</a>
|
||||
<button type="submit" class="btn btn-primary" style="float: right;">Personal/Partner-Account endgültig löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3>Das Modul Notfallhilfe wurden in ihrer Agentur deaktiviert.</h3>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
{% extends "users/base.html" %}
|
||||
{% block content %}
|
||||
{% if request.user.profile.agency.module_recoverdir %}
|
||||
<div class="content-section col-12">
|
||||
<h3>Personalaccount {% if history == True %} - Version vom {{personal.history_date|date:"d.m.Y"}}{% endif %}
|
||||
<span style="float: right">
|
||||
<a href="{% url 'recoverdir'%}" style="float: right" class="btn btn-secondary btn-sm "><small><i class="fas fa-chevron-circle-left"></i></small></a>
|
||||
</span>
|
||||
</h3>
|
||||
<hr>
|
||||
<h4>Personal und Partner</h4>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td>{{personal.name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Function:</td>
|
||||
<td>{{personal.function|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Intern/Extern:</td>
|
||||
<td>
|
||||
{% if personal.inorex == "in" %} Intern
|
||||
{% elif personal.inorex == "ex" %} Extern
|
||||
{% else %} {% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PNR:</td>
|
||||
<td>{{personal.pnr|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ONR:</td>
|
||||
<td>{{personal.onr|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email-Adresse:</td>
|
||||
<td>{{personal.mail|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Telefon:</td>
|
||||
<td>{{personal.tel|default:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Adresse:</td>
|
||||
<td>{{personal.adresse|default:""}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
</div>
|
||||
{% else %}
|
||||
<h3>Auf dieses Modul haben Sie keinen Zugriff!</h3>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
8 = OnlineBank
|
||||
9 = Streaming-Abo
|
||||
10 = Digitaler Account
|
||||
11 = Personal
|
||||
-->
|
||||
<tbody>
|
||||
{% for ele in history %}
|
||||
|
|
@ -57,6 +58,9 @@
|
|||
{% elif hisotryelementinfo.1 == 10 %}
|
||||
<a href="{% url 'recoverdir-digitalaccounthistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
|
||||
|
||||
{% elif hisotryelementinfo.1 == 11 %}
|
||||
<a href="{% url 'recoverdir-personalhistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{rdele.history_date|date:"d.m.Y H:i"}}</td>
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ urlpatterns = [
|
|||
path('two/ergo/update/<int:pk>', permission_required('users.recoverdirmanager')(RDAtwoUpdateergo.as_view()), name='rd-a2-updateergo'),
|
||||
|
||||
# OnlineBank
|
||||
path('two/onlinebank/add', permission_required('users.recoverdirmanager')(RDAtwoAddonlinebank.as_view()), name='rd-a2-addonlinebank'),
|
||||
path('two/onlinebank/add/<int:area>', permission_required('users.recoverdirmanager')(RDAtwoAddonlinebank.as_view()), name='rd-a2-addonlinebank'),
|
||||
path('two/onlinebank/<int:pk>', permission_required('users.recoverdirmanager')(RDAtwoViewonlinebank.as_view()), name='rd-a2-viewonlinebank'),
|
||||
path('two/onlinebank/del/<int:pk>', permission_required('users.recoverdirmanager')(RDAtwoDelonlinebank.as_view()), name='rd-a2-delonlinebank'),
|
||||
path('two/onlinebank/update/<int:pk>', permission_required('users.recoverdirmanager')(RDAtwoUpdateonlinebank.as_view()), name='rd-a2-updateonlinebank'),
|
||||
|
|
@ -68,12 +68,20 @@ urlpatterns = [
|
|||
path('three/streaming/<int:pk>', permission_required('users.recoverdirmanager')(RDAthreeViewstreaming.as_view()), name='rd-a3-viewstreaming'),
|
||||
path('three/streaming/del/<int:pk>', permission_required('users.recoverdirmanager')(RDAthreeDelstreaming.as_view()), name='rd-a3-delstreaming'),
|
||||
path('three/streaming/update/<int:pk>', permission_required('users.recoverdirmanager')(RDAthreeUpdatestreaming.as_view()), name='rd-a3-updatestreaming'),
|
||||
|
||||
|
||||
# Bereich 4
|
||||
# Digitale Accounts
|
||||
path('four/digitalaccount/add', permission_required('users.recoverdirmanager')(RDAfourAdddigitalaccount.as_view()), name='rd-a4-adddigitalaccount'),
|
||||
path('four/digitalaccount/<int:pk>', permission_required('users.recoverdirmanager')(RDAfourViewdigitalaccount.as_view()), name='rd-a4-viewdigitalaccount'),
|
||||
path('four/digitalaccount/del/<int:pk>', permission_required('users.recoverdirmanager')(RDAfourDeldigitalaccount.as_view()), name='rd-a4-deldigitalaccount'),
|
||||
path('four/digitalaccount/update/<int:pk>', permission_required('users.recoverdirmanager')(RDAfourUpdatedigitalaccount.as_view()), name='rd-a4-updatedigitalaccount'),
|
||||
|
||||
# Bereich 5
|
||||
# Personaldaten
|
||||
path('five/personal/add', permission_required('users.recoverdirmanager')(RDAfiveAddpersonal.as_view()), name='rd-a5-addpersonal'),
|
||||
path('five/personal/<int:pk>', permission_required('users.recoverdirmanager')(RDAfiveViewpersonal.as_view()), name='rd-a5-viewpersonal'),
|
||||
path('five/personal/del/<int:pk>', permission_required('users.recoverdirmanager')(RDAfiveDelpersonal.as_view()), name='rd-a5-delpersonal'),
|
||||
path('five/personal/update/<int:pk>', permission_required('users.recoverdirmanager')(RDAfiveUpdatepersonal.as_view()), name='rd-a5-updatepersonal'),
|
||||
|
||||
# HISTORY VIEWS
|
||||
# Persönliches Schreiben
|
||||
|
|
@ -96,8 +104,10 @@ urlpatterns = [
|
|||
path('onlinebank/ver/<int:pk>/<int:rev>', permission_required('users.recoverdirmanager')(OnlinebankSingleHistory.as_view()), name='recoverdir-onlinebankhistory-single'),
|
||||
# STREAMINGABO
|
||||
path('streaming/ver/<int:pk>/<int:rev>', permission_required('users.recoverdirmanager')(StreamingSingleHistory.as_view()), name='recoverdir-streaminghistory-single'),
|
||||
|
||||
# Digitale Accounts
|
||||
path('digitalaccount/ver/<int:pk>/<int:rev>', permission_required('users.recoverdirmanager')(DigitalAccountSingleHistory.as_view()), name='recoverdir-digitalaccounthistory-single'),
|
||||
# Personal Intern/Extern
|
||||
path('personal/ver/<int:pk>/<int:rev>', permission_required('users.recoverdirmanager')(PersonalSingleHistory.as_view()), name='recoverdir-personalhistory-single'),
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,19 +38,25 @@ class RecoverDirManagement(LoginRequiredMixin, ListView):
|
|||
ergodigi = ErgoVerDir.objects.filter(agency=self.request.user.profile.agency)
|
||||
context.update({"area_2_ergo" : ergodigi})
|
||||
|
||||
onlinebank = OnlineBank.objects.filter(agency=self.request.user.profile.agency)
|
||||
onlinebank = OnlineBank.objects.filter(agency=self.request.user.profile.agency, area=2)
|
||||
context.update({"area_2_onlinebank" : onlinebank})
|
||||
|
||||
onlinebank6 = OnlineBank.objects.filter(agency=self.request.user.profile.agency, area=6)
|
||||
context.update({"area_6_onlinebank" : onlinebank6})
|
||||
|
||||
streamingabo = StreamingAbo.objects.filter(agency=self.request.user.profile.agency)
|
||||
context.update({"area_3_abos" : streamingabo})
|
||||
|
||||
digitalaccount = DigitalAccounts.objects.filter(agency=self.request.user.profile.agency)
|
||||
context.update({"area_4_digitalaccount" : digitalaccount})
|
||||
|
||||
personal = Personal.objects.filter(agency=self.request.user.profile.agency)
|
||||
context.update({"area_5_personal" : personal})
|
||||
|
||||
|
||||
handlungsleitfadenvf = HandlungsleitfadenVF.objects.filter(agency=self.request.user.profile.agency)
|
||||
|
||||
finalupdatelist = chain(persletters, handlungsleitfaden, contactfc, contactstrust, handlungsleitfadenvf, depistvollmacht, ergodigi, onlinebank, streamingabo, digitalaccount)
|
||||
finalupdatelist = chain(persletters, handlungsleitfaden, contactfc, contactstrust, handlungsleitfadenvf, depistvollmacht, ergodigi, onlinebank, streamingabo, digitalaccount, personal, onlinebank6)
|
||||
context.update({"history" : finalupdatelist})
|
||||
|
||||
# DOCUMENTS NOT WORKING Weil das "alte" nicht gespeichert wird sondern lediglich der Datensatz
|
||||
|
|
@ -94,6 +100,13 @@ class RecoverDirManagement(LoginRequiredMixin, ListView):
|
|||
# A4
|
||||
context.update({'area_4_doc' : Documents.objects.filter(agency=self.request.user.profile.agency, area=4).order_by('-document_date')})
|
||||
|
||||
# A5
|
||||
context.update({'area_5_doc' : Documents.objects.filter(agency=self.request.user.profile.agency, area=5).order_by('-document_date')})
|
||||
|
||||
# A6
|
||||
context.update({'area_6_doc' : Documents.objects.filter(agency=self.request.user.profile.agency, area=5).order_by('-document_date')})
|
||||
|
||||
|
||||
return context
|
||||
|
||||
class RecoverDirAddPL(CreateView):
|
||||
|
|
@ -483,6 +496,7 @@ class RDAtwoAddonlinebank(CreateView):
|
|||
|
||||
def form_valid(self, form):
|
||||
form.instance.agency = self.request.user.profile.agency
|
||||
form.instance.area = self.kwargs["area"]
|
||||
if(self.request.FILES and self.request.FILES['vollmacht_doc']):
|
||||
# Randomize File-Name keeping extension
|
||||
file = self.request.FILES['vollmacht_doc']
|
||||
|
|
@ -646,6 +660,55 @@ class RDAfourUpdatedigitalaccount(UpdateView):
|
|||
context.update({'active_link' : 'recoverdir'})
|
||||
return context
|
||||
|
||||
# Personalaccount
|
||||
class RDAfiveViewpersonal(DetailView):
|
||||
model = Personal
|
||||
success_url = reverse_lazy('recoverdir')
|
||||
template_name = 'recoverdir/rd_elements_forms/rd_area_5_personal_single.html'
|
||||
context_object_name = 'personal'
|
||||
|
||||
class RDAfiveDelpersonal(DeleteView):
|
||||
model = Personal
|
||||
success_url = reverse_lazy('recoverdir')
|
||||
template_name = 'recoverdir/rd_elements_forms/rd_area_5_personal_del.html'
|
||||
context_object_name = 'personal'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context.update({'active_link' : 'recoverdir'})
|
||||
return context
|
||||
|
||||
class RDAfiveAddpersonal(CreateView):
|
||||
model = Personal
|
||||
success_url = reverse_lazy('recoverdir')
|
||||
form_class = PersonalF
|
||||
template_name = "recoverdir/rd_elements_forms/rd_area_5_addpersonal.html"
|
||||
|
||||
def form_valid(self, form):
|
||||
form.instance.agency = self.request.user.profile.agency
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context.update({'active_link' : 'recoverdir'})
|
||||
return context
|
||||
|
||||
class RDAfiveUpdatepersonal(UpdateView):
|
||||
model = Personal
|
||||
success_url = reverse_lazy('recoverdir')
|
||||
form_class = PersonalF
|
||||
template_name = "recoverdir/rd_elements_forms/rd_area_5_addpersonal.html"
|
||||
|
||||
def form_valid(self, form):
|
||||
form.instance.agency = self.request.user.profile.agency
|
||||
return super().form_valid(form)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context.update({'active_link' : 'recoverdir'})
|
||||
return context
|
||||
|
||||
################################################## HISTORY ELEMENT VIEW ##########################################
|
||||
|
||||
|
||||
|
|
@ -904,5 +967,27 @@ class DigitalAccountSingleHistory(DetailView):
|
|||
})
|
||||
return context
|
||||
|
||||
# Personal
|
||||
class PersonalSingleHistory(DetailView):
|
||||
model = Personal
|
||||
template_name = 'recoverdir/rd_elements_forms/rd_area_5_personal_single.html'
|
||||
|
||||
# Gewünschte Revision aufrufen
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context.update({'active_link' : 'recoverdir'})
|
||||
|
||||
historyelements = Personal.objects.get(pk=self.kwargs['pk']).history.all()
|
||||
|
||||
shown_element = None
|
||||
for he in historyelements:
|
||||
if he.pk == self.kwargs["rev"]:
|
||||
shown_element = he
|
||||
|
||||
context.update({
|
||||
'personal' : shown_element,
|
||||
'history' : True
|
||||
})
|
||||
return context
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -793,8 +793,11 @@ def getHistoryClassOfObject(value):
|
|||
finalclass[0] = "Streaming-Abo"
|
||||
finalclass[1] = 9
|
||||
elif(objectClass == 'HistoricalDigitalAccounts'):
|
||||
finalclass[0] = "Onine-Account"
|
||||
finalclass[0] = "Online-Account"
|
||||
finalclass[1] = 10
|
||||
elif(objectClass == 'HistoricalPersonal'):
|
||||
finalclass[0] = "Personal und Partner"
|
||||
finalclass[1] = 11
|
||||
|
||||
return finalclass
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue