{% set variant = variant|default('default') %} {% macro platform_initial(platform) %} {% set name = platform ? platform.name : 'Platforma' %} {{ name|slice(0, 2)|upper }} {% endmacro %} {% if project.projectPlatformStatuses|length > 0 %} {% if variant in ['catalog', 'dashboard'] %} {% set visible_channels = [] %} {% set hidden_channels = [] %} {% for channel in project.projectPlatformStatuses %} {% set intent = channel.intent|default('undecided') %} {% set status = channel.status|default('not_created') %} {% set should_hide = intent in ['undecided', 'excluded', ''] %} {% if should_hide %} {% set hidden_channels = hidden_channels|merge([channel]) %} {% else %} {% set visible_channels = visible_channels|merge([channel]) %} {% endif %} {% endfor %}
Platforma:
{% for channel in visible_channels %} {% set status = channel.status|default('not_created') %} {% set intent = channel.intent|default('undecided') %} {% set is_published = status in ['published', 'active'] %} {% set is_error = status in ['error', 'inactive', 'expired', 'archived'] %} {% set is_progress = not is_published and not is_error and intent == 'planned' %} {% set is_later = not is_published and not is_error and intent == 'later' %} {% set pill_class = is_published ? 'channel-pill--published' : (is_error ? 'channel-pill--error' : (is_progress ? 'channel-pill--progress' : '')) %} {% set label = is_published ? 'Wystawione' : (is_error ? channel.statusLabel : (is_progress ? 'W toku' : channel.intentLabel)) %}
{{ channel.platform ? channel.platform.name : 'Platforma' }} {% if is_progress %} {% elseif is_error %} {% elseif is_published %} {% else %} {% endif %} {{ label }}
{% endfor %}
{% if hidden_channels|length > 0 %}
+{{ hidden_channels|length }} ukryte / nieplanowane
{% for channel in hidden_channels %} {{ channel.platform ? channel.platform.name : 'Platforma' }} {% endfor %}
{% endif %} {% if visible_channels|length == 0 and hidden_channels|length == 0 %} Brak statusów platform. {% endif %}
{% else %}
{% for channel in project.projectPlatformStatuses %} {{ channel.platform ? channel.platform.name : 'Platforma' }} {{ channel.intentLabel }} / {{ channel.statusLabel }} {% endfor %}
{% endif %} {% else %} Brak statusów platform. Uruchom seed albo zapisz projekt ponownie. {% endif %}