added project detail report (#2651)

- avatars via css only
- random colors for entities
- improves print view
- added colors for teams
- added color to tag
This commit is contained in:
Kevin Papst
2021-07-06 22:01:20 +02:00
committed by GitHub
parent cc6031bfde
commit 9ddb87a6fd
122 changed files with 2736 additions and 1549 deletions

View File

@@ -1,12 +1,12 @@
{% set type = options.type|default('bar') %}
{% set chart_id = options.id %}
{% set backgroundColor = kimai_context.chart.background_color %}
{% set gridColor = kimai_context.chart.grid_color %}
{% set backgroundColor = config('theme.chart.background_color') %}
{% set gridColor = config('theme.chart.grid_color') %}
{% set activities = data.activities %}
{% set data = data.data %}
<div class="chart">
<canvas id="{{ chart_id }}" style="height: {{ kimai_context.chart.height }}px;"></canvas>
<canvas id="{{ chart_id }}" style="height: {{ config('theme.chart.height') }}px;"></canvas>
</div>
<script type="text/javascript">
@@ -38,7 +38,7 @@
{%- for entry in day.details -%}
{% set loopId = (entry.project.id ~ '_' ~ entry.activity.id) %}
{%- if loopId == activityId -%}
{% set realDayData = (entry.duration / 3600)|number_format(2, '.', '') %}
{% set realDayData = entry.duration|chart_duration %}
{%- endif -%}
{%- endfor -%}
{%- if realDayData is not null -%}

View File

@@ -1,6 +1,6 @@
{% set backgroundColor = kimai_context.chart.background_color %}
{% set borderColor = kimai_context.chart.border_color %}
{% set gridColor = kimai_context.chart.grid_color %}
{% set backgroundColor = config('theme.chart.background_color') %}
{% set borderColor = config('theme.chart.border_color') %}
{% set gridColor = config('theme.chart.grid_color') %}
{% set colors = options.color|default('')|split(';') %}
{% set type = options.type|default('line') %}
{% if type not in ['line', 'bar'] %}
@@ -16,7 +16,7 @@
{% endif %}
<div class="chart">
<canvas id="timeChart" style="height: {{ kimai_context.chart.height }}px;"></canvas>
<canvas id="timeChart" style="height: {{ config('theme.chart.height') }}px;"></canvas>
</div>
<script type="text/javascript">
@@ -52,7 +52,7 @@ document.addEventListener('kimai.initialized', function() {
lineTension : 0.3,
data : [
{% for month in year.months %}
{{ (month.totalDuration / 3600)|number_format(2, '.', '') }}
{{ month.totalDuration|chart_duration }}
{% if not loop.last %},{% endif %}
{% endfor %}
],