diff --git a/api/urls.py b/api/urls.py index 987d2ed..0bcf797 100644 --- a/api/urls.py +++ b/api/urls.py @@ -11,4 +11,4 @@ urlpatterns = [ path('getchatrooms/', views.getchatrooms, name='api-getchatrooms'), path('getsinglechat/', views.getsinglechat, name='api-getsinglechat'), path('chatnewmessage/', views.savenewchatmessage, name='api-savechatmessage'), -] \ No newline at end of file +] diff --git a/api/views.py b/api/views.py index d20dbdd..a7037f8 100644 --- a/api/views.py +++ b/api/views.py @@ -10,6 +10,9 @@ from rest_framework import status from rest_framework.authentication import SessionAuthentication, BasicAuthentication, TokenAuthentication from rest_framework.decorators import authentication_classes from chat.models import ChatRoom, ChatMessage +from django.http import HttpResponseRedirect,HttpResponse, JsonResponse + +from timemanagement.models import Absence class GetUserId(APIView): permission_classes = (IsAuthenticated,) # <-- And here @@ -17,6 +20,7 @@ class GetUserId(APIView): def post(self, request): return Response({"userid" : self.request.user.pk}) + @api_view(['POST', ]) @permission_classes((IsAuthenticated,)) def getStandardList(request): diff --git a/cloud/templates/cloud/cloud_main.html b/cloud/templates/cloud/cloud_main.html index a9b0e22..24cd791 100644 --- a/cloud/templates/cloud/cloud_main.html +++ b/cloud/templates/cloud/cloud_main.html @@ -794,7 +794,7 @@ $('.droppable_div').on('dragleave', function (e) { }); //allowedtypes = "application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, text/plain, application/pdf, image/*, image/x-png, image/gif, image/jpg, image/jpeg, image/JPEG, image/JPG, docx, JPEG, JPG, doc, odt, ODT, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -allowedtypes = ['doc','docx','odt','ods','xls','xlsx','xlsm','ppt','pptx','mov','avi','svg','png','jpg','jpeg','mp3', 'wav', 'zip', 'rar', 'mp4', 'mwv', 'flv', 'eps', 'txt', 'pdf', "pages", "numbers"] +allowedtypes = ['doc','docx','odt','ods','xls','xlsx','xlsm','ppt','pptx','mov','avi','svg','png','jpg','jpeg','mp3', 'wav', 'zip', 'rar', 'mp4', 'mwv', 'flv', 'eps', 'txt', 'pdf', "pages", "numbers", "ics"] function getFileExtension1(filename) { diff --git a/cloud/views.py b/cloud/views.py index 4a78263..d7f30d8 100644 --- a/cloud/views.py +++ b/cloud/views.py @@ -251,7 +251,7 @@ def adddirbyajax(request, parent): # VALIDATE FILE-TYPE file_ext_arr = request.FILES['uploadedfile'].name.split(".") file_ext = file_ext_arr[len(file_ext_arr)-1] - allowed_types = ["txt", "TXT", "png", "PNG", "jpeg", "JPEG", "jpg", "JPG", "PDF", "pdf", "csv", "CSV", "DOC", "doc", "DOCX", "docx", "ODT", "odt", "PPT", "ppt", "PPTX", "pptx", "XLS", "xls", "XLSX", "xlsx", "mov", "MOV", "SVG", "svg", "ZIP", "zip", "RAR", "rar", "EPS", "eps", "MP3", "mp3", "WAV", "wav", "avi", "AVI", "FLV", "flv", "MP4", "mp4", "PAGES", "pages", "NUMBERS", "numbers"] + allowed_types = ["txt", "TXT", "png", "PNG", "jpeg", "JPEG", "jpg", "JPG", "PDF", "pdf", "csv", "CSV", "DOC", "doc", "DOCX", "docx", "ODT", "odt", "PPT", "ppt", "PPTX", "pptx", "XLS", "xls", "XLSX", "xlsx", "mov", "MOV", "SVG", "svg", "ZIP", "zip", "RAR", "rar", "EPS", "eps", "MP3", "mp3", "WAV", "wav", "avi", "AVI", "FLV", "flv", "MP4", "mp4", "PAGES", "pages", "NUMBERS", "numbers", "ics", "ICS"] file_ok = False for t in allowed_types: diff --git a/dasettings/views.py b/dasettings/views.py index 64802e8..ac50212 100644 --- a/dasettings/views.py +++ b/dasettings/views.py @@ -1741,10 +1741,10 @@ class BillPlanUpdate(UpdateView): "taxConditions": { "taxType": "net" }, - "paymentConditions": { - "paymentTermLabel": "Bitte zahlen Sie innerhalb von 14 Tagen.", - "paymentTermDuration": 14, - }, + #"paymentConditions": {da + # "paymentTermLabel": "Bitte zahlen Sie innerhalb von 14 Tagen.", + # "paymentTermDuration": 14, + #}, "shippingConditions": { #"shippingDate": voucher_date_today + "T00:00:00.000+00:00", "shippingType": "none" diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index b25f367..f6489ba 100644 Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ diff --git a/digitaleagentur/__pycache__/urls.cpython-38.pyc b/digitaleagentur/__pycache__/urls.cpython-38.pyc index 4758bd4..61f466f 100644 Binary files a/digitaleagentur/__pycache__/urls.cpython-38.pyc and b/digitaleagentur/__pycache__/urls.cpython-38.pyc differ diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py index bbfdfe0..c1de0ad 100644 --- a/digitaleagentur/settings.py +++ b/digitaleagentur/settings.py @@ -92,9 +92,11 @@ INSTALLED_APPS = [ 'channels', 'channels_presence', 'simple_history', - 'captcha' + 'captcha', ] + + MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -146,6 +148,7 @@ CHANNEL_LAYERS = { } + # Password validation # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators diff --git a/digitaleagentur/urls.py b/digitaleagentur/urls.py index 2b302c4..88ce86b 100644 --- a/digitaleagentur/urls.py +++ b/digitaleagentur/urls.py @@ -52,6 +52,7 @@ urlpatterns = [ if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + # ERROR HANDLERS handler404 = 'users.views.handler404' handler500 = 'users.views.handler500' \ No newline at end of file diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index d746e9a..2d5a311 100644 Binary files a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc and b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc differ diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py index 2f6e837..351d63a 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -904,7 +904,9 @@ def getAgencyBillStatus(agency): return returnvalue - +@register.simple_tag +def getBaseURLIcsLink(agency): + return settings.BASE_URL + "/ics/" + str(agency.pk) diff --git a/timemanagement/templates/timemanagement/rendered_table.html b/timemanagement/templates/timemanagement/rendered_table.html index 4341eb1..7a8b87c 100644 --- a/timemanagement/templates/timemanagement/rendered_table.html +++ b/timemanagement/templates/timemanagement/rendered_table.html @@ -225,6 +225,7 @@ + {% if user|usergperm:"absencemanager" %}