{% set mappingService = template == 'profiles' ? services|filter((serviceGroup, group) => not profile.masseur or group not in masseurExcludeServiceGroups) : services %}
{% for group, servicesGroup in mappingService %}
{# тз изменилось. это на случай если нужно было показывать только укомплектованные услуги #}
{% set haveServices = false %}
{% for service in servicesGroup %}
{% if profile.providedService(service) %}
{% set haveServices = true %}
{% endif %}
{% endfor %}
{% if haveServices %}
<div class="service-block">
<h3 class="mb-2">{{ group|service_group|trans({}, 'service_groups') }}</h3>
<ul class="service-list">
{# {%- include 'ProfilePreview/components/services-output-all.partial.twig' with {
profile: profile,
servicesGroup: servicesGroup
} -%} #}
{%- include 'ProfilePreview/components/services-output-only-active.partial.twig' with {
profile: profile,
servicesGroup: servicesGroup
} -%}
</ul>
</div>
{% endif %}
{% endfor %}