Informations
- Reference
- {{ repair.reference }}
- Statut
-
{% set color = repair.statusBadgeColor %}
{{ repair.statusLabel }}
{% if repair.isOverdue %}
En retard
{% endif %}
- Equipement
- {{ repair.equipment.name|default('—') }}
- Demande par
- {{ repair.requestedBy ? repair.requestedBy.fullName : '—' }}
- Date de demande
- {{ repair.requestedAt|date('d/m/Y a H:i') }}
{% if repair.repairProvider %}
- Prestataire
-
{{ repair.repairProvider }}
{% if repair.repairProviderContact %}
({{ repair.repairProviderContact }})
{% endif %}
{% endif %}
{% if repair.expectedReturnDate %}
- Date de retour prevue
-
{{ repair.expectedReturnDate|date('d/m/Y') }}
{% if repair.isOverdue %}
{% endif %}
{% endif %}
{% if repair.repairedAt %}
- Date de reparation
- {{ repair.repairedAt|date('d/m/Y a H:i') }}
{% endif %}
{% if repair.returnedAt %}
- Date de retour effectif
- {{ repair.returnedAt|date('d/m/Y a H:i') }}
{% endif %}
{# Couts #}
{% if repair.estimatedCost or repair.actualCost %}
Couts
{% if repair.estimatedCost %}
Cout estime
{{ repair.estimatedCost|number_format(0, ',', ' ') }} XOF
{% endif %}
{% if repair.actualCost %}
Cout reel
{{ repair.actualCost|number_format(0, ',', ' ') }} XOF
{% endif %}
{% if repair.costDifference is not null %}
Ecart
{{ repair.costDifference > 0 ? '+' : '' }}{{ repair.costDifference|number_format(0, ',', ' ') }} XOF
{% endif %}
{% endif %}
{% if repair.description %}
Description du probleme
{{ repair.description|nl2br }}
{% endif %}
{% if repair.diagnosis %}
Diagnostic
{{ repair.diagnosis|nl2br }}
{% endif %}
{% if repair.partsReplaced %}
Pieces remplacees
{{ repair.partsReplaced|nl2br }}
{% endif %}
{% if repair.conditionAfterRepair %}
Etat apres reparation
{{ repair.conditionAfterRepair }}
{% endif %}
{% if repair.notes %}
Notes
{{ repair.notes|nl2br }}
{% endif %}
Progression
{% set steps = [
{key: 'requested', label: 'Demandee', icon: 'fa-clipboard'},
{key: 'diagnosed', label: 'Diagnostiquee', icon: 'fa-stethoscope'},
{key: 'in_repair', label: 'En reparation', icon: 'fa-wrench'},
{key: 'repaired', label: 'Reparee', icon: 'fa-check'},
{key: 'returned', label: 'Retournee', icon: 'fa-undo'}
] %}
{% set statusOrder = {requested: 0, diagnosed: 1, in_repair: 2, repaired: 3, returned: 4, cancelled: -1} %}
{% set currentIndex = statusOrder[repair.status]|default(0) %}
{% if repair.status == 'cancelled' %}
Reparation annulee
{% if repair.cancelReason %}
- {{ repair.cancelReason }}
{% endif %}
{% else %}
{% for step in steps %}
{% set stepIndex = loop.index0 %}
{% set isActive = repair.status == step.key %}
{% set isPast = stepIndex < currentIndex %}
{% if not loop.last %}
{% endif %}
{% endfor %}
{% endif %}