{% extends 'base.html.twig' %} {% block title %}{{ ticket.reference }} - Support Bubul{% endblock %} {% block body %}
{% include '_molecules/settings-nav/settings-nav.html.twig' with { user: user, activePage: 'support' } only %}
{# Breadcrumb #}
{% include '_molecules/breadcrumb/breadcrumb.html.twig' with { homeHref: path('app_dashboard'), items: [ { label: 'Paramètres', href: path('app_settings') }, { label: 'Support', href: path('app_support_index') }, { label: ticket.reference } ] } only %}
{# Header #} {% set statusVariant = ticket.status == 'open' ? 'warning' : (ticket.status == 'in_progress' ? 'info' : 'success') %}
{{ ticket.reference }} {% include '_atoms/badge/badge.html.twig' with { label: ticket.categoryLabel, variant: 'neutral', size: 'xs' } only %} {% include '_atoms/badge/badge.html.twig' with { label: ticket.statusLabel, variant: statusVariant, size: 'xs', dot: true } only %}

{{ ticket.subject }}

Créé le {{ ticket.createdAt|date('d/m/Y à H:i') }}

{% include '_atoms/button/button.html.twig' with { label: 'Retour', variant: 'ghost', icon: 'arrow-left', size: 'sm', href: path('app_support_index') } only %}
{# Chat #}
{# Messages #}
{% for message in ticket.messages %} {% if message.isFromAdmin %} {# Message admin — gauche #}

{{ message.author.fullName ?: 'Équipe Bubul' }} · Équipe Bubul

{{ message.content }}

{{ message.createdAt|date('H:i · d/m/Y') }}

{% else %} {# Message utilisateur — droite #}
{{ message.content }}

{{ message.createdAt|date('H:i · d/m/Y') }}

{% endif %} {% endfor %}
{# Zone de réponse #}
{% if not ticket.isResolved %}
{% include '_atoms/button/button.html.twig' with { label: 'Envoyer', variant: 'primary', icon: 'send', type: 'submit', size: 'md' } only %}
{# Bouton résolu — séparé du formulaire de réponse #}
{% include '_atoms/button/button.html.twig' with { label: 'Marquer comme résolu', variant: 'ghost', icon: 'check', size: 'sm', type: 'submit' } only %}
{% else %}
{% include '_atoms/icon/icon.html.twig' with { name: 'check-circle', size: 'sm', color: 'success' } only %}

Ticket résolu

{% include '_atoms/button/button.html.twig' with { label: 'Rouvrir', variant: 'ghost', size: 'sm', type: 'submit' } only %}
{% endif %}
{% endblock %}