financial year setting + new users working time per year report (#2547)
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}
|
||||
{% block page_search %}{{ search.searchModal(toolbarForm) }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.users('index') }}{% endblock %}
|
||||
{% block page_icon %}{{ 'user'|icon }}{% endblock %}
|
||||
|
||||
{% block main_before %}
|
||||
{{ tables.data_table_column_modal(tableName, columns, 'kimai.userUpdate') }}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.user(user, tab) }}{% endblock %}
|
||||
{% block page_icon %}{{ 'user'|icon }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row">
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{% for year,yearStat in years %}
|
||||
{% for year, yearStat in years %}
|
||||
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||
{% block box_title %}{{ year }}{% endblock %}
|
||||
@@ -100,21 +100,33 @@
|
||||
backgroundColor: '{{ kimai_context.chart.background_color }}',
|
||||
borderColor: '{{ kimai_context.chart.border_color }}',
|
||||
data: [
|
||||
{% for month in yearStat.months %}
|
||||
{{ (month.totalDuration / 3600)|number_format(2, '.', '') }}
|
||||
{% if not loop.last %},{% endif %}
|
||||
{% for monthNumber in 1..12 %}
|
||||
{% set duration = 0 %}
|
||||
{% set month = yearStat.month(monthNumber) %}
|
||||
{% if month is not null %}
|
||||
{% set duration = month.totalDuration %}
|
||||
{% endif %}
|
||||
{{ (duration / 3600)|number_format(2, '.', '') }}
|
||||
{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
realData: [
|
||||
{% for month in yearStat.months %}
|
||||
{% set realDayData = {duration: month.totalDuration|duration, billable: month.billableDuration|duration} %}
|
||||
{% for monthNumber in 1..12 %}
|
||||
{% set duration = 0 %}
|
||||
{% set billable = 0 %}
|
||||
{% set month = yearStat.month(monthNumber) %}
|
||||
{% if month is not null %}
|
||||
{% set duration = month.totalDuration %}
|
||||
{% set billable = month.billableDuration %}
|
||||
{% endif %}
|
||||
{% set realDayData = {'duration': duration|duration, 'billable': billable|duration} %}
|
||||
{{ realDayData|json_encode|raw }}
|
||||
{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
monthData: [
|
||||
{% for month in yearStat.months %}
|
||||
'{{ yearStat.year }}-{{ month.month|length == 1 ? '0'~ month.month : month.month }}-01'
|
||||
{% for monthNumber in 1..12 %}
|
||||
'{{ yearStat.year }}-{{ monthNumber < 10 ? '0' ~ monthNumber : monthNumber }}-01'
|
||||
{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user