{% from 'macros/navigation.html' import navigation with context %} {% from 'macros/show_notifications.html' import show_notifications %} Workers Control {% block style %} {% endblock %} {% set user_type = session.get('user_type') %} {% if user_type in ['company', 'member', 'accountant'] %} {% set brand_url = url_for('main_user.account_details') %} {% set brand_label = current_user.name|truncate(20, True) %} {% set is_anonymous = false %} {% if user_type == 'company' %} {% set brand_icon = 'industry' %} {% set dashboard_url = url_for('main_company.dashboard') %} {% elif user_type == 'member' %} {% set brand_icon = 'user' %} {% set dashboard_url = url_for('main_member.dashboard') %} {% else %} {% set brand_icon = 'book' %} {% set dashboard_url = url_for('main_accountant.dashboard') %} {% endif %} {% else %} {% set brand_url = url_for('auth.start') %} {% set brand_label = 'Workers Control' %} {% set brand_icon = none %} {% set dashboard_url = none %} {% set is_anonymous = true %} {% endif %} {% call navigation( brand_url=brand_url, brand_label=brand_label, brand_icon=brand_icon, dashboard_url=dashboard_url, is_anonymous=is_anonymous) %} {% block navbar_start %} {% endblock navbar_start %} {% endcall %} {{ show_notifications() }}
{% block content %} {% endblock content %}