Bugs von Basti
This commit is contained in:
parent
9bf58afc06
commit
3b662336a0
Binary file not shown.
|
|
@ -430,9 +430,9 @@ def getabscenceday(loggeduser, user, daytocheck):
|
|||
|
||||
returnstat = False
|
||||
if(loggeduser.has_perm("users.absencemanager")):
|
||||
absencedays = Absence.objects.filter(agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(agency=user.profile.agency, user=user, start__lt=daytocheck) & Absence.objects.filter(agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(agency=user.profile.agency, user=user, end=daytocheck)
|
||||
absencedays = Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, start__lt=daytocheck) & Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, end=daytocheck)
|
||||
else:
|
||||
absencedays = (Absence.objects.filter(agency=user.profile.agency, user=loggeduser, confirm_status=1) | Absence.objects.filter(agency=user.profile.agency, user=user, confirm_status=0)) & (Absence.objects.filter(agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(agency=user.profile.agency, user=user, start__lt=daytocheck) & Absence.objects.filter(agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(agency=user.profile.agency, user=user, end=daytocheck) )
|
||||
absencedays = (Absence.objects.filter(agency=user.profile.agency, user=loggeduser, confirm_status=1) | Absence.objects.filter(agency=user.profile.agency, user=user, confirm_status=0)) & (Absence.objects.filter(agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(agency=user.profile.agency, user=user, start__lt=daytocheck, confirm_status=0) & Absence.objects.filter(agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(agency=user.profile.agency, user=user, end=daytocheck, confirm_status=0) )
|
||||
if(len(absencedays) > 0):
|
||||
returnstat = list(absencedays)[0]
|
||||
|
||||
|
|
|
|||
|
|
@ -421,14 +421,18 @@ function recalculateChoosenDays(){
|
|||
$("#start_absence_contract").prop("disabled", false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
if(seldates.length == 1){
|
||||
$("#div_id_end").hide();
|
||||
$("#div_id_endday_info").hide();
|
||||
}
|
||||
else{
|
||||
$("#div_id_end").show();
|
||||
$("#div_id_endday_info").show();
|
||||
}
|
||||
|
||||
*/
|
||||
$("#div_id_end").show();
|
||||
$("#div_id_endday_info").show();
|
||||
/*}*/
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -523,10 +527,10 @@ function recalculateChoosenDaysAfterInit(){
|
|||
$("#start_absence_contract").prop("disabled", false);
|
||||
}
|
||||
|
||||
if(seldates.length == 1){
|
||||
$("#div_id_end").hide();
|
||||
$("#div_id_end_ishalf").hide();
|
||||
}
|
||||
//if(seldates.length == 1){
|
||||
$("#div_id_end").show();
|
||||
$("#div_id_end_ishalf").show();
|
||||
//}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -670,6 +674,3 @@ $( function() {
|
|||
});
|
||||
} );
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<td>{{forloop.counter}}</td>
|
||||
<td>{{break.start|date:"H:i"}}</td>
|
||||
<td>{{break.end|date:"H:i"}}</td>
|
||||
<td><button class="btn btn-secondary btn-sm " style="float: right" onclick="javascript:$('#confirm-delete_{{break.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button></td>
|
||||
<td><a class="btn btn-secondary btn-sm " style="float: right" onclick="javascript:$('#confirm-delete_{{break.pk}}').modal('toggle')"><small><i class="fas fa-trash" style="color: #000000"></i></small></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -134,8 +134,7 @@ def AbsenceManagmenet(request, activemonth=False, activeyear=False):
|
|||
if(request.method == "POST"):
|
||||
'''
|
||||
|
||||
Nachdem eine neue Abwesenheit gespeichert wurde, geht es zur normalen Seite zurück, jedoch mit den Daten des
|
||||
aktuell angezeigten Monate/Jahr
|
||||
Nachdem eine neue Abwesenheit gespeichert wurde, geht es zur normalen Seite zurück, jedoch mit den Daten des aktuell angezeigten Monate/Jahr
|
||||
|
||||
'''
|
||||
if(request.POST.get("form_type") == "absenceform"):
|
||||
|
|
|
|||
|
|
@ -170,6 +170,12 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
|
||||
<!--
|
||||
|
||||
TODO: Counter einfügen, der in der Navi zeigt, wie viele ausstehende Anträge es gibt
|
||||
|
||||
-->
|
||||
|
||||
{% if request.user.profile.agency.module_timemanagement %}
|
||||
{% if active_link == 'abscence' %}
|
||||
<li class="nav-item active">
|
||||
|
|
|
|||
Loading…
Reference in New Issue