src/Flexy/FrontBundle/Themes/IlaveU/templates/admin/shopadmin/order/field/customer.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 order = entity.instance %}
{% if order.source == "old-mobile-app" %}
{{ field.formattedValue }}
{% for singleMetaData in order.metaData %}
{% if singleMetaData["key"] == "is_customer_new" %}
{% if singleMetaData["value"] == 1 %}
<span class="badge badge-success" >Nouveau !</span>
{% else %}
<span class="badge badge-danger" >Ancien</span>
{% endif %}
{% endif %}
{% endfor %}
{% else %}
{% if 'toMany' == field.customOptions.get('associationType') %}
<span class="badge badge-secondary">{{ field.formattedValue }}</span>
{% else %}
{% if field.value %}
{% if field.customOptions.get('relatedUrl') is not null %}
<a style="display:block;" href="{{ field.customOptions.get('relatedUrl') }}">{{ field.formattedValue }}
{% if field.value.orders|length > 1 and field.value.orders|first != entity.instance %}
<span class="badge badge-danger" >Ancien</span>
{% else %}
<span class="badge badge-success" >Nouveau !</span>
{% endif %}
</a>
{% else %}
{{ field.formattedValue }}
{% if field.value.orders|length > 1 and field.value.orders|first != entity.instance %}
<span class="badge badge-danger" >Ancien</span>
{% else %}
<span class="badge badge-success" >Nouveau !</span>
{% endif %}
{% endif %}
{% else %}
{{order.firstName}} {{order.lastName}}
{% endif %}
{% endif %}
{% endif %}