templates/ProfilePreview/components/services.partial.twig line 1

Open in your IDE?
  1. {% set mappingService = template == 'profiles' ? services|filter((serviceGroup, group) => not profile.masseur or group not in masseurExcludeServiceGroups) : services %}
  2. {% for group, servicesGroup in mappingService %}
  3.     {# тз изменилось. это на случай если нужно было показывать только укомплектованные услуги #}
  4.     {% set haveServices = false %}
  5.     {% for service in servicesGroup %}
  6.         {% if profile.providedService(service) %}
  7.             {% set haveServices = true %}
  8.         {% endif %}
  9.     {% endfor %}
  10.     {% if haveServices %}
  11.         <div class="service-block">
  12.             <h3 class="mb-2">{{ group|service_group|trans({}, 'service_groups') }}</h3>
  13.             <ul class="service-list">
  14.                 {# {%- include 'ProfilePreview/components/services-output-all.partial.twig' with {
  15.                     profile: profile,
  16.                     servicesGroup: servicesGroup
  17.                 } -%} #}
  18.                 {%- include 'ProfilePreview/components/services-output-only-active.partial.twig' with {
  19.                     profile: profile,
  20.                     servicesGroup: servicesGroup
  21.                 } -%}
  22.             </ul>
  23.         </div>
  24.     {% endif %}
  25. {% endfor %}