{% set isSimple = project_setting(project, 'project_flow_type') == 'simple' %} {% set progress = project.progress|default(0) %} {% set barColor = progress < 33 ? 'bg-danger' : (progress < 66 ? 'bg-warning' : 'bg-success') %} {% set isDraft = project.status == constant('App\\Domain\\Registry\\StatusRegistry::PROJECT_STATUS_DRAFT') %}
{{ isSimple ? 'SIMPLE' : 'BUILD' }} {{ project.department ? project.department.abbreviation : project.organization.abbreviation }}
{{ project.status|trans|upper }}
{{ project.acronym }} {{ project.name }}
Début
{{ project.startDate|date('d') }} {{ project.startDate|date('M')|trans }} {{ project.startDate|date('Y') }}
Fin
{{ project.endDate|date('d') }} {{ project.endDate|date('M')|trans }} {{ project.endDate|date('Y') }}
Budget
{{ project.totalBudget|format_currency(project.currency ?? 'CFA', {fraction_digit: 0}) }}
Responsable
{% if project.responsible is not null %} {% else %} {% endif %}
Suivi
{% if project.monitor is not null %} {% else %} {% endif %}
{% include "partials/_wishlist_btn.html.twig" with {wishlist: project.isWishlist, type: 'project', acronym: project.acronym} %}
{% if not isDraft %}
{# ========================= Avancement (left) ========================= #}
Avancement {{ progress }}%
{{ problemCounts[project.id] }} {{ riskCounts[project.id] }}
{# ========================= Budget (right) ========================= #}
{# Chart column #}
{{ project.totalBudget }}, {{ project.getTotalCommittedBudget }}, {{ project.totalDisbursedBudget }}
{# Legend column #}
Alloué {{ project.totalBudget|minify_budget }}
{% if project.totalBudget > 0 %}
Engagé {{ project.getTotalCommittedBudget|minify_budget }} ({{ (project.getTotalCommittedBudget / project.totalBudget * 100)|round(1, 'floor') }}%)
Décaissé {{ project.totalDisbursedBudget|minify_budget }} ({{ (project.totalDisbursedBudget / project.totalBudget * 100)|round(1, 'floor') }}%)
{% endif %}
{% else %}
Brouillon — non démarré
{% endif %}
{% if project.createdBy.id == app.user.id and project.status == 'draft' %} {% endif %}