added API for handling work contract times (#4016)
This commit is contained in:
@@ -514,4 +514,17 @@
|
||||
KimaiReloadPageWidget.create('{{ events }}', {% if full_reload is same as true %}true{% else %}false{% endif %});
|
||||
});
|
||||
</script>
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro work_times_result(should, actual, decimal) %}
|
||||
{% set result = actual - should %}
|
||||
{% if result == 0 %}
|
||||
<span class="work_time_exact">{{ result|duration(decimal) }}</span>
|
||||
{% elseif should == 0 and actual > 0 %}
|
||||
<span class="work_time_positive text-green">+{{ actual|duration(decimal) }}</span>
|
||||
{% elseif result < 0 %}
|
||||
<span class="work_time_negative text-red">{{ result|duration(decimal) }}</span>
|
||||
{% else %}
|
||||
<span class="work_time_positive text-green">+{{ result|duration(decimal) }}</span>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user