{% include "_icons.html" %} {% macro icon(name, cls='ic') -%}{%- endmacro %} {% set nav_list, nav_cur = nav_apps() if user else ([], none) %} {% set cur_app = (nav_list|selectattr('key', 'equalto', nav_cur)|first) if nav_cur else none %} {% set is_home = request.endpoint == 'home.index' %}
{% if not is_home %} {% endif %}
{% if not is_home %}{% endif %} {{ icon('apps') }} {% if is_home %}
{{ t('Lubwise ERP') }}{{ nm(company) if company else '' }}
{% else %}
{% if cur_app %}{{ t(cur_app.label) }}/{% endif %}{{ self.title() }}
{% endif %}
{% set vx_recent = recent_views() %}
{{ icon('history') }}
{% set aw = approvals_waiting() %} {{ icon('check') }}{% if aw[0] or aw[1] %}{{ aw[0] or aw[1] }}{% endif %} {{ 'English' if rtl else 'العربية' }}
{{ (user.full_name or user.username)[:1]|upper }} {{ user.full_name or user.username }}{{ t(user.role|capitalize) }}{{ icon('chevron', 'ic chev') }}
{% if session.get('weak_password') %}
{{ icon('shield') }}{{ t('You signed in with a demo password that is published. Change it now.') }} {{ t('Change password') }}
{% endif %} {% if license.read_only %}
{{ icon('alert') }}{{ t('The license has expired or is invalid. The system is read-only.') }}
{% endif %} {% with msgs = get_flashed_messages(with_categories=true) %} {% for cat, msg in msgs %}
{{ icon('alert' if cat == 'error' else 'check') }}{{ msg }}
{% endfor %} {% endwith %} {% block content %}{% endblock %}
{% block scripts %}{% endblock %}