diff --git a/requirements.txt b/requirements.txt index 80116e7..8323398 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,27 +1,8 @@ -aioredis==1.3.1 -appdirs==1.4.4 -arabic-reshaper==2.1.1 -arrow==0.14.7 -asgiref==3.2.3 -async-timeout==3.0.1 -attrs==20.3.0 -auditlog3==1.0.1 -autobahn==20.7.1 -Automat==20.2.0 -certifi==2019.11.28 -cffi==1.14.4 channels==2.4.0 channels-redis==3.0.1 -chardet==3.0.4 -constantly==15.1.0 -cryptography==3.2.1 -distlib==0.3.1 Django==3.0 -django-appconf==1.0.4 django-bootstrap-datepicker-plus==3.0.5 -django-channels==0.7.0 django-channels-presence==1.0.0 -django-ckeditor==5.8.0 django-cleanup==5.0.0 django-colorful==1.3 django-crispy-forms==1.8.1 @@ -33,8 +14,6 @@ django-jsonfield==1.3.1 django-mathfilters==1.0.0 django-passwords==0.3.12 django-ranged-response==0.2.0 -django-recurrence==1.10.3 -django-simple-captcha==0.5.13 django-simple-history==2.11.0 django-six==1.0.4 django-summernote==0.8.11.6 @@ -42,46 +21,15 @@ django-user-agents==0.4.0 django-utils-six==2.0 djangorestframework==3.11.0 djradicale==0.0.14 -filelock==3.0.12 -filetype==1.0.7 -future==0.18.2 -hiredis==1.1.0 -html5lib==1.1 -hyperlink==20.0.1 -icalendar==4.0.7 ics==0.7 -idna==2.8 -incremental==17.5.0 -libmagic==1.0 -more-itertools==8.5.0 -msgpack==1.0.0 mysqlclient==2.0.1 -oauthlib==3.1.0 Pillow==6.2.1 -pyasn1==0.4.8 -pyasn1-modules==0.2.8 pycparser==2.20 -PyHamcrest==2.0.2 -pyOpenSSL==20.0.0 -PyPDF2==1.26.0 python-bidi==0.4.2 python-dateutil==2.6.0 python-magic-bin==0.4.14 pytz==2019.3 -Radicale==1.1.1 -reportlab==3.5.56 requests==2.22.0 requests-oauthlib==1.3.0 -service-identity==18.1.0 -six==1.13.0 -sqlparse==0.3.0 -TatSu==5.5.0 -Twisted==20.3.0 -txaio==20.4.1 -ua-parser==0.10.0 -urllib3==1.25.7 -user-agents==2.2.0 webcolors==1.10 -webencodings==0.5.1 xhtml2pdf==0.2.5 -zope.interface==5.2.0 diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index 2be237d..c3a2f21 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 8ce065f..5ffa660 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -1038,7 +1038,14 @@ def getBaseURLIcsExAll(agency): - +@register.simple_tag +def getTrialDays(agency): + today = date.today() + regdate = agency.registerdate + + remainingdays = regdate - today + + return remainingdays.days diff --git a/timemanagement/templates/timemanagement/timemanagement_management.html b/timemanagement/templates/timemanagement/timemanagement_management.html index 1e55c8d..cf23714 100644 --- a/timemanagement/templates/timemanagement/timemanagement_management.html +++ b/timemanagement/templates/timemanagement/timemanagement_management.html @@ -216,6 +216,42 @@ $('#absencetabs a').on('click', function (e) { {% endif %} + + + + + {% for workday in workdays %} @@ -244,9 +279,14 @@ $('#absencetabs a').on('click', function (e) { action : "remove_workday", workday: {{workday.pk}}, }, + beforeSend: function(){ + $("#confirm-delete_{{workday.pk}}").modal("toggle"); + }, success: function( data ) { - location.href = location.href; + $('#confirm-delete_{{workday.pk}}').on('hidden.bs.modal', function (e) { + $("#errorDelWorkday").modal("toggle"); + }); } }); }); diff --git a/timemanagement/templates/timemanagement/timemanagement_singleview.html b/timemanagement/templates/timemanagement/timemanagement_singleview.html index b3e4a52..5dc2fda 100644 --- a/timemanagement/templates/timemanagement/timemanagement_singleview.html +++ b/timemanagement/templates/timemanagement/timemanagement_singleview.html @@ -4,7 +4,7 @@ - + {% loadmonthwork next_month user as monthwork %} Gesamtarbeitszeit dieser Monat: {{monthwork}} Stunden
{% loadaccounttime user as actualaccounttime %} @@ -15,9 +15,7 @@ -{{actualaccounttime.0}} Stunden {% endif %}
- -
diff --git a/timemanagement/templates/timemanagement/timemanagement_teamview_single.html b/timemanagement/templates/timemanagement/timemanagement_teamview_single.html index 6b0652b..be72813 100644 --- a/timemanagement/templates/timemanagement/timemanagement_teamview_single.html +++ b/timemanagement/templates/timemanagement/timemanagement_teamview_single.html @@ -10,7 +10,7 @@ - + {% loadmonthwork next_month user as monthwork %} Gesamtarbeitszeit dieser Monat: {{monthwork}} Stunden
{% loadaccounttime user as actualaccounttime %} @@ -411,6 +411,42 @@ + + + + + {% for workday in workdays %} @@ -439,9 +474,14 @@ action : "remove_workday", workday: {{workday.pk}}, }, + beforeSend: function(){ + $("#confirm-delete_{{workday.pk}}").modal("toggle"); + }, success: function( data ) { - location.href = location.href; + $('#confirm-delete_{{workday.pk}}').on('hidden.bs.modal', function (e) { + $("#errorDelWorkday").modal("toggle"); + }); } }); }); diff --git a/timemanagement/views.py b/timemanagement/views.py index cdfc2e0..6331e93 100644 --- a/timemanagement/views.py +++ b/timemanagement/views.py @@ -642,13 +642,16 @@ def TimeAjax(request): } # REMOVE WORKDAY elif request.GET["action"] == "remove_workday": - wd = Workday.objects.get(pk=request.GET.get("workday")) - if(wd.agency == request.user.profile.agency): - wd.delete() - data = { - "success" : True - } - else: + try: + wd = Workday.objects.get(pk=request.GET.get("workday")) + if(wd.agency == request.user.profile.agency): + wd.delete() + data = { + "success" : True + } + else: + data = { "success" : False} + except: data = { "success" : False} # REMOVE BREAK elif request.GET["action"] == "remove_break": diff --git a/users/templates/users/base.html b/users/templates/users/base.html index aa2213e..c61b0a1 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -90,6 +90,9 @@ + + +
@@ -97,6 +100,34 @@