{% extends "layouts/mobile_base.twig" %} {% block title %} {% if employee %}{{ employee.getName() }} {{ employee.getSurname() }} · {% endif %} {{ translations.competencies|default('Kompetencje') }} · TFBuddy {% endblock %} {% block topbar_title %} {% if employee %}{{ employee.getName() }} {{ employee.getSurname() }}{% else %}{{ translations.competencies|default('Kompetencje') }}{% endif %} {% endblock %} {% block topbar_subtitle %}{{ translations.competencies|default('Kompetencje') }}{% endblock %} {% block topbar_actions %} {% endblock %} {% block head %} {% endblock %} {% block content %} {% if employee %} {# ── Hero ── #}
{% set ownedCount = employee.getCompetencies()|length %}
{{ translations.competencies_owned|default('Posiadane kompetencje') }}
{{ ownedCount }}
{{ employee.getName() }} {{ employee.getSurname() }}
{# ── Filter pills ── #}
{# ── Sections ── #} {% set owned_ids = employee.getCompetencyIds() %} {% for section_id, section in grouped_sections %} {% set section_owned = 0 %} {% set section_total = 0 %} {% for competency in competencies %} {% if competency.getSectionId() == section_id %} {% set section_total = section_total + 1 %} {% if competency.getId() in owned_ids %}{% set section_owned = section_owned + 1 %}{% endif %} {% endif %} {% endfor %} {% if section_total > 0 %} {% if section_owned == section_total %} {% set badge_cls = 'comp-badge-full' %} {% elseif section_owned == 0 %} {% set badge_cls = 'comp-badge-empty' %} {% else %} {% set badge_cls = 'comp-badge-partial' %} {% endif %}
{% for competency in competencies %} {% if competency.getSectionId() == section_id %} {% set has = competency.getId() in owned_ids %}
{{ competency.getName() }}
{% endif %} {% endfor %}
{% endif %} {% endfor %} {% if competencies is empty %}

{{ translations.no_competencies_defined|default('Nie zdefiniowano jeszcze żadnych kompetencji.') }}

{% endif %} {% else %}

{{ translations.employee_not_found|default('Nie znaleziono pracownika.') }}

{% endif %} {% endblock %} {% block scripts %} {% endblock %}