add user preference: default report (#2430)

This commit is contained in:
Kevin Papst
2021-03-14 13:32:47 +01:00
committed by GitHub
parent 0a6ea6be42
commit c0378b4f51
16 changed files with 264 additions and 57 deletions

View File

@@ -15,8 +15,8 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'budget': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.budget'|trans},
'timeBudget': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.timeBudget'|trans},
'budget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.budget'|trans},
'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.timeBudget'|trans},
'team': {'class': 'text-center w-min', 'orderBy': false},
'visible': {'class': 'text-center hidden w-min'},
'actions': {'class': 'actions alwaysVisible'},
@@ -60,8 +60,20 @@
{{ tables.datatable_meta_column(entry, field) }}
</td>
{% endfor %}
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">{{ entry.budget|money((entry.project is null ? defaultCurrency : entry.project.customer.currency)) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">{{ entry.timeBudget|duration }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">
{% if entry.hasBudget() %}
{{ entry.budget|money((entry.project is null ? defaultCurrency : entry.project.customer.currency)) }}
{% else %}
&ndash;
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">
{% if entry.hasTimeBudget() %}
{{ entry.timeBudget|duration }}
{% else %}
&ndash;
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'team') }}">{{ widgets.badge_team_access(entry.teams) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'visible') }}">{{ widgets.label_visible(entry.visible) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">{{ actions.activity(entry, 'index') }}</td>

View File

@@ -26,8 +26,8 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'budget': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.budget'|trans},
'timeBudget': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.timeBudget'|trans},
'budget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.budget'|trans},
'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.timeBudget'|trans},
'team': {'class': 'text-center w-min', 'orderBy': false},
'visible': {'class': 'text-center hidden w-min'},
'actions': {'class': 'actions alwaysVisible'},
@@ -71,8 +71,20 @@
{{ tables.datatable_meta_column(entry, field) }}
</td>
{% endfor %}
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">{{ entry.budget|money(entry.currency) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">{{ entry.timeBudget|duration }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">
{% if entry.hasBudget() %}
{{ entry.budget|money(entry.currency) }}
{% else %}
&ndash;
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">
{% if entry.hasBudget() %}
{{ entry.timeBudget|duration }}
{% else %}
&ndash;
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'team') }}">{{ widgets.badge_team_access(entry.teams) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'visible') }}">{{ widgets.label_visible(entry.visible) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">{{ actions.customer(entry, 'index') }}</td>

View File

@@ -19,8 +19,8 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'budget': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.budget'|trans},
'timeBudget': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.timeBudget'|trans},
'budget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.budget'|trans},
'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.timeBudget'|trans},
'team': {'class': 'text-center w-min', 'orderBy': false},
'visible': {'class': 'text-center hidden w-min'},
'actions': {'class': 'actions alwaysVisible'},
@@ -57,8 +57,20 @@
{{ tables.datatable_meta_column(entry, field) }}
</td>
{% endfor %}
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">{{ entry.budget|money(entry.customer.currency) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">{{ entry.timeBudget|duration }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">
{% if entry.hasBudget() %}
{{ entry.budget|money(entry.customer.currency) }}
{% else %}
&ndash;
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">
{% if entry.hasBudget() %}
{{ entry.timeBudget|duration }}
{% else %}
&ndash;
{% endif %}
</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'team') }}">{{ widgets.badge_team_access(entry.teams) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'visible') }}">{{ widgets.label_visible(entry.visible) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">{{ actions.project(entry, 'index') }}</td>

View File

@@ -4,16 +4,16 @@
{% block report_title %}{{ 'report_project_view'|trans({}, 'reporting') }}{% endblock %}
{% set columns = {
'name': {'class': 'alwaysVisible'},
'today': {'class': 'text-nowrap text-right', 'title': 'daterangepicker.today'|trans({}, 'daterangepicker')},
'week': {'class': 'text-nowrap text-right', 'title': 'agendaWeek'|trans},
'month': {'class': 'text-nowrap text-right', 'title': 'month'|trans},
'durationTotal': {'class': 'hidden-md hidden-sm hidden-xs text-nowrap text-right', 'title': 'stats.durationTotal'|trans},
'name': {'class': 'alwaysVisible w-min'},
'today': {'class': 'text-nowrap text-center w-min', 'title': 'daterangepicker.today'|trans({}, 'daterangepicker')},
'week': {'class': 'text-nowrap text-center w-min', 'title': 'agendaWeek'|trans},
'month': {'class': 'text-nowrap text-center w-min', 'title': 'month'|trans},
'durationTotal': {'class': 'hidden-md hidden-sm hidden-xs text-nowrap text-center w-min', 'title': 'label.total'|trans},
'timeBudget': {'class': 'text-nowrap', 'title': 'label.timeBudget'|trans},
'budget': {'class': 'text-nowrap', 'title': 'label.budget'|trans},
'stateDuration': {'class': 'hidden-sm hidden-xs text-nowrap text-right', 'title': 'entryState.not_exported'|trans},
'stateMoney': {'class': 'hidden-sm hidden-xs text-nowrap text-right', 'title': 'entryState.not_exported'|trans},
'projectEnd': {'class': 'hidden-md hidden-sm hidden-xs hidden text-nowrap text-center', 'title': 'label.project_end'|trans},
'stateDuration': {'class': 'hidden-sm hidden-xs text-nowrap text-center w-min', 'title': 'label.not_exported'|trans},
'stateMoney': {'class': 'hidden-sm hidden-xs text-nowrap text-center w-min', 'title': 'label.not_invoiced'|trans},
'projectEnd': {'class': 'hidden-md hidden-sm hidden-xs hidden text-nowrap text-center w-min', 'title': 'label.project_end'|trans},
'comment': {'class': 'hidden-md hidden-sm hidden-xs hidden', 'title': 'label.comment'|trans},
} %}
{% set tableName = 'project_view_reporting' %}