{% extends "layouts/mobile_base.twig" %} {% block title %}Targety — {{ shop.name ?? shop.representative_name ?? 'Sklep' }}{% endblock %} {% block page_title %}Targety{% endblock %} {% block page_subtitle %}{{ shop.name ?? shop.representative_name ?? '' }}{% endblock %} {% block content %}
{# ── FILTR OKRESU ───────────────────────────────────────────────────── #}
{# ── KOPIOWANIE ─────────────────────────────────────────────────────── #}
{# ── TABELA TARGETÓW ────────────────────────────────────────────────── #}
{# Makro wiersza metryki #} {% macro metricRow(key, metric, consultantTarget, adminTarget, currency_symbol) %} {% set col1 = consultantTarget ? consultantTarget.t1 : '' %} {% set col2 = consultantTarget ? consultantTarget.t2 : '' %} {% set col3 = consultantTarget ? consultantTarget.t3 : '' %} {{ metric.label }}
{% if metric.unit == 'pct' %}% {% elseif metric.unit == 'amount' %}{{ currency_symbol }} {% else %}szt.{% endif %} {% if key == 'net_margin_pct' %}
Dotyczy marży netto: wynik netto / przychód {% endif %} {% if key == 'b2b_clients_count' %}
Unikalni klienci B2B z transakcją {% endif %} {% if adminTarget %}
Admin: {{ adminTarget.t1 }}/{{ adminTarget.t2 }}/{{ adminTarget.t3 }} {% endif %} {% endmacro %} {# Sekcja kosztowa #} {% for key, metric in metrics %} {% if metric.lower_is_better %} {{ _self.metricRow(key, metric, targets[key].consultant ?? null, targets[key].admin ?? null, currency_symbol) }} {% endif %} {% endfor %}
Kosztowe — niższy = lepiej
Metryka 🟢 🟡 🟠
{# Sekcja biznesowa #} {% for key, metric in metrics %} {% if not metric.lower_is_better %} {{ _self.metricRow(key, metric, targets[key].consultant ?? null, targets[key].admin ?? null, currency_symbol) }} {% endif %} {% endfor %}
Biznesowe — wyższy = lepiej
Metryka 🟢 🟡 🟠
Powrót
{# ── MODAL KOPIOWANIA ────────────────────────────────────────────────────── #} {# ── TOAST ───────────────────────────────────────────────────────────────── #} {% endblock %} {% block scripts %} {% endblock %}