added new permission to separate time and money budget (#3352)
This commit is contained in:
@@ -18,9 +18,17 @@
|
||||
('mf_' ~ field.name): {'title': field.label|trans, 'class': 'hidden-xs hidden-sm mf_' ~ field.name, 'orderBy': false}
|
||||
}) %}
|
||||
{% endfor %}
|
||||
{% if is_granted('budget_money', 'project') %}
|
||||
{% set columns = columns|merge({
|
||||
'budget': {'class': 'hidden-xs hidden-sm hidden text-right w-min', 'title': 'label.budget'|trans},
|
||||
}) %}
|
||||
{% endif %}
|
||||
{% if is_granted('budget_time', 'project') %}
|
||||
{% set columns = columns|merge({
|
||||
'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-right w-min', 'title': 'label.timeBudget'|trans},
|
||||
}) %}
|
||||
{% endif %}
|
||||
{% set columns = columns|merge({
|
||||
'budget': {'class': 'hidden-xs hidden-sm hidden text-right w-min', 'title': 'label.budget'|trans},
|
||||
'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-right 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,14 +68,14 @@
|
||||
</td>
|
||||
{% endfor %}
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">
|
||||
{% if entry.hasBudget() %}
|
||||
{% if entry.hasBudget() and is_granted('budget', entry) %}
|
||||
{{ entry.budget|money(entry.customer.currency) }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">
|
||||
{% if entry.hasTimeBudget() %}
|
||||
{% if entry.hasTimeBudget() and is_granted('time', entry) %}
|
||||
{{ entry.timeBudget|duration }}
|
||||
{% else %}
|
||||
–
|
||||
|
||||
Reference in New Issue
Block a user