{% sw_extends '@Storefront/storefront/layout/header/account-menu.html.twig' %}
{% block layout_header_actions_account_widget_dropdown_links %}
{% set headerWidget = true %}
{% if not b2bSuite %}
{{ parent() }}
{% else %}
<div class="account-menu-links">
<div class="{% if not headerWidget %}account-aside{% else %}header-account-menu{% endif %}">
<div class="card account-menu-inner">
{% if (context.currentCustomerGroup.id != config('ProclaneWegmannThemeExtend.config.hideMenuForCustomerGroup')) %}
{% block page_account_sidebar_header %}
{% if not headerWidget %}
<div class="card-header account-aside-header">
{{ "account.greetings"|trans|sw_sanitize }}
{{ context.customer.title }}
{{ context.customer.firstName }}
{{ context.customer.lastName }}
</div>
{% endif %}
{% endblock %}
{% block page_account_sidebar_menu %}
{% if not context.customer.guest %}
<div class="list-group list-group-flush account-aside-list-group">
{% block page_account_sidebar_menu_inner %}
{% if isSalesRep %}
{% set links = [{
name: "ClientOverview",
route: "b2bsalesrepresentative"
}, {
name: "MyAccount",
route: "b2baccount"
}]
%}
{% else %}
{% set links = [{
name: "Dashboard",
route: "b2bdashboard"
}, {
name: "Company",
route: "b2bcompany"
}, {
name: "Statistic",
route: "b2bstatistic"
}, {
name: "Orders",
route: "b2border"
}, {
name: "OrderList",
route: "b2borderlist"
}, {
name: "FastOrder",
route: "b2bfastorder"
}, {
name: "Offer",
route: "b2boffer",
}, {
name: "OrderNumber",
route: "b2bordernumber"
}, {
name: "MyAccount",
route: "b2baccount"
}]
%}
{% endif %}
{% for link in links %}
{% if b2b_acl_check(link.route, 'index') and not link.disabled %}
{% if (not ((link.route == 'b2bordernumber') and (config("ProcHideUnneededElements.config.hideCustomerOrdernumber") == true))) and
(not ((link.route == 'b2boffer') and (config("ProcHideUnneededElements.config.hideOfferInCheckout") == true))) and
(not ((link.route == 'b2bstatistic') and (config("ProcHideUnneededElements.config.hideStatistic") == true))) %}
{% set link = {
route: (link.route starts with('frontend.')) ? link.route : 'frontend.b2b.' ~ link.route ~ '.index',
name: ('.' in link.name) ? link.name : 'b2b.' ~ link.name,
component: link.route
}
%}
<a
href="{{ path(link.route) }}"
title="{{ link.name|trans }}"
class="list-group-item list-group-item-action account-aside-item{% if activeRoute is same as(link.route) %} is-active{% endif %} {{ b2b_acl(link.component, 'index') }}"
>
{{ link.name|trans }}
</a>
{% endif %}
{% endif %}
{% endfor %}
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% endif %}
{% if (context.currentCustomerGroup.id == config('ProclaneWegmannThemeExtend.config.hideMenuForCustomerGroup')) %}
{% set categoryId = config("ProclaneWegmannThemeExtend.config.redirectCustomerToCategory") %}
{% set categoryName = "account.menu.redirectCustomerToCategorySnippet"|trans %}
<a
href="{{ seoUrl('frontend.navigation.page', { navigationId: categoryId }) }}"
title= {{categoryName}}
class="list-group-item list-group-item-action account-aside-item{% if page.navigationId is same as(categoryId) %} is-active{% endif %}"
>
{{categoryName}}
</a>
{% endif %}
{% block page_account_sidebar_footer %}
{% if context.customer %}
{% if not context.customer.guest %}
<div class="card-footer account-aside-footer">
{% block page_account_sidebar_logout %}
<a href="{{ path('frontend.account.logout.page') }}"
class="btn btn-link account-aside-btn">
{% sw_icon 'log-out' %}
{{ "account.logout"|trans|sw_sanitize }}
</a>
{% endblock %}
</div>
{% else %}
<div class="card-footer account-aside-footer account-guest-abort">
{% block page_account_sidebar_guest_abort %}
<a href="{{ path('frontend.account.logout.page') }}"
data-account-guest-abort-button="true"
class="btn btn-link account-aside-btn">
{% sw_icon 'log-out' %}
{{ "account.guestAbort"|trans|sw_sanitize }}
</a>
{% endblock %}
</div>
{% endif %}
{% endif %}
{% endblock %}
</div>
</div>
</div>
{% endif %}
{% endblock %}