50 lines
2.2 KiB
Twig
50 lines
2.2 KiB
Twig
{% set user = app.user %}
|
|
{#{% if data_provider.userHasInvites %}#}
|
|
{# <a href="{{ path('user_invites') }}">#}
|
|
{# <h4 class="p-0 m-0"><i class="bi bi-envelope text-light "></i></h4>#}
|
|
{# </a>#}
|
|
{#{% endif %}#}
|
|
{% if user.employees.empty %}
|
|
<a href="{{ path('client_new') }}" class="btn btn-success rounded-0 ms-auto">
|
|
Create client account
|
|
</a>
|
|
{% else %}
|
|
<div class="dropdown ms-auto me-2">
|
|
<button class="btn btn-light dropdown-toggle
|
|
rounded-0 ms-auto {{ client ? "opacity-5" : "opacity-3" }}"
|
|
type="button" id="client_dropdown"
|
|
data-bs-toggle="dropdown" aria-expanded="false">
|
|
{{ client ? client.name : 'Choose Customer Account' }}
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-end animate slideIn rounded-0"
|
|
aria-labelledby="client_dropdown">
|
|
{% for employee in user.employees %}
|
|
<li>
|
|
<a class="dropdown-item {{ ((client ? client.slug : "") == employee.client.slug) ? 'active' : '' }}"
|
|
href="{{ path ?? path(currentRoute, params|merge({'slug': employee.client.slug})) }}">
|
|
{{ employee.client.name }}
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<li>
|
|
<span class="text-danger dropdown-item">No Customer Accounts</span>
|
|
</li>
|
|
{% endfor %}
|
|
<hr class=" m-1">
|
|
<li><a class="dropdown-item text-danger" href="{{ path('home_index', {slug: '-'}) }}"><i
|
|
class="bi bi-times"></i> No client account</a></li>
|
|
<li><a class="dropdown-item text-success " href="{{ path('client_new') }}"><i
|
|
class="bi bi-plus"></i>
|
|
New
|
|
client account</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="channel_dropdown_widget">
|
|
{% include 'widgets/channel_dropdown_widget.html.twig' %}
|
|
</div>
|
|
{% if client_service.getClient %}
|
|
<div id="notification_holder" class="ms-1 d-inline-block">
|
|
{% include 'widgets/notifications_widget.html.twig' %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %} |