{% sw_extends '@Storefront/storefront/layout/header/account-menu.html.twig' %}
{% block utilities_offcanvas_content %}
{% if employee and not isSalesRepresentative %}
<div class="customer-employee-menu">
{% block b2b_employee_menu %}
<div class="employee-information">
{% block b2b_employee_menu_information %}
{% block b2b_employee_menu_profile_header %}
<div class="account-menu-header">
{{ "account.profileLabel"|trans|sw_sanitize }}
</div>
{% endblock %}
{% block b2b_employee_menu_profile_content %}
<div class="employee-information-inner">
{% block b2b_employee_menu_profile_list %}
<ul class="list-unstyled">
{% block b2b_employee_menu_profile_list_name %}
<li>
<strong>{{ employee.title }} {{ employee.firstName }} {{ employee.lastName }}</strong>
</li>
{% endblock %}
{% block b2b_employee_menu_profile_list_email %}
<li><a href="mailto:{{ employee.email }}">{{ employee.email }}</a></li>
{% endblock %}
</ul>
{% endblock %}
</div>
{% endblock %}
{% block b2b_employee_menu_company_header %}
<div class="account-menu-header">
{{ "account.companyLabel"|trans|sw_sanitize }}
</div>
{% endblock %}
{% block b2b_employee_menu_company_content %}
<div class="employee-information-inner">
<ul class="list-unstyled">
{% block b2b_employee_menu_profile_list_company %}
<li>{{ context.customer.extensions.displayName.longName }}</li>
{% endblock %}
{% block b2b_employee_menu_profile_list_customer_number %}
<li>
{{ "account.customerNumber"|trans|sw_sanitize }} {{ context.customer.customerNumber }}
</li>
{% endblock %}
</ul>
{% block b2b_employee_menu_company_form %}
<form name="customer_selection"
id="customer_selection"
method="post" action="{{ path('frontend.b2b_change_customer') }}"
data-customer-selection-redirect-updater="true">
{% block b2b_employee_menu_company_form_csrf %}
{{ sw_csrf('frontend.b2b_change_customer') }}
{% endblock %}
{% block b2b_employee_menu_company_form_redirect %}
<div class="customer-selection-redirect-container">
<input name="redirectTo"
type="hidden"
value="{{ app.request.get('_route') }}"/>
{% for key, value in app.request.attributes.get('_route_params') %}
<input name="redirectParameters[{{ key }}]"
type="hidden"
value="{{ value }}">
{% endfor %}
</div>
{% endblock %}
{% block b2b_employee_menu_company_form_select %}
<select class="custom-select custom-select-sm" name="customer_id" onchange="this.form.submit()">
{% for entry in employee.customers %}
{% if entry.active and (entry.admin or entry.roleId) %}
{% if entry.customer.id == context.customer.id %}
<option value="{{ entry.customer.id }}" selected>{{ entry.customer.customerNumber }}
- {{ entry.customer.extensions.displayName.longName }}</option>
{% else %}
<option value="{{ entry.customer.id }}">{{ entry.customer.customerNumber }} - {{ entry.customer.extensions.displayName.longName }}</option>
{% endif %}
{% endif %}
{% endfor %}
</select>
{% endblock %}
</form>
{% endblock %}
</div>
{% endblock %}
{% block b2b_employee_menu_contact_header %}
<div class="account-menu-header">
{{ "account.personalContactLabel"|trans|sw_sanitize }}
</div>
{% endblock %}
{% block b2b_employee_menu_contact_content %}
{% if contactPerson is defined %}
{% sw_include '@B2bSellersCore/storefront/layout/header/contact-slider.html.twig' %}
{% endif %}
{% endblock %}
{% endblock %}
</div>
{% endblock %}
{{ parent() }}
</div>
{% elseif isSalesRepresentative and not loggedInAsCustomer %}
{% block sales_representative_information %}
<h6>{{ "account.profileLabel"|trans|sw_sanitize }}</h6>
<div>{{ context.customer.firstName }} {{ context.customer.lastName }}</div>
<div class="mb-2">{{ context.customer.email }}</div>
{% endblock %}
{{ parent() }}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block layout_header_actions_account_widget_dropdown_login %}
{% if not context.customer %}
<div class="account-menu-login">
<a {% if b2bPlatformConfig.closedShop %}
href="{{ seoUrl(b2bPlatformConfig.closedShopRedirectTarget) }}"
{% else %}
href="{{ seoUrl('frontend.account.login') }}"
{% endif %}
title="{{ "account.loginSubmit"|trans|striptags }}"
class="btn btn-primary account-menu-login-button">
{{ "account.loginSubmit"|trans|sw_sanitize }}
</a>
<div class="account-menu-register">
{{ "account.orRegister"|trans|sw_sanitize }}
<a {% if b2bPlatformConfig.closedShop %}
href="{{ seoUrl('frontend.b2b_account.registration.page') }}"
{% else %}
href="{{ seoUrl('frontend.account.login') }}"
{% endif %}
title="{{ "account.orRegisterLink"|trans|striptags }}">
{{ "account.orRegisterLink"|trans|striptags }}
</a>
</div>
</div>
{% endif %}
{% endblock %}