{% extends 'base.html.twig' %} {% block title %}Gestion des offres - Admin{% endblock %} {% block body %}
{# Header #}
{% include '_molecules/page-header/page-header.html.twig' with { title: 'Offres commerciales', subtitle: 'Gérez les offres affichées dans le tableau des tarifs sur la page d\'accueil.', icon: 'tag', backHref: path('app_dashboard'), backLabel: 'Retour au dashboard' } only %}
{% include '_atoms/button/button.html.twig' with { label: 'Coûts réels', variant: 'ghost', size: 'lg', icon: 'bar-chart', href: path('admin_plan_tool_costs') } only %} {% include '_atoms/button/button.html.twig' with { label: 'Nouvelle offre', variant: 'primary', size: 'lg', icon: 'plus', href: path('admin_plan_new') } only %}
{# Compteur #}
{{ plans|length }} offre{{ plans|length > 1 ? 's' : '' }} enregistrée{{ plans|length > 1 ? 's' : '' }}
{# Tableau #}
{% for plan in plans %} {% else %} {% endfor %}
Ordre Nom Prix TTC Tokens/mois Recommandé Statut Actions
{{ plan.sortOrder }}

{{ plan.name }}

{% if plan.tagline %}

{{ plan.tagline }}

{% endif %}
{% if plan.priceAnnual %} {{ plan.priceAnnual }}€ /mois TTC {% else %} Sur mesure {% endif %} {{ plan.tokensLabel ?? (plan.monthlyTokens|number_format(0, ',', ' ')) }} {% if plan.isRecommended %} {% include '_atoms/badge/badge.html.twig' with { label: 'Oui', variant: 'success', size: 'sm' } only %} {% else %} {% endif %} {% if plan.isActive %} {% include '_atoms/badge/badge.html.twig' with { label: 'Active', variant: 'success', size: 'sm' } only %} {% else %} {% include '_atoms/badge/badge.html.twig' with { label: 'Masquée', variant: 'gray', size: 'sm' } only %} {% endif %}
{% include '_atoms/button/button.html.twig' with { variant: 'ghost', size: 'sm', icon: 'edit', href: path('admin_plan_edit', {id: plan.id}), attr: { title: 'Modifier' } } only %}
{% include '_atoms/button/button.html.twig' with { variant: 'ghost', size: 'sm', icon: 'trash', type: 'submit', attr: { title: 'Supprimer', class: 'text-error hover:text-error' } } only %}
{% include '_molecules/empty-state/empty-state.html.twig' with { title: 'Aucune offre enregistrée', description: 'Créez la première offre pour qu\'elle apparaisse dans le tableau des tarifs.', icon: 'tag', variant: 'minimal', actions: [{ label: 'Créer une offre', href: path('admin_plan_new'), variant: 'primary', icon: 'plus' }] } only %}
{% endblock %}