From b63c458df40e2acb6b5c24cf10e953bd1793ceba Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Mon, 20 Jul 2020 16:58:44 +0200 Subject: [PATCH] Bugs gefixed, Zeiterfassung vorbereitet --- areas/__pycache__/__init__.cpython-38.pyc | Bin 154 -> 152 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 165 -> 163 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 159 -> 157 bytes dasettings/forms.py | 181 +++++++------- .../__pycache__/__init__.cpython-38.pyc | Bin 170 -> 168 bytes .../dasettings/notifications_content.html | 72 +++--- .../templates/dasettings/user_usprof.html | 230 +++++++++--------- .../__pycache__/__init__.cpython-38.pyc | Bin 164 -> 162 bytes .../__pycache__/settings.cpython-38.pyc | Bin 4085 -> 4083 bytes .../__pycache__/urls.cpython-38.pyc | Bin 2584 -> 2582 bytes .../__pycache__/views.cpython-38.pyc | Bin 356 -> 354 bytes message/__pycache__/__init__.cpython-38.pyc | Bin 156 -> 154 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 167 -> 165 bytes news/__pycache__/__init__.cpython-38.pyc | Bin 153 -> 151 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 170 -> 168 bytes orga/__pycache__/__init__.cpython-38.pyc | Bin 153 -> 151 bytes orga/__pycache__/admin.cpython-38.pyc | Bin 194 -> 192 bytes orga/__pycache__/apps.cpython-38.pyc | Bin 369 -> 367 bytes orga/__pycache__/models.cpython-38.pyc | Bin 191 -> 189 bytes orga/__pycache__/urls.cpython-38.pyc | Bin 405 -> 403 bytes orga/__pycache__/views.cpython-38.pyc | Bin 3512 -> 3510 bytes organizer/__pycache__/__init__.cpython-38.pyc | Bin 158 -> 156 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 169 -> 167 bytes standards/__pycache__/__init__.cpython-38.pyc | Bin 158 -> 156 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 171 -> 169 bytes .../__pycache__/counter_tag.cpython-38.pyc | Bin 15307 -> 15305 bytes tasks/__pycache__/__init__.cpython-38.pyc | Bin 154 -> 152 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 163 -> 161 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 174 -> 172 bytes .../timemanagement/rendered_confirmform.html | 11 +- .../templates/timemanagement/tm_ab_all.html | 41 ++-- users/__pycache__/__init__.cpython-38.pyc | Bin 154 -> 152 bytes 32 files changed, 268 insertions(+), 267 deletions(-) diff --git a/areas/__pycache__/__init__.cpython-38.pyc b/areas/__pycache__/__init__.cpython-38.pyc index d64b760a4764463097c04a58ad7173303a6a1259..3b12d3e60bd4b11394d0017f6e007ef01878b8a7 100644 GIT binary patch delta 75 zcmbQmID?TVl$V!_0SMBTiN;Ulu{O5V&&bbB)z2s?O3W=t)pyCyF3nBND@oON_YBcb c$xP2INz6%2Oa}^;7U?Gzr6v~ZPppvx05&TaWdHyG delta 77 zcmbQiIE#@dl$V!_0SF8Z?2enrV{K~hY!wq)oLW>I6Pj0)nwS&glAm0fo0?Zr9OLd8 d5|fgdo>`KZlbVNd&4Xj+s~`2LPKG8jSz| diff --git a/cloud/migrations/__pycache__/__init__.cpython-38.pyc b/cloud/migrations/__pycache__/__init__.cpython-38.pyc index 53af3fcbb63048e2dc3f3529596684db9ea9a21a..cd4f67657a551a1d1a8d17db47a1a4e248bd8d12 100644 GIT binary patch delta 86 zcmZ3=xR{YAl$V!_0SMBTiN;Ulv9|Nj&&bbB)z2s?O3W=t)pyCyF3nBND@oON_YBcb n$xP2INz6%2Oa}^;7U?JF%C=VqoCC6;97=N0QuY?lK7Y)%~$ delta 115 zcmZ3?xRjA6l$V!_0SF8Z?2enrV;$$^Y!wq)oLW>I6Pj0)nwS&glAm0fo0?Zr9OLd8 z5|fgdo>`KZlbVNzTbHO^M0POfO0-$;{6yj){-Y%*!l^kJl@xyv1RYo1ape NlWNBZwBR$y768j7CvN}% diff --git a/dasettings/__pycache__/__init__.cpython-38.pyc b/dasettings/__pycache__/__init__.cpython-38.pyc index c707045ebf9408173654bc6274176fcffefc7ebe..91a913dafd45d098216183fb4b2f1affef467a91 100644 GIT binary patch delta 80 zcmbQwIG2$pl$V!_0SMBTiN;Ulv9@s1&&bbB)z2s?O3W=t)pyCyF3nBND@oON_YBcb h$xP2INz6%2Oa}^;7U`!X7N?e!Wagz8>rZTy0|34U8mIsO delta 82 zcmbQsIG>Rxl$V!_0SF8Z?2enrV{PT)Y!wq)oLW>I6Pj0)nwS&glAm0fo0?Zr9OLd8 j5|fgdo>`KZlbVNl7eDEh)*&OD~R@ST6?vEgT%s diff --git a/dasettings/forms.py b/dasettings/forms.py index e1a5f61..cac4780 100644 --- a/dasettings/forms.py +++ b/dasettings/forms.py @@ -31,7 +31,7 @@ class UsersSelfChangeForm(forms.ModelForm): email = forms.EmailField() class Meta: - model = User + model = User fields = ['email'] # Form für die Benachrichtigungseinstellungen @@ -45,7 +45,7 @@ class UsersNotificationForm(forms.ModelForm): #"user_standard_public_mail" : "Veröffentlichung meiner Standards", "agency_new_standard_mail" : "Neue Agentur-Standards", 'add_new_group_mail' : "Gruppenmitgliedschaften", - 'add_task_mail' : "Tätigkeitsbereich", + 'add_task_mail' : "Tätigkeitsbereich", 'user_messages_mail' : "Mitteilungen" } #fields = ['news_mail', 'news_push', 'user_standard_public_mail', 'user_standard_public_push', 'agency_new_standard_mail', 'agency_new_standard_push', 'add_new_group_mail', 'add_new_group_push', 'add_task_mail', 'add_task_push', 'user_messages_mail', 'user_messages_push'] @@ -53,7 +53,7 @@ class UsersNotificationForm(forms.ModelForm): ''' # Form für die Benachrichtigungseinstellungen STANDARDS class UsersNotificationFormStandard(forms.ModelForm): - + class Meta: model = UserNotifications labels = { @@ -61,9 +61,9 @@ class UsersNotificationFormStandard(forms.ModelForm): "standard_update_mail" : "Standard verändert", "standard_delete_mail" : "Standard gelöscht", "standard_created_unpub_mail" : "Neuer, unveröffentlichter Standard" - + } - fields = [ + fields = [ 'standard_created_mail', 'standard_created_push', 'standard_update_mail', @@ -71,87 +71,87 @@ class UsersNotificationFormStandard(forms.ModelForm): 'standard_delete_mail', 'standard_delete_push', 'standard_created_unpub_mail', - 'standard_created_unpub_push', + 'standard_created_unpub_push', ] # Form für die Benachrichtigungseinstellungen NEWS class UsersNotificationFormNews(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "news_created_mail" : "Neuer Agenturnews", - + "news_created_mail" : "Neuer Agenturnews", + } - fields = [ - 'news_created_mail', - 'news_created_push', + fields = [ + 'news_created_mail', + 'news_created_push', ] # Form für die Benachrichtigungseinstellungen MESSAGES class UsersNotificationFormMessages(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "message_received_mail" : "Neuer Mitteilung", - + "message_received_mail" : "Neuer Mitteilung", + } - fields = [ - 'message_received_mail', - 'message_received_push', + fields = [ + 'message_received_mail', + 'message_received_push', ] # Form für die Benachrichtigungseinstellungen CHAT class UsersNotificationFormChat(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "chat_received_mail" : "Verpasste Chatnachrichten", - "chat_room_activity_mail" : "Raumaktivitäten", - + "chat_received_mail" : "Verpasste Chatnachrichten", + "chat_room_activity_mail" : "Raumaktivitäten", + } - fields = [ - 'chat_received_mail', + fields = [ + 'chat_received_mail', 'chat_received_push', - 'chat_room_activity_mail', - 'chat_room_activity_push', + 'chat_room_activity_mail', + 'chat_room_activity_push', ] # Form für die Benachrichtigungseinstellungen FILES class UsersNotificationFormFiles(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "filedir_created_mail" : "Datei/Ordner erstellt", - "filedir_update_mail" : "Datei/Ordner aktualisiert", - "filedir_delete_mail" : "Datei/Ordner gelöscht", - + "filedir_created_mail" : "Datei/Ordner erstellt", + "filedir_update_mail" : "Datei/Ordner aktualisiert", + "filedir_delete_mail" : "Datei/Ordner gelöscht", + } - fields = [ - 'filedir_created_mail', - 'filedir_created_push', - 'filedir_update_mail', - 'filedir_update_push', - 'filedir_delete_mail', - 'filedir_delete_push', + fields = [ + 'filedir_created_mail', + 'filedir_created_push', + 'filedir_update_mail', + 'filedir_update_push', + 'filedir_delete_mail', + 'filedir_delete_push', ] # Form für die Benachrichtigungseinstellungen ABSENCE AND TIME class UsersNotificationFormAbTime(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "absence_created_mail" : "Anfrage erstellt", - "absence_user_is_rep_mail" : "Als Vertreter eingesetzt", - "absence_user_is_rep_reminder_mail" : "Erinnerung für Vertretung", - "time_data_changed_mail" : "Abwesenheit bearbeitet", + "absence_created_mail" : "Anfrage erstellt", + "absence_user_is_rep_mail" : "Als Vertreter eingesetzt", + "absence_user_is_rep_reminder_mail" : "Erinnerung für Vertretung", + "time_data_changed_mail" : "Abwesenheit bearbeitet", } - fields = [ + fields = [ 'absence_created_mail', 'absence_created_push', 'absence_user_is_rep_mail', @@ -164,51 +164,51 @@ class UsersNotificationFormAbTime(forms.ModelForm): # Form für die Benachrichtigungseinstellungen GRUPPEN class UsersNotificationFormGroups(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "group_activity_mail" : "Mitgliedschaftsänderung", - "group_rights_mail" : "Rechteänderung", - + "group_activity_mail" : "Mitgliedschaftsänderung", + "group_rights_mail" : "Rechteänderung", + } - fields = [ - 'group_activity_mail', - 'group_activity_push', - 'group_rights_mail', + fields = [ + 'group_activity_mail', + 'group_activity_push', + 'group_rights_mail', 'group_rights_push', ] # Form für die Benachrichtigungseinstellungen Tätigkeitsbereiche class UsersNotificationFormTasks(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "task_activity_mail" : "Tätigkeiten", - + "task_activity_mail" : "Tätigkeiten", + } - fields = [ - 'task_activity_mail', + fields = [ + 'task_activity_mail', 'task_activity_push', ] # Form für die Benachrichtigungseinstellungen GRUPPEN class UsersNotificationFormAgn(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "agn_standard_created_mail" : "Neuer Standard", - "agn_standard_copied_mail" : "Standard wurde übernommen", - "agn_standard_comment_mail" : "Kommentar zu Standard aus meiner Agentur", - "agn_standard_comment_react_mail" : "Reaktion zu meinem Kommentar", - "agn_own_change_mail" : "Änderungen meiner Agenturverbunde", + "agn_standard_created_mail" : "Neuer Standard", + "agn_standard_copied_mail" : "Standard wurde übernommen", + "agn_standard_comment_mail" : "Kommentar zu Standard aus meiner Agentur", + "agn_standard_comment_react_mail" : "Reaktion zu meinem Kommentar", + "agn_own_change_mail" : "Änderungen meiner Agenturverbunde", "agn_other_change_mail" : "Änderung anderer Agenturverbunde", } - fields = [ - 'agn_standard_created_mail', - 'agn_standard_created_push', + fields = [ + 'agn_standard_created_mail', + 'agn_standard_created_push', 'agn_standard_copied_mail', 'agn_standard_copied_push', 'agn_standard_comment_mail', @@ -223,21 +223,21 @@ class UsersNotificationFormAgn(forms.ModelForm): class UsersNotificationFormOrganizer(forms.ModelForm): - + class Meta: model = UserNotifications labels = { - "ql_created_mail" : "Quicklink erstellt", - "ql_update_mail" : "Quicklink aktualisiert", + "ql_created_mail" : "Quicklink erstellt", + "ql_update_mail" : "Quicklink aktualisiert", "ql_delete_mail" : "Quicklink gelöscht", - "contact_created_mail" : "Kontakt erstellt", - "contact_update_mail" : "Kontakt aktualisiert", - "contact_delete_mail" : "Kontakt gelöscht", - "password_created_mail" : "Passwort erstellt", - "password_update_mail" : "Passwort aktualisiert", - "password_delete_mail" : "Passwort gelöscht", + "contact_created_mail" : "Kontakt erstellt", + "contact_update_mail" : "Kontakt aktualisiert", + "contact_delete_mail" : "Kontakt gelöscht", + "password_created_mail" : "Passwort erstellt", + "password_update_mail" : "Passwort aktualisiert", + "password_delete_mail" : "Passwort gelöscht", } - fields = [ + fields = [ 'ql_created_mail', 'ql_created_push', 'ql_update_mail', @@ -280,17 +280,17 @@ class UserTimeForm(forms.ModelForm): fields = ["startdate", "usetime", "usetime_start", "wd_mo", "wd_tu", "wd_we", "wd_th", "wd_fr", "wd_sa", "wd_so", "loose_holidedate"] widgets = { "startdate" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}), - "usetime_start" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) + "usetime_start" : DatePickerInput(options={"format":'DD.MM.YYYY', "locale":'de'}) } - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['startdate'].required = True self.fields['usetime_start'].required = False self.fields['usetime'].required = False - self.fields['usetime'].widget.attrs['readonly'] = True - self.fields['usetime_start'].widget.attrs['readonly'] = True - + #self.fields['usetime'].widget.attrs['readonly'] = True + #self.fields['usetime_start'].widget.attrs['readonly'] = True + # PERMISSION GROUPS FORM class AgencyGroupPerms(forms.Form): @@ -303,11 +303,11 @@ class AgencyGroupPerms(forms.Form): @param: user - User ist der aufgerufene User! - ''' - def __init__(self, *args, **kwargs): + ''' + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) temprof = AgencyGroup - for ele in temprof._meta.permissions: + for ele in temprof._meta.permissions: self.fields[ele[0]] = forms.BooleanField(required=False, initial=False, help_text=(ele[1])) # LOADING ALL MODUL-OPTIONS @@ -367,16 +367,16 @@ class UserProfileForm(forms.ModelForm): "phoneland" : "Festnetznummer", "image": "Profilbild", "func" : "Agenturfunktion", - "compfunc" : "Tätigkeit" + "compfunc" : "Tätigkeit" } widgets = {"parent" : forms.HiddenInput()} fields = ["parent", "func", "compfunc", "visible", "phoneland", "phonemobile", "phone_public", "persnumber", "image" ] def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.fields['func'].queryset = AgencyJob.objects.filter(agency__pk=self.instance.agency.pk) - def save(self): + def save(self): photo = super(UserProfileForm, self).save() try: x = self.cleaned_data.get('x') @@ -386,12 +386,12 @@ class UserProfileForm(forms.ModelForm): rotation = self.cleaned_data.get('rotation') image = Image.open(photo.image) rotatet_image = image.rotate(rotation, expand=True) - cropped_image = rotatet_image.crop((x, y, w+x, h+y)) + cropped_image = rotatet_image.crop((x, y, w+x, h+y)) resized_image = cropped_image.resize((416, 416), Image.ANTIALIAS) resized_image.save(photo.image.path) return photo except: - print("no photo") + print("no photo") class AbsenceReasonForm(forms.ModelForm): @@ -405,6 +405,5 @@ class AbsenceReasonForm(forms.ModelForm): "need_confirm" : "Muss bestätigt werden", "need_rep" : "Muss vertreten werden", "is_holiday" : "Geht vom Urlaub ab" - } + } fields = ["name", "need_confirm", "need_rep", "is_holiday", "rgb_color"] - diff --git a/dasettings/migrations/__pycache__/__init__.cpython-38.pyc b/dasettings/migrations/__pycache__/__init__.cpython-38.pyc index 2bdc2eca1d2c28902ec23f71cd6d17c88054d8b7..e66e7ab57a85310473b027cfbedb58bf26ae5c19 100644 GIT binary patch delta 91 zcmZ3*xPp-*r>s7bTWt=I0gbPwbHc01WXTO8@`> delta 93 zcmZ3%xQdY{l$V!_0SF8Z?2enrW9{niY!wq)oLW>I6Pj0)nwS&glAm0fo0?Zr9OLd8 u5|fgdo>`KZlbVNl7eDEh)*&OD~Se%}g&!EXmBzD~_4iB?kbM(IKD! diff --git a/dasettings/templates/dasettings/notifications_content.html b/dasettings/templates/dasettings/notifications_content.html index 0028242..27542cb 100644 --- a/dasettings/templates/dasettings/notifications_content.html +++ b/dasettings/templates/dasettings/notifications_content.html @@ -8,7 +8,7 @@
@@ -20,13 +20,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_standard %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -45,7 +45,7 @@
@@ -57,13 +57,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_news %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -83,7 +83,7 @@
@@ -95,13 +95,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_groups %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -120,7 +120,7 @@
@@ -132,13 +132,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_task %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -159,7 +159,7 @@
@@ -171,13 +171,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_files %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -196,7 +196,7 @@
@@ -208,13 +208,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_organizer %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -233,7 +233,7 @@
@@ -245,13 +245,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_messages %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -270,7 +270,7 @@
@@ -282,13 +282,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_chat %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -307,7 +307,7 @@
@@ -319,13 +319,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_abtime %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -345,7 +345,7 @@
@@ -357,13 +357,13 @@ Benachrichtigung E-Mail - Push + Push {% for formfield in notificationforms_agn %} {% if forloop.counter|divisibleby:2 %} - {{formfield}} + {{formfield}} {% else %} @@ -387,7 +387,7 @@ new_stat = 0; if($(this).prop("checked")){ new_stat = 1; - } + } $.ajax( { type: "GET", @@ -397,15 +397,15 @@ fieldname : ele, new_stat : new_stat }, - success: function( data ) - { + success: function( data ) + { console.log(data); if(data['success']){ - $('#notchange_done').toast('show'); + $('#notchange_done').toast('show'); } else{ $('#notchange_err').toast('show'); - } + } } }); } @@ -418,4 +418,4 @@ }); }) - \ No newline at end of file + diff --git a/dasettings/templates/dasettings/user_usprof.html b/dasettings/templates/dasettings/user_usprof.html index 65588c0..6f512b6 100644 --- a/dasettings/templates/dasettings/user_usprof.html +++ b/dasettings/templates/dasettings/user_usprof.html @@ -11,13 +11,13 @@ @@ -25,14 +25,14 @@