{% extends 'layout/app.html.twig' %} {% block title %}Tableau de bord{% endblock %} {% block page_title %}Tableau de bord{% endblock %} {% macro dossier_line(dossier) %}
  • {{ dossier.reference }} — {{ dossier.client.fullName }} {{ dossier.embassy.name }} {{ dossier.status.shortLabel }}
  • {% endmacro %} {% block content %}

    Bienvenue,

    {{ app.user.fullName }}

    {{ main_role ? main_role.label }} {% if app.user.lastLoginAt %}Dernière connexion : {{ app.user.lastLoginAt|date }}{% endif %}

    + Nouveau dossier
    {# Finances (comptable / admin) #} {% if is_finance %}

    Honoraires encaissés ce mois

    {{ collected_month|fcfa }}

    Reste à encaisser

    {{ outstanding|fcfa }}

    Frais de dépôt ce mois

    {{ deposit_fees_month|fcfa }}

    {% endif %} {# Répartition par statut #}

    {{ is_supervisor ? 'Dossiers par statut' : 'Mes dossiers par statut' }}

    {% for status in statuses %} {% set count = status_counts[status.value] ?? 0 %}

    {{ count }}

    {{ status.shortLabel }}
    {% endfor %}
    {# À faire (agent) #} {% if todo is defined %}
    {% for block in todo %}

    {{ block.title }} ({{ block.dossiers|length }})

    {{ block.hint }}

    {% if block.dossiers is empty %}

    Rien à faire ici.

    {% else %} {% endif %}
    {% endfor %}
    {% if my_outstanding > 0 %}
    Honoraires restant à encaisser sur vos dossiers : {{ my_outstanding|fcfa }} — voir les dossiers
    {% endif %} {% endif %} {# Pilotage (dispatcher et au-dessus) #} {% if is_supervisor %}

    À affecter

    Tout voir
    {% if unassigned is empty %}

    Tous les dossiers sont affectés.

    {% else %} {% endif %}

    Prêts pour un lot

    {% for item in ready_for_batch %} {{ item.embassy.name }}{{ item.count }} {% else %}

    Aucun dossier prêt.

    {% endfor %}
    {% if batches_in_preparation is not empty %}

    En préparation

    {% for batch in batches_in_preparation %} {{ batch.reference }} · {{ batch.embassy.name }}{{ batch.dossiers|length }} dossier(s) {% endfor %}
    {% endif %}

    Déposés — retraits à venir

    {% for batch in awaiting_pickup %} {{ batch.reference }} · {{ batch.embassy.name }} {{ batch.expectedPickupDate ? batch.expectedPickupDate|date('d/m') : '—' }} {% else %}

    Aucun lot en attente de retrait.

    {% endfor %}

    Charge des agents

    Dossiers en cours

    {% endif %}
    {% if is_finance %}

    Dossiers en cours par ambassade

    {% if by_receiver is not empty %}

    Encaissements du mois par personne

    {% for row in by_receiver %}

    {{ row.user }}{{ row.total|fcfa }}

    {% endfor %}
    {% endif %}
    {% endif %}

    Dernières notifications

    Tout voir
    {% if role_counts is defined and role_counts is not empty %}
    {% for role_value, count in role_counts %} {% set role = enum('App\\Enum\\UserRole').from(role_value) %}

    {{ role.label }}s

    {{ count.total }} dont {{ count.active }} actif{{ count.active > 1 ? 's' }}

    {% endfor %}
    {% endif %} {% endblock %}