{% extends 'base.html.twig' %} {% block title %}Contrats{% endblock %} {% block body %}
| Contrat | Entreprise | Période | Utilisateurs | Tarif/licence | Tokens/mois | SAM | Statut |
|---|---|---|---|---|---|---|---|
| {{ contract.name }} | {# Entreprise #}{% if contract.company %} {{ contract.company.name }} {% else %} Non attribué {% endif %} | {# Période #}
{{ contract.startDate|date('d/m/Y') }} → {{ contract.endDate|date('d/m/Y') }}
{% if contract.isValid and contract.daysRemaining is defined and contract.daysRemaining <= 60 %}
{{ contract.daysRemaining }}j restants
{% endif %}
|
{# Utilisateurs max #}
{{ contract.maxUsers }} | {# Tarif #}
{{ contract.pricePerLicense|number_format(2, ',', ' ') }} €
TTC/mois
|
{# Tokens mensuels #}
{{ contract.monthlyTokens|number_format(0, ',', ' ') }} | {# SAM #}
{% set hasSam = contract.company is not null and contract.company.hasSamAccess %}
{% include '_atoms/logo/logo.html.twig' with { variant: 'simple', size: 'sm', tint: 'cohorts' } only %}
|
{# Statut #}
{% if not contract.isActive %} {% include '_atoms/badge/badge.html.twig' with { label: 'Désactivé', variant: 'neutral', size: 'sm' } only %} {% elseif contract.isExpired %} {% include '_atoms/badge/badge.html.twig' with { label: 'Expiré', variant: 'error', dot: true, size: 'sm' } only %} {% elseif contract.isUpcoming %} {% include '_atoms/badge/badge.html.twig' with { label: 'À venir', variant: 'info', dot: true, size: 'sm' } only %} {% elseif contract.isExpiringSoon(30) %} {% include '_atoms/badge/badge.html.twig' with { label: 'Expire bientôt', variant: 'warning', dot: true, size: 'sm' } only %} {% else %} {% include '_atoms/badge/badge.html.twig' with { label: 'Actif', variant: 'success', dot: true, size: 'sm' } only %} {% endif %} |