{% if app.user and app.user.availableCustomers %}
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="clientsDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">
Mes sociétés
</span>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in keep-open"
aria-labelledby="clientsDropdown">
<div id="header-clients">
<div class="d-flex align-items-center">
<h4>Liste de mes sociétés</h4>
<p class="h5">
<span class="ml-3 number-customers badge badge-main-color text-white">
{{ app.user.availableCustomers|length }}
</span>
</p>
</div>
<select class="multiple-clients" name="clients[]" multiple="multiple">
{% for customer in app.user.availableCustomers %}
<option value="{{ customer.code }}" {% if customer in app.user.customers %} selected {% endif %}>
{{ customer.label }}
</option>
{% endfor %}
</select>
<p class="mb-0 mt-2 d-flex justify-content-end">
<span class="btn-group">
<button class="btn btn-outline-secondary btn-sm all-customers">Tous</button>
<button class="btn btn-outline-secondary btn-sm clear-customers">Aucun</button>
</span>
<button class="btn btn-primary btn-sm ml-3 submit-customers">Valider</button>
</p>
</div>
</div>
</li>
{% endif %}