{% extends "layouts/base.twig" %} {% block title %}{{ translations.demand_detail_title | default('Détail de la demande') }} — {{ demand.getRef() }}{% endblock %} {% block head %} {{ parent() }} {% endblock %} {% block page_heading %}
{{ translations.back | default('Retour') }}

{{ translations.demand_ref | default('Demande') }} {{ demand.getRef() }}

{% include 'demands/partials/_status_badge.twig' with {status: demand.getStatus()} %}
{% endblock %} {% block content %}
{# ── Left column: demand data ───────────────────────────────── #}
{{ translations.demand_info | default('Informations') }}
{{ translations['type_' ~ demand.getType() | lower] | default(demand.getTypeLabel()) }}
{{ translations.requester | default('Demandeur') }}
{{ demand.getRequesterName() ?? '—' }}
{{ translations.shop | default('Magasin') }}
{{ demand.getShopName() ?? ('ID: ' ~ demand.getShopId()) }}
{{ translations.col_date | default('Date') }}
{{ demand.getCreatedAt() | date('d/m/Y H:i') }}
{{ translations.title | default('Titre') }}
{{ demand.getTitle() }}
{% if demand.getDescription() %}
{{ translations.description | default('Description') }}
{{ demand.getDescription() | nl2br }}
{% endif %} {% if demand.getType() == 'SOCIAL_MEDIA' %} {% if demand.getContentType() %}
{{ translations.content_type | default('Type contenu') }}
{{ demand.getContentType() }}
{% endif %} {% if demand.getPlatforms() | length > 0 %}
{{ translations.platforms | default('Plateformes') }}
{{ demand.getPlatforms() | join(', ') }}
{% endif %} {% if demand.getDeadlineDate() %}
{{ translations.deadline | default('Deadline') }}
{{ demand.getDeadlineDate() | date('d/m/Y') }}
{% endif %} {% if demand.getVisualNotes() %}
{{ translations.visual_notes | default('Notes visuelles') }}
{{ demand.getVisualNotes() | nl2br }}
{% endif %} {% elseif demand.getType() == 'NEW_PRODUCT' %} {% if demand.getCategory() %}
{{ translations.category | default('Catégorie') }}
{{ demand.getCategory() }}
{% endif %} {% if demand.getExpectedVolume() %}
{{ translations.expected_volume | default('Volume attendu') }}
{{ demand.getExpectedVolume() }}
{% endif %} {% if demand.getEstimatedPriceGross() %}
{{ translations.estimated_price_gross | default('Prix estimé TTC') }}
{{ demand.getEstimatedPriceGross() | number_format(2, ',', ' ') }} €
{% endif %} {% if demand.getContextMotivation() %}
{{ translations.context_motivation | default('Contexte / Motivation') }}
{{ demand.getContextMotivation() | nl2br }}
{% endif %} {% elseif demand.getType() == 'SAAS_DEV' %} {% if demand.getRole() %}
{{ translations.role | default('Rôle') }}
{{ demand.getRole() }}
{% endif %} {% if demand.getRequestTypes() | length > 0 %}
{{ translations.request_types | default('Types') }}
{{ demand.getRequestTypes() | join(', ') }}
{% endif %} {% if demand.getExpectedBenefit() %}
{{ translations.expected_benefit | default('Bénéfice attendu') }}
{{ demand.getExpectedBenefit() | nl2br }}
{% endif %} {% if demand.getPriority() %}
{{ translations.priority | default('Priorité') }}
{{ demand.getPriority() }}
{% endif %} {% if demand.getNotes() %}
{{ translations.notes | default('Notes') }}
{{ demand.getNotes() | nl2br }}
{% endif %} {% endif %}
{# Attachments #}
{{ translations.attachments | default('Pièces jointes') }}
{% include 'demands/partials/_attachments.twig' %}
{# Comments #}
{{ translations.comments | default('Commentaires') }}
{% include 'demands/partials/_comments.twig' %}
{% if isAdmin %} {% endif %}
{# ── Right column: status + history ─────────────────────────── #}
{% if isAdmin %}
{{ translations.change_status | default('Changer le statut') }}
{% endif %}
{{ translations.status_history | default('Historique des statuts') }}
{% if history is not empty %} {% for h in history %}
{{ h.getOldStatus() ? h.getOldStatus() ~ ' → ' : '' }}{{ h.getNewStatus() }}
{% if h.getComment() %}
{{ h.getComment() }}
{% endif %}
{{ h.getCreatedAt() | date('d/m/Y H:i') }}
{% endfor %} {% else %}

{{ translations.no_history | default('Pas encore d\'historique.') }}

{% endif %}
{% endblock %} {% block scripts %} {% endblock %}