BUGS
This commit is contained in:
parent
77ab97f54a
commit
99116da8d3
|
|
@ -68,8 +68,8 @@
|
||||||
<div class="col-3" style="margin-top: -25px; margin-left: -8px;">
|
<div class="col-3" style="margin-top: -25px; margin-left: -8px;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% for user in usersofagency %}
|
{% for user in usersofagency %}
|
||||||
<div class="card hoverchatcard" id="userchat_{{user.pk}}">
|
<div class="card hoverchatcard" id="userchat_{{user.pk}}" style="">
|
||||||
<div class="card-body" style="margin: -15px !important;" >
|
<div class="card-body " style="" >
|
||||||
<div style="float: left;" class="col-12 ">
|
<div style="float: left;" class="col-12 ">
|
||||||
<div class='icon-container mr-2'>
|
<div class='icon-container mr-2'>
|
||||||
<img class="img-profile roundimg" src="{{ user.profile.get_photo_url }}">
|
<img class="img-profile roundimg" src="{{ user.profile.get_photo_url }}">
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
{% for chatroom in chatrooms %}
|
{% for chatroom in chatrooms %}
|
||||||
{% if user in chatroom.chatmembers.all or user in chatroom.chatmembers_admin.all or user == chatroom.creator and chatroom.chatroomtype == 1 %}
|
{% if user in chatroom.chatmembers.all or user in chatroom.chatmembers_admin.all or user == chatroom.creator and chatroom.chatroomtype == 1 %}
|
||||||
<div class="card hoverchatcard" id="groupchat_{{chatroom.pk}}">
|
<div class="card hoverchatcard" id="groupchat_{{chatroom.pk}}">
|
||||||
<div class="card-body" style="margin: -15px !important;">
|
<div class="card-body" style="">
|
||||||
<div style="float: left;" class="col-12 ">
|
<div style="float: left;" class="col-12 ">
|
||||||
<h5 class="mt-3">{{chatroom.roomname}}
|
<h5 class="mt-3">{{chatroom.roomname}}
|
||||||
</h5>
|
</h5>
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,4 @@ class UserNotification(models.Model):
|
||||||
# Eventuell automatisches Lösch-Datum
|
# Eventuell automatisches Lösch-Datum
|
||||||
#willdeleted = models.DateTimeField(default=timezone.now()+timedelta(days=30))
|
#willdeleted = models.DateTimeField(default=timezone.now()+timedelta(days=30))
|
||||||
# Textcontent
|
# Textcontent
|
||||||
notificationtext = models.CharField(max_length=5000, blank=True)
|
notificationtext = models.CharField(max_length=15000, blank=True)
|
||||||
Binary file not shown.
|
|
@ -39,7 +39,6 @@ def has_group_byname(user, groupname):
|
||||||
agroup = AgencyGroup.objects.filter(agency=user.profile.agency, agencygroupname=groupname)[0]
|
agroup = AgencyGroup.objects.filter(agency=user.profile.agency, agencygroupname=groupname)[0]
|
||||||
for g in user.groups.all():
|
for g in user.groups.all():
|
||||||
if g.name == agroup.group.name:
|
if g.name == agroup.group.name:
|
||||||
print("HIER")
|
|
||||||
in_group = True
|
in_group = True
|
||||||
|
|
||||||
return in_group
|
return in_group
|
||||||
|
|
@ -523,9 +522,9 @@ def getUserIsRep(user):
|
||||||
# Check, if a user is behind a day in agency (working startdate)
|
# Check, if a user is behind a day in agency (working startdate)
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def startdatecheck(usertocheck, day):
|
def startdatecheck(usertocheck, day):
|
||||||
uertime = list(UserTime.objects.filter(user=usertocheck))[0]
|
usertime = list(UserTime.objects.filter(user=usertocheck))[0]
|
||||||
|
|
||||||
if uertime.startdate < day:
|
if usertime.startdate != None and usertime.startdate < day:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
|
|
@ -429,6 +429,8 @@ function recalculateChoosenDays(userid=false){
|
||||||
$("#id_end").data("DateTimePicker").date(date_end);
|
$("#id_end").data("DateTimePicker").date(date_end);
|
||||||
|
|
||||||
localStorage.setItem("ab_userid", userid);
|
localStorage.setItem("ab_userid", userid);
|
||||||
|
$("#id_userid").val(userid);
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ def AbsenceManagmenet(request, activemonth=False, activeyear=False):
|
||||||
formtocheck = AddAbsence(request.POST, instance=request.user)
|
formtocheck = AddAbsence(request.POST, instance=request.user)
|
||||||
if(formtocheck.is_valid()):
|
if(formtocheck.is_valid()):
|
||||||
|
|
||||||
try:
|
#try:
|
||||||
workinguser = UserFullName.objects.get(pk=formtocheck.cleaned_data["userid"])
|
workinguser = UserFullName.objects.get(pk=formtocheck.cleaned_data["userid"])
|
||||||
|
|
||||||
# DIFFERENT USER AGENCY
|
# DIFFERENT USER AGENCY
|
||||||
|
|
@ -170,9 +170,9 @@ def AbsenceManagmenet(request, activemonth=False, activeyear=False):
|
||||||
#newab = Absence(agency=request.user.profile.agency, user=workinguser, start=formtocheck.cleaned_data["start"],end=formtocheck.cleaned_data["end"], representator=rep, confirm_status=confirmstat, info=formtocheck.cleaned_data["info"], reason=formtocheck.cleaned_data["reason"], start_ishalf=formtocheck.cleaned_data["start_ishalf"], end_ishalf=formtocheck.cleaned_data["end_ishalf"]).save()
|
#newab = Absence(agency=request.user.profile.agency, user=workinguser, start=formtocheck.cleaned_data["start"],end=formtocheck.cleaned_data["end"], representator=rep, confirm_status=confirmstat, info=formtocheck.cleaned_data["info"], reason=formtocheck.cleaned_data["reason"], start_ishalf=formtocheck.cleaned_data["start_ishalf"], end_ishalf=formtocheck.cleaned_data["end_ishalf"]).save()
|
||||||
newab = Absence(agency=request.user.profile.agency, user=workinguser, start=formtocheck.cleaned_data["start"],end=formtocheck.cleaned_data["end"], representator=rep, confirm_status=confirmstat, info=formtocheck.cleaned_data["info"], reason=formtocheck.cleaned_data["reason"], startday_info=formtocheck.cleaned_data["startday_info"], endday_info=formtocheck.cleaned_data["endday_info"]).save()
|
newab = Absence(agency=request.user.profile.agency, user=workinguser, start=formtocheck.cleaned_data["start"],end=formtocheck.cleaned_data["end"], representator=rep, confirm_status=confirmstat, info=formtocheck.cleaned_data["info"], reason=formtocheck.cleaned_data["reason"], startday_info=formtocheck.cleaned_data["startday_info"], endday_info=formtocheck.cleaned_data["endday_info"]).save()
|
||||||
# USER NOT FOUND
|
# USER NOT FOUND
|
||||||
except:
|
#except:
|
||||||
messages.success(request, f'Fehler bei Abwesenheitsbearbeitung! Bitte wenden Sie sich an den Support.')
|
# messages.success(request, f'Fehler bei Abwesenheitsbearbeitung! Bitte wenden Sie sich an den Support.')
|
||||||
return redirect('tma-management', formtocheck.cleaned_data['activemonth'], formtocheck.cleaned_data['activeyear'])
|
# return redirect('tma-management', formtocheck.cleaned_data['activemonth'], formtocheck.cleaned_data['activeyear'])
|
||||||
|
|
||||||
return redirect('tma-management', formtocheck.cleaned_data['activemonth'], formtocheck.cleaned_data['activeyear'])
|
return redirect('tma-management', formtocheck.cleaned_data['activemonth'], formtocheck.cleaned_data['activeyear'])
|
||||||
else:
|
else:
|
||||||
|
|
@ -1066,13 +1066,11 @@ def calculateHolidays(request, start, end, start_half, end_half, user):
|
||||||
weekdays = []
|
weekdays = []
|
||||||
freedaycounter = 0
|
freedaycounter = 0
|
||||||
for dt in daterange(start, end):
|
for dt in daterange(start, end):
|
||||||
|
|
||||||
if dt.isoweekday() not in weekdays:
|
if dt.isoweekday() not in weekdays:
|
||||||
counter += 1
|
counter += 1
|
||||||
for freeday in allfreedays.all():
|
for freeday in allfreedays.all():
|
||||||
if(dt == freeday.day):
|
if(dt == freeday.day):
|
||||||
freedaycounter += 1
|
freedaycounter += 1
|
||||||
|
|
||||||
# Prüfung, ob der Mitarbeiter an diesem Tag überhaupt arbeitet. Wenn nicht, wird der Freedaycounter einfach erhöht
|
# Prüfung, ob der Mitarbeiter an diesem Tag überhaupt arbeitet. Wenn nicht, wird der Freedaycounter einfach erhöht
|
||||||
if(dt.isoweekday() == 1):
|
if(dt.isoweekday() == 1):
|
||||||
if user.usertime.wd_mo == 0.0:
|
if user.usertime.wd_mo == 0.0:
|
||||||
|
|
@ -1131,6 +1129,7 @@ def calculatingHolidaysByAbsence(request, absence):
|
||||||
# FREEDAY FOUND
|
# FREEDAY FOUND
|
||||||
if(dt == freeday.day):
|
if(dt == freeday.day):
|
||||||
freedaycounter += 1
|
freedaycounter += 1
|
||||||
|
|
||||||
# Prüfung, ob der Mitarbeiter an diesem Tag überhaupt arbeitet. Wenn nicht, wird der Freedaycounter einfach erhöht
|
# Prüfung, ob der Mitarbeiter an diesem Tag überhaupt arbeitet. Wenn nicht, wird der Freedaycounter einfach erhöht
|
||||||
stat = False
|
stat = False
|
||||||
if(dt.isoweekday() == 1):
|
if(dt.isoweekday() == 1):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue