{% extends "client_portal/base.html" %} {% from "components/ui.html" import page_header %} {% block title %}{{ _('Client Portal') }} - {{ client.name }}{% endblock %} {% block content %} {% set breadcrumbs = [ {'text': _('Client Portal'), 'url': url_for('client_portal.dashboard')} ] %} {{ page_header( icon_class='fas fa-building', title_text=_('Client Portal'), subtitle_text=_('Welcome, %(client_name)s', client_name=client.name), breadcrumbs=breadcrumbs ) }} {# Customize dashboard button #}
{# Widget area: render only widgets in widget_ids, in widget_order; else default layout #} {% set widget_ids_set = widget_ids | default([]) | list %} {% set order = widget_order | default(widget_ids) | default([]) | list %} {% if not order %} {% set order = ['stats', 'pending_actions', 'projects', 'invoices', 'time_entries'] %} {% endif %}
{% if widget_ids_set %} {% for w in order %} {% if w in widget_ids_set %} {% if w == 'stats' %} {% include 'client_portal/widgets/stats.html' %} {% elif w == 'pending_actions' %} {% include 'client_portal/widgets/pending_actions.html' %} {% elif w == 'projects' %} {% include 'client_portal/widgets/projects.html' %} {% elif w == 'invoices' %} {% include 'client_portal/widgets/invoices.html' %} {% elif w == 'time_entries' %} {% include 'client_portal/widgets/time_entries.html' %} {% endif %} {% endif %} {% endfor %} {% else %} {# Default: show all widgets in default order when no preferences saved #} {% include 'client_portal/widgets/stats.html' %} {% include 'client_portal/widgets/pending_actions.html' %}
{% include 'client_portal/widgets/projects.html' %} {% include 'client_portal/widgets/invoices.html' %}
{% include 'client_portal/widgets/time_entries.html' %} {% endif %}
{# Customize dashboard modal #} {% endblock %}