Zeiterfassung für QS bereit
This commit is contained in:
parent
1702272929
commit
e8ec54e7f5
|
|
@ -12,14 +12,12 @@
|
|||
<!-- TODO: Hier noch Jahr speichern und Monat usw. -->
|
||||
<div class="btn-group" role="group" aria-label="" style="min-width: 100% !important">
|
||||
<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="">{{active_month}} {{active_year}}</button>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive ">
|
||||
<table class="table table-hover" id="table_timemanagement" >
|
||||
<thead>
|
||||
|
|
@ -138,6 +136,53 @@
|
|||
|
||||
|
||||
|
||||
<div class="modal fade" tabindex="-1" id="fastjumpmodal" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Zeitraum auswählen</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlSelect1">Jahr auswählen</label>
|
||||
{% getsomeyears active_year as years %}
|
||||
<select class="form-control" id="choosenyear">
|
||||
{% for y in years %}
|
||||
<option val="{{y}}" {% if y == active_year %} selected {% endif %}>{{y}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% getsomemonths as months %}
|
||||
{% for m in months %}
|
||||
<button class="btn
|
||||
{% if forloop.counter == activemonth %} btn-primary {% else %} btn-secondary {% endif %}
|
||||
btn-sm mr-2 mb-2" onclick="javascript:goFastToMonth({{forloop.counter}})">{{m}}</button>
|
||||
{% endfor %}
|
||||
</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">
|
||||
var choosenyear = "{{active_year}}";
|
||||
function goFastToMonth(month){
|
||||
location.href = "/tm/" + month +"/" + choosenyear
|
||||
}
|
||||
|
||||
document.getElementById("choosenyear").addEventListener("change", function(){
|
||||
choosenyear = $('#choosenyear :selected').val();
|
||||
})
|
||||
|
||||
function fastChangeModal(){
|
||||
$("#fastjumpmodal").modal("toggle");
|
||||
}
|
||||
</script>
|
||||
|
||||
{% if user.usertime.usetime_start == None %}
|
||||
<div class="modal fade" tabindex="-1" role="dialog" data-backdrop="static" id="missingdatainfo">
|
||||
|
|
|
|||
|
|
@ -325,8 +325,9 @@ def TimeManagement(request, activemonth=False, activeyear=False):
|
|||
"prev_month" : prev_month,
|
||||
"next_year" : next_year,
|
||||
"prev_year" : prev_year,
|
||||
"active_year" : active_year,
|
||||
"active_year" : int(active_year),
|
||||
"active_month" : active_month,
|
||||
"activemonth" : activemonth,
|
||||
"active_link" : "timemanagement",
|
||||
"days_this_month" : get_datetime_range(int(active_year), int(activemonth)),
|
||||
"workdays" : Workday.objects.filter(agency=request.user.profile.agency, user=request.user, start__month=activemonth, start__year=active_year).order_by("start").exclude(end=None),
|
||||
|
|
|
|||
Loading…
Reference in New Issue