{% 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 %}
{{ interview.template ? interview.template.nom : interview.type.nom }}