{% set adminCodes = [] %} {% set listLabels = [] %} {% set listUris = [] %} {% set adminDatas = {} %} {% for category in admin_pool.dashboardgroups %} {% set display = (category.roles is empty or is_granted('ROLE_SUPER_ADMIN') ) %} {% for role in category.roles if not display %} {% set display = is_granted(role) %} {% endfor %} {% if display %} {% for admin in category.items %} {% if admin.getCode() in [ "app_bundle.admin.vehicle", "app_bundle.admin.group_offer_portal", "app_bundle.admin.transport", "app_bundle.admin.rental", "app_bundle.admin.repair_order", "app_bundle.admin.contact.individual", "app_bundle.admin.contact.professional", "app_bundle.admin.commercial_proposition", "app_bundle.admin.order_form", "app_bundle.admin.estimate", ] %} {% if admin.hasroute('list') and admin.isGranted('LIST') %} {% set adminCodes = adminCodes|merge([admin.getCode()]) %} {% set listLabels = listLabels|merge([admin.getLabel()]) %} {% set listUris = listUris|merge([admin.generateUrl('list')]) %} {% set adminDatas = adminDatas|merge([{ "adminCode": admin.getCode(), "label": admin.getLabel(), "uri": admin.generateUrl('list'), "icon": category.icon }]) %} {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %}