{% extends '@App/app.html.twig' %} {% block title %}Conduire l'entretien{% endblock %} {% block page_header %}{% endblock %} {% block content %} {% set employee = interview.salarie %} {% set photo_path = employee.photo ? employee.photo|trim : null %} {% set avatar_src = photo_path ? (photo_path starts with 'http://' or photo_path starts with 'https://' ? photo_path : asset(photo_path starts with '/' ? photo_path|slice(1) : photo_path)) : null %} {% set initials = ((employee.prenom|default('')|first) ~ (employee.nom|default('')|first))|upper ?: 'S' %} {% set questions_by_section = {} %} {% set orphan_questions = [] %} {% set question_groups = [] %} {% for question in questions %} {% if question.section %} {% set key = 'section_' ~ question.section.id %} {% set questions_by_section = questions_by_section|merge({(key): (questions_by_section[key]|default([]))|merge([question])}) %} {% else %} {% set orphan_questions = orphan_questions|merge([question]) %} {% endif %} {% endfor %} {% for section in sections %} {% set section_key = 'section_' ~ section.id %} {% set section_questions = questions_by_section[section_key]|default([]) %} {% if section_questions is not empty %} {% set question_groups = question_groups|merge([{key: section_key, title: section.titre, description: section.description, questions: section_questions}]) %} {% endif %} {% endfor %} {% if orphan_questions is not empty %} {% set question_groups = question_groups|merge([{key: 'other', title: 'Questions complémentaires', description: null, questions: orphan_questions}]) %} {% endif %} {% set answered_count = 0 %} {% for answer in answers %} {% if answer.answerText|default('')|trim is not empty or answer.answerJson|default([]) is not empty %}{% set answered_count = answered_count + 1 %}{% endif %} {% endfor %} {% set total_count = questions|length %} {% set progress = total_count > 0 ? ((answered_count / total_count) * 100)|round : 0 %} {% set radar_labels = [] %} {% set radar_self = [] %} {% set radar_manager = [] %} {% for assessment in skill_assessments %} {% set radar_labels = radar_labels|merge([assessment.skill.nom]) %} {% set radar_self = radar_self|merge([assessment.selfRating|default(0)]) %} {% set radar_manager = radar_manager|merge([assessment.managerRating|default(0)]) %} {% endfor %} {% macro readonly_answer(answer, empty_label) %} {% set value = answer ? (answer.answerJson ?: answer.answerText) : null %}
{{ value is iterable ? value|join(', ') : (value ?: empty_label) }}
{% endmacro %} {% import _self as conduct_view %}
Sauvegarde locale active
{% if avatar_src %}{{ employee }}{% else %}{{ initials }}{% endif %}

{{ employee }}

{{ interview.template ? interview.template.nom : interview.type.nom }}

Date{{ interview.scheduledAt ? interview.scheduledAt|date('d/m/Y') : 'Non définie' }}
StatutEn cours
Progression{{ progress }}%

Conduire l’entretien

{% for message in app.flashes('error') %}
{{ message }}
{% endfor %}
{% for group in question_groups %}

{{ group.title }}

{% if group.description %}

{{ group.description }}

{% endif %}
Section {{ loop.index }} sur {{ question_groups|length }}
{% for question in group.questions %} {% set employee_answer = employee_answers[question.id]|default(null) %} {% set manager_answer = manager_answers[question.id]|default(null) %} {% set conduct_answer = answers[question.id]|default(null) %} {% set conduct_value = conduct_answer ? (conduct_answer.answerJson ?: conduct_answer.answerText) : '' %}

{{ loop.index }}. {{ question.label }}{% if question.required %}*{% endif %}

{% if question.helpText %}

{{ question.helpText }}

{% endif %}
Réponse du manager
{{ conduct_view.readonly_answer(manager_answer, 'Aucune réponse manager enregistrée.') }}
Réponse du salarié
{{ conduct_view.readonly_answer(employee_answer, 'Aucune réponse salarié enregistrée.') }}
Réponse de l’entretien
{% include '@Interview/interview/_answer_input.html.twig' with {question: question, name: 'answers[' ~ question.id ~ ']', value: conduct_value} %}
{% endfor %}
{% else %}
Aucune question configurée
{% endfor %}

Objectifs de la période passée

{{ objectives|length }} objectif{{ objectives|length > 1 ? 's' : '' }}
{% for objective in objectives %}
Objectif {{ loop.index }} : {{ objective.title }}{{ objective.progress >= 100 ? 'Atteint' : objective.progress ~ '%' }}

{{ objective.description ?: 'Aucune description renseignée.' }}

Échéance
{{ objective.targetDate ? objective.targetDate|date('d/m/Y') : 'Non définie' }}
Critère de réussite
{{ objective.successCriteria ?: 'Non renseigné' }}
{% else %}
Aucun objectif en coursLes objectifs du salarié apparaîtront ici.
{% endfor %}

Évaluation des compétences

{{ skill_assessments|length }} compétence{{ skill_assessments|length > 1 ? 's' : '' }}
{% if skill_assessments %}
CompétenceAuto-éval.ManagerCible
{% for assessment in skill_assessments %}
{{ assessment.skill.nom }}{{ assessment.selfRating|default('—') }}{% if assessment.selfRating %}/5{% endif %}{{ assessment.targetRating|default('—') }}{% if assessment.targetRating %}/5{% endif %}
{% endfor %}
{% else %}
Aucune compétence à évaluer
{% endif %}

Besoins en formation

{{ training_needs|length }} besoin{{ training_needs|length > 1 ? 's' : '' }}
{% for need in training_needs %}
Priorité {{ need.priority|replace({'high': 'haute', 'medium': 'moyenne', 'low': 'basse'}) }}{{ need.title }}

{{ need.description ?: 'Aucune précision' }}

{{ need.targetDate ? 'Échéance : ' ~ need.targetDate|date('d/m/Y') : 'Échéance non définie' }}
{% else %}
Aucun besoin de formation identifié
{% endfor %}

Plan d’action

{{ action_plans|length }} action{{ action_plans|length > 1 ? 's' : '' }}
{% for action in action_plans %}
{{ action.title }}

{{ action.description ?: 'Aucune description' }}

{{ action.dueDate ? 'Échéance : ' ~ action.dueDate|date('d/m/Y') : 'Sans échéance' }}{% if action.owner %} · {{ action.owner }}{% endif %}
{% else %}
Aucune action définie
{% endfor %}

Synthèse

Étape finale
Finalisez la saisie avant de terminer l’entretien

Les réponses, évaluations et éléments du dossier seront intégrés au compte rendu.

{% endblock %}