Budget graph in project details (#3406)
* do not copy description if restarting via calendar * added support to display negative durations * fix charts for larger numbers
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
jQuery('#{{ tableId }}').on('change', function(ev) {
|
||||
jQuery(this).submit();
|
||||
});
|
||||
{% if project is not null %}
|
||||
renderChart('project{{ project.id }}Budget');
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
@@ -296,6 +299,14 @@
|
||||
{{ widgets.label_customer(project.customer) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr {{ widgets.project_row_attr(project) }}>
|
||||
<th class="w-min">
|
||||
{{ 'label.project'|trans }}
|
||||
</th>
|
||||
<td>
|
||||
{{ widgets.label_project(project) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="w-min">
|
||||
{{ 'stats.durationTotal'|trans }}
|
||||
@@ -309,11 +320,13 @@
|
||||
</th>
|
||||
<td>{{ project_view.rateTotal|money(currency) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="w-min">
|
||||
{{ 'label.billable'|trans }}
|
||||
</th>
|
||||
<td>{{ project_view.billableRate|money(currency) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<table class="table table-hover dataTable">
|
||||
<tr>
|
||||
<th class="w-min">
|
||||
{{ 'label.last_record'|trans }}
|
||||
@@ -352,13 +365,19 @@
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
{% if (showMoneyBudget and project.hasBudget()) or (showTimeBudget and project.hasTimeBudget()) %}
|
||||
{% from "project/charts.html.twig" import project_budget %}
|
||||
{{ project_budget(project, project_details, chartPrefix) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if (showMoneyBudget and project.budget > 0) or (showTimeBudget and project.timeBudget > 0) %}
|
||||
{% if (showMoneyBudget and project.hasBudget()) or (showTimeBudget and project.hasTimeBudget()) %}
|
||||
{% set budgetStats = project_details.budgetStatisticModel %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table class="table table-hover dataTable">
|
||||
{% if showTimeBudget and project.timeBudget > 0 %}
|
||||
{% if showTimeBudget and project.hasTimeBudget() %}
|
||||
<tr>
|
||||
<th class="w-min">
|
||||
{{ 'label.timeBudget'|trans }}
|
||||
@@ -371,7 +390,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if showMoneyBudget and project.budget > 0 %}
|
||||
{% if showMoneyBudget and project.hasBudget() %}
|
||||
<tr>
|
||||
<th class="w-min">
|
||||
{{ 'label.budget'|trans }}
|
||||
|
||||
Reference in New Issue
Block a user