src/Flexy/ShopBundle/templates/orders/field/badgeText.html.twig line 1
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set badgeClass = "secondary" %}
{% if field.value == "proccessing" %}
{% set badgeClass = "secondary" %}
{% elseif field.value == "shipping" %}
{% set badgeClass = "warning" %}
{% elseif field.value == "shipped" %}
{% set badgeClass = "success" %}
{% elseif field.value == "cancelled" %}
{% set badgeClass = "danger" %}
{% endif %}
<span class="badge badge-{{badgeClass}}" >{{ field.formattedValue }}</span>