diff --git a/dasettings/forms.py b/dasettings/forms.py index 4e7fdd8..31acecf 100644 --- a/dasettings/forms.py +++ b/dasettings/forms.py @@ -66,15 +66,18 @@ class UserTimeForm(forms.ModelForm): labels = { "holiday" : "Urlaubstage", "loose_holidedate" : "Urlaubstage aus Vorjahr verfallen am", + "startdate" : "Einstellungsdatum", + "holiday_start" : "Urlaubstage bei Einstellung", "wd_mo" : "Montag", "wd_tu" : "Dienstag", "wd_we" : "Mittwoch", "wd_th" : "Donnerstag", "wd_fr" : "Freitag", } - fields = ["holiday", "loose_holidedate", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr"] + fields = ["holiday", "loose_holidedate", "startdate", "holiday_start", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr"] widgets = { - 'loose_holidedate': DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) + 'loose_holidedate': DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}), + "startdate" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) } @@ -130,14 +133,14 @@ class UserProfileForm(forms.ModelForm): class Meta: model = Profile labels = { - "persnumber" : "Personalnummer", - "visible" : "Im Organigramm sichtbar", - "phonemobile" : "Mobilnummer", - "phone_public" : "Nur Interne Verwendung der Mobilnummer", - "phoneland" : "Festnetznummer", - "image": "Profilbild", - "func" : "Agenturfunktion", - "compfunc" : "Tätigkeit" + "persnumber" : "Personalnummer", + "visible" : "Im Organigramm sichtbar", + "phonemobile" : "Mobilnummer", + "phone_public" : "Nur Interne Verwendung der Mobilnummer", + "phoneland" : "Festnetznummer", + "image": "Profilbild", + "func" : "Agenturfunktion", + "compfunc" : "Tätigkeit" } widgets = {"parent" : forms.HiddenInput()} fields = ["parent", "func", "compfunc", "visible", "phoneland", "phonemobile", "phone_public", "persnumber", "image" ] diff --git a/dasettings/templates/dasettings/settings.html b/dasettings/templates/dasettings/settings.html index b0e75e0..a4ab6b8 100644 --- a/dasettings/templates/dasettings/settings.html +++ b/dasettings/templates/dasettings/settings.html @@ -99,7 +99,7 @@
Agenturinformationen{% if request.user.profile.showtooltips %} {% endif %}

- {% block agency_content %} + {% block agency_content %} {% include "dasettings/agency_content.html" %} {% endblock %} diff --git a/dasettings/templates/dasettings/user_usprof.html b/dasettings/templates/dasettings/user_usprof.html index fbdc7e2..c956c94 100644 --- a/dasettings/templates/dasettings/user_usprof.html +++ b/dasettings/templates/dasettings/user_usprof.html @@ -176,7 +176,9 @@

Urlaub 

{{usertime_form.media}} {{usertime_form.holiday|as_crispy_field}} - {{usertime_form.loose_holidedate|as_crispy_field}} + {{usertime_form.holiday_start|as_crispy_field}} + {{usertime_form.loose_holidedate|as_crispy_field}} + {{usertime_form.startdate|as_crispy_field}}

diff --git a/dasettings/views.py b/dasettings/views.py index 3b6e1c9..2e1c7da 100644 --- a/dasettings/views.py +++ b/dasettings/views.py @@ -544,7 +544,6 @@ def UserProfileUpdate(request, pk, newuser=0): elif(request.POST["form_type"] == "contract"): formtosave = UserTimeForm(request.POST, instance=UserTime.objects.get(user=usertochange)) - print(formtosave) if(formtosave.is_valid()): messages.success(request, f'Vertragsdaten gespeichert!') formtosave.save() @@ -792,8 +791,7 @@ def ManageAgInAgn(request, pk): for a in network.adminagencys.all(): allagofagn.append(a) - print(allagofagn) - + context = { 'active_link' : 'dasettings', 'agn' : list(agn)[0], diff --git a/standards/templates/standards/standards_management.html b/standards/templates/standards/standards_management.html index c8b86bc..b038731 100644 --- a/standards/templates/standards/standards_management.html +++ b/standards/templates/standards/standards_management.html @@ -29,7 +29,7 @@ {% if perms.users.standardmanager %}
+ + + \ No newline at end of file diff --git a/timemanagement/templates/timemanagement/rendered_table.html b/timemanagement/templates/timemanagement/rendered_table.html index e9a2388..ca718a9 100644 --- a/timemanagement/templates/timemanagement/rendered_table.html +++ b/timemanagement/templates/timemanagement/rendered_table.html @@ -1,18 +1,17 @@ {% load counter_tag %} - -
- - - - -
- - + + {% for da in days_this_month %} {% endfor %} - + {% for us in usersofagency %} {% setdateforloopcounter forloop.counter %} @@ -27,12 +26,72 @@ {% isfreeday user da as isfree %} {% isfreedayname user da as isfreename %} - {% if isfree %} - @@ -40,26 +99,123 @@ {% endfor %}
- {% for da in days_this_month %} +
+
+ + + +
+
{{da|date:"d D"}}
+ {% getabscenceday user us da as abday %} + {% if isfree %} + + {% elif da.weekday == 5 or da.weekday == 6 %} - - {% else %} + + + {% elif abday != False %} + + {% if abday.confirm_status == 0 %} + {% if user|usergperm:"absencemanager" %} + + {% else %} + + {% endif %} + {% elif abday.confirm_status == 1 %} + {% if user|usergperm:"absencemanager" %} + + {% else %} + + {% endif %} + {% else %} + + {% endif %} + + {% else %} + {% endif %}
- - + - - \ No newline at end of file diff --git a/timemanagement/templates/timemanagement/timemanagement_management.html b/timemanagement/templates/timemanagement/timemanagement_management.html index faf6858..4587bb3 100644 --- a/timemanagement/templates/timemanagement/timemanagement_management.html +++ b/timemanagement/templates/timemanagement/timemanagement_management.html @@ -68,7 +68,7 @@