Bugs und Klimbims

This commit is contained in:
holger.trampe 2021-02-12 11:03:35 +01:00
parent ca80f69af2
commit 716ebf1362
8 changed files with 155 additions and 68 deletions

View File

@ -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

View File

@ -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

View File

@ -216,6 +216,42 @@ $('#absencetabs a').on('click', function (e) {
</script>
{% endif %}
<div class="modal fade" id="errorDelWorkday" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Arbeitstag gelöscht</h5>
</div>
<div class="modal-body">
Der Arbeitstag wurde vollständig entfernt.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="processWorkDay" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Arbeitstag wird gelöscht</h5>
</div>
<div class="modal-body">
Der Arbeitstag wird gelöscht. Bitte warten.
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('#errorDelWorkday').on('hidden.bs.modal', function (e) {
location.href = location.href;
})
</script>
{% for workday in workdays %}
<div class="modal fade" id="confirm-delete_{{workday.pk}}" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog">
@ -229,7 +265,6 @@ $('#absencetabs a').on('click', function (e) {
<div class="modal-footer">
<button class="btn btn-primary" id="dodel_{{workday.pk}}" >Löschen</button>
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div>
</div>
</div>
@ -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");
});
}
});
});

View File

@ -4,7 +4,7 @@
<a type="button" class="btn btn-primary mr-1" href="{% url 'tm-management' prev_month prev_year %}" ><i class="fas fa-arrow-circle-left"></i></a>
<button type="button" class="btn btn-primary mr-1" style="min-width: 150px !important;" onclick="javascript:fastChangeModal()">{{active_month}} {{active_year}}</button>
<a type="button" class="btn btn-primary mr-1" href="{% url 'tm-management' next_month next_year %}"><i class="fas fa-arrow-circle-right"></i></a>
<span style="text-align: right !important; width: 100%">
<span style="text-align: right !important; width: 100%; margin-top: -10px;">
{% loadmonthwork next_month user as monthwork %}
Gesamtarbeitszeit dieser Monat: {{monthwork}} Stunden<br />
{% loadaccounttime user as actualaccounttime %}
@ -15,9 +15,7 @@
<b><span style="color: red">-{{actualaccounttime.0}}&nbsp;Stunden</span></b>
{% endif %}
</span>
</div>
<hr>
<div class="table-responsive ">
<table class="table table-hover" id="table_timemanagement" >

View File

@ -10,7 +10,7 @@
<button type="button" class="btn btn-primary mr-1" style="min-width: 150px !important;" onclick="javascript:fastChangeModal()">{{active_month}} {{active_year}}</button>
<a type="button" class="btn btn-primary mr-1" href="{% url 'tm-team-single' user.pk next_month next_year %}"><i class="fas fa-arrow-circle-right"></i></a>
<span style="float: right !important; text-align: right; min-width: 82%; margin-bottom: -20px; margin-top: -10px; ">
<span style="text-align: right !important; width: 100%; margin-top: -10px;">
{% loadmonthwork next_month user as monthwork %}
Gesamtarbeitszeit dieser Monat: {{monthwork}} Stunden<br />
{% loadaccounttime user as actualaccounttime %}
@ -411,6 +411,42 @@
</div>
</div>
<div class="modal fade" id="errorDelWorkday" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Arbeitstag gelöscht</h5>
</div>
<div class="modal-body">
Der Arbeitstag wurde vollständig entfernt.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('#errorDelWorkday').on('hidden.bs.modal', function (e) {
location.href = location.href;
})
</script>
<div class="modal fade" id="processWorkDay" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Arbeitstag wird gelöscht</h5>
</div>
<div class="modal-body">
Der Arbeitstag wird gelöscht. Bitte warten.
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
{% for workday in workdays %}
<div class="modal fade" id="confirm-delete_{{workday.pk}}" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog">
@ -424,7 +460,6 @@
<div class="modal-footer">
<button class="btn btn-primary" id="dodel_{{workday.pk}}" >Löschen</button>
<button type="button" class="btn" data-dismiss="modal">Abbrechen</button>
</div>
</div>
</div>
@ -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");
});
}
});
});

View File

@ -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":

View File

@ -90,6 +90,9 @@
</head>
<body>
<!-- Page Wrapper -->
<div id="wrapper" >
@ -97,6 +100,34 @@
<!-- Sidebar -->
<ul class=" bg-gray-900 sidebar sidebar-dark accordion fixed-top " style="overflow: all; height: 100vh;"id="accordionSidebar">
{% if request.user.profile.agency.paymentplan == 0 %}
<style type="text/css">
.trail_arrow {
width: 0;
height: 0;
border-style: solid;
border-width: 90px 90px 0 0;
border-color: red transparent transparent transparent;
position: absolute;
z-index: 20;
}
.trail_font{
color: white;
font-size: 10pt;
transform: rotate(-45deg);
position: absolute;
margin-top: -65px;
margin-left: 0px;
}
</style>
<div class="trail_arrow">
{% getTrialDays request.user.profile.agency as trialdays %}
<span class="trail_font"><nobr><b>TRIAL ({{trialdays}})</b></nobr>
</span>
</div>
{% endif %}
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{% url 'users-dashboard' %}">
<!--<i class="fas fa-laptop"></i>
@ -364,6 +395,10 @@
}*/
</style>
<div id="content-wrapper">
<!-- Main Content -->
<!-- Topbar -->
<nav id="topnavbarmain" class="navbar navbar-expand navbar-light bg-white topbar fixed-top mb-4 static-top shadow" style="margin-left: 224px;">
@ -671,7 +706,23 @@ function clearSF(){
}
$("#search_string").keypress(function(e) {
//Enter key
if (e.keyCode === 13) {
// Cancel the default action, if needed
e.preventDefault();
console.log("DEFAULT")
// Trigger the button element with a click
}
});
$(document).ready(function(){
if($( window ).width() < 768)
{
$("#accordionSidebar").addClass("toggled");