{% extends 'layout/app.html.twig' %} {% block title %}Dossier {{ dossier.reference }}{% endblock %} {% block page_title %}Dossier {{ dossier.reference }}{% endblock %} {% set token = csrf_token('dossier-action-' ~ dossier.id) %} {% macro action_form(dossier, token, action, button, button_class, body, confirm) %}
{{ body|default('')|raw }}
{% endmacro %} {% block page_actions %} ← Dossiers {% if 'edit' in actions %} Modifier {% endif %} {% endblock %} {% block content %} {# En-tête #}

{{ dossier.client.fullName }}

{{ dossier.status.label }} {% if dossier.submissionCount > 1 %}{{ dossier.submissionCount }}e soumission{% endif %}

{{ dossier.embassy.name }} · {{ dossier.visaType.label }} {% if dossier.travelDate %} · Voyage prévu le {{ dossier.travelDate|date('d/m/Y') }}{% endif %}

Agent

{{ dossier.assignedAgent ? dossier.assignedAgent.fullName : 'Non affecté' }}

{{ include('dossier/_timeline.html.twig') }}
{# Actions disponibles #} {% set workflow_actions = actions|filter(a => a not in ['edit', 'upload', 'payment', 'force_close']) %} {% if workflow_actions is not empty %}

Actions

{% if 'submit_online' in actions %}

{{ dossier.status.value == 'REJETE' ? 'Resoumettre en ligne' : 'Soumission en ligne' }}

Étape 3 — dépôt de la demande sur la plateforme de l'ambassade. {% if dossier.embassy.platformUrl %}Ouvrir la plateforme ↗{% endif %}

{% set body %} {% endset %} {{ _self.action_form(dossier, token, 'submit_online', 'Enregistrer la soumission', 'btn-primary', body) }}
{% endif %} {% if 'validation_received' in actions %}

Papier de validation récupéré

Étape 5 — joignez d'abord le document (catégorie « Papier de validation ») dans les pièces ci-dessous. {% if not dossier.hasValidationDocument %}Aucun papier de validation joint.{% endif %}

{% set body %}{% endset %} {{ _self.action_form(dossier, token, 'validation_received', 'Marquer prêt pour le dépôt', 'btn-primary', body) }}
{% endif %} {% if 'decision' in actions %}

Avis de l'ambassade

Un avis défavorable renvoie le dossier à la soumission en ligne.

{% set body %} {% endset %} {{ _self.action_form(dossier, token, 'decision', 'Enregistrer l\'avis', 'btn-accent', body) }}
{% endif %} {% if 'collect' in actions %}

Récupération du dossier

Le dispatcher a retiré le dossier à l'ambassade : confirmez que vous l'avez récupéré.

{% set body %}{% endset %} {{ _self.action_form(dossier, token, 'collect', 'J\'ai récupéré le dossier', 'btn-primary', body) }}
{% endif %} {% if 'close' in actions %}

Restitution au client

{% if dossier.fullyPaid %}

Honoraires soldés : vous pouvez restituer le dossier et clôturer le traitement.

{% set body %}{% endset %} {{ _self.action_form(dossier, token, 'close', 'Restituer et clôturer', 'btn-primary', body, 'Confirmer la restitution du dossier au client ?') }} {% elseif 'force_close' in actions %}

Solde restant : {{ dossier.balance|fcfa }}. En tant que {{ app.user.mainRole.label|lower }}, vous pouvez forcer la clôture avec un motif.

{% set body %} {% endset %} {{ _self.action_form(dossier, token, 'close', 'Forcer la restitution', 'btn-danger', body, 'Restituer le dossier malgré le solde impayé ?') }} {% else %}

Solde restant : {{ dossier.balance|fcfa }}. Encaissez le solde avant de restituer le dossier.

{% endif %}
{% endif %} {% if 'assign' in actions %}

{{ dossier.assignedAgent ? 'Réaffecter' : 'Affecter' }} le dossier

L'agent sera notifié et seul lui verra le dossier.

{% set body %} {% endset %} {{ _self.action_form(dossier, token, 'assign', 'Affecter', 'btn-primary', body) }}
{% endif %} {% if 'tracking_note' in actions %}

Note de suivi

Étape 4 — suivi sur la plateforme, échanges avec le client…

{% set body %}{% endset %} {{ _self.action_form(dossier, token, 'tracking_note', 'Ajouter la note', 'btn-secondary', body) }}
{% endif %} {% if 'cancel' in actions %}

Annuler le dossier

Abandon de la demande par le client, doublon…

{% set body %}{% endset %} {{ _self.action_form(dossier, token, 'cancel', 'Annuler le dossier', 'btn-danger', body, 'Annuler définitivement ce dossier ?') }}
{% endif %}
{% endif %} {# Pièces jointes #}

Pièces jointes ({{ dossier.documents|length }})

{% if dossier.documents is empty %}

Aucune pièce jointe.

{% else %}
    {% for document in dossier.documents %}
  • {{ document.pdf ? 'PDF' : 'IMG' }}
    {{ document.label }} {% if document.category.value != 'PIECE' %}{{ document.category.label }}{% endif %}

    {{ document.originalName }} · {{ document.size|filesize }} · {{ document.uploadedAt|date }}{% if document.uploadedBy %} · {{ document.uploadedBy.fullName }}{% endif %}

    {% if 'upload' in actions %}
    {% endif %}
  • {% endfor %}
{% endif %} {% if 'upload' in actions %}
{{ form_start(upload_form, {attr: {class: 'grid items-end gap-3 md:grid-cols-[2fr_1fr_2fr_auto]'}}) }} {{ form_row(upload_form.label, {row_attr: {class: 'mb-0'}}) }} {{ form_row(upload_form.category, {row_attr: {class: 'mb-0'}}) }} {{ form_row(upload_form.file, {row_attr: {class: 'mb-0'}, attr: {class: 'block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-brand-50 file:px-3 file:py-2 file:text-brand-700'}}) }} {{ form_end(upload_form) }}
{% endif %}
{# Historique #}

Historique

    {% for event in dossier.events %}
  1. {% if not loop.last %}{% endif %}

    {{ event.type.label }} {% if event.toStatus %}{{ event.toStatus.shortLabel }}{% endif %}

    {% if event.comment %}

    {{ event.comment }}

    {% endif %}

    {{ event.createdAt|date }}{% if event.actor %} · {{ event.actor.fullName }}{% endif %}

  2. {% endfor %}
{# Client #}

Client

{% if 'edit' in actions %} Modifier {% endif %}
Passeport
{{ dossier.client.passportNumber }}
{% if dossier.client.passportExpiresAt %}
Expiration
{{ dossier.client.passportExpiresAt|date('d/m/Y') }}
{% endif %} {% if dossier.client.email %}
Email
{{ dossier.client.email }}
{% endif %} {% if dossier.client.birthDate %}
Naissance
{{ dossier.client.birthDate|date('d/m/Y') }}
{% endif %} {% if dossier.client.nationality %}
Nationalité
{{ dossier.client.nationality }}
{% endif %}
{% if dossier.client.dossiers|length > 1 %}

Autres dossiers du client

{% for other in dossier.client.dossiers|filter(d => d.id != dossier.id) %}

{% if is_granted('DOSSIER_VIEW', other) %}{{ other.reference }}{% else %}{{ other.reference }}{% endif %} — {{ other.embassy.name }} ({{ other.status.shortLabel }})

{% endfor %}
{% endif %}
{# Suivi #}

Suivi

Créé le
{{ dossier.createdAt|date('d/m/Y') }}{% if dossier.createdBy %} par {{ dossier.createdBy.fullName }}{% endif %}
N° demande en ligne
{{ dossier.onlineApplicationNumber ?: '—' }}
{% if dossier.submittedOnlineAt %}
Soumis le
{{ dossier.submittedOnlineAt|date('d/m/Y') }}
{% endif %} {% if dossier.validationReceivedAt %}
Validation reçue
{{ dossier.validationReceivedAt|date('d/m/Y') }}
{% endif %} {% if dossier.batch %}
Lot
{% if is_granted('BATCH_MANAGE') %}{{ dossier.batch.reference }}{% else %}{{ dossier.batch.reference }}{% endif %}
{% if dossier.batch.depositedAt %}
Déposé le
{{ dossier.batch.depositedAt|date('d/m/Y') }}
{% endif %} {% if dossier.batch.expectedPickupDate and not dossier.pickedUpAt %}
Retrait prévu
{{ dossier.batch.expectedPickupDate|date('d/m/Y') }}
{% endif %} {% endif %} {% if dossier.decision %}
Avis
{{ dossier.decision.label }}
{% endif %} {% if dossier.pickedUpAt %}
Retiré le
{{ dossier.pickedUpAt|date('d/m/Y') }}
{% endif %} {% if dossier.returnedAt %}
Restitué le
{{ dossier.returnedAt|date('d/m/Y') }}
{% endif %}
{% if dossier.notes %}

{{ dossier.notes }}

{% endif %}
{# Paiements #}

Honoraires

Convenus

{{ dossier.feeAmount|fcfa }}

Payé

{{ dossier.paidAmount|fcfa }}

Solde

{{ dossier.balance|fcfa }}

{% if dossier.payments is not empty %}
    {% for payment in dossier.payments %}
  • {{ payment.amount|fcfa }} · {{ payment.method.label }}

    {{ payment.receivedAt|date('d/m/Y') }} · {{ payment.receivedBy.fullName }}

    Reçu {{ payment.receiptNumber }}
  • {% endfor %}
{% endif %} {% if 'payment' in actions %}

Encaisser un paiement

{% endif %}
{% endblock %}