zapytanie sql

This commit is contained in:
Mateusz Gruszczyński
2025-07-28 14:42:32 +02:00
parent 1de3171183
commit c6b089472a
3 changed files with 32 additions and 15 deletions

View File

@@ -110,14 +110,23 @@
<div class="info-line ms-4 small d-flex flex-wrap gap-2" id="info-{{ item.id }}">
{% set info_parts = [] %}
{% if item.note %}
<span class="text-danger">[ <b>{{ item.note }}</b> ]</span>
{% set _ = info_parts.append('<span class="text-danger">[ <b>' ~ item.note ~ '</b> ]</span>') %}
{% endif %}
{% if item.not_purchased_reason %}
<span class="text-dark">[ <b>Powód: {{ item.not_purchased_reason }}</b> ]</span>
{% set _ = info_parts.append('<span class="text-dark">[ <b>Powód: ' ~ item.not_purchased_reason ~ '</b>
]</span>') %}
{% endif %}
{% if item.added_by and item.owner_id and item.added_by_id and item.added_by_id != item.owner_id %}
<span class="text-info">[ Dodał/a: <b>{{ item.added_by }}</b> ]</span>
{% if item.added_by_display %}
{% set _ = info_parts.append('<span class="text-info">[ Dodał/a: <b>' ~ item.added_by_display ~ '</b> ]</span>')
%}
{% endif %}
{% if info_parts %}
<div class="info-line ms-4 small d-flex flex-wrap gap-2" id="info-{{ item.id }}">
{{ info_parts | join(' ') | safe }}
</div>
{% endif %}
</div>

View File

@@ -44,14 +44,23 @@
</span>
<div class="info-line ms-4 small d-flex flex-wrap gap-2" id="info-{{ item.id }}">
{% set info_parts = [] %}
{% if item.note %}
<span class="text-danger">[ <b>{{ item.note }}</b> ]</span>
{% set _ = info_parts.append('<span class="text-danger">[ <b>' ~ item.note ~ '</b> ]</span>') %}
{% endif %}
{% if item.not_purchased_reason %}
<span class="text-dark">[ <b>Powód: {{ item.not_purchased_reason }}</b> ]</span>
{% set _ = info_parts.append('<span class="text-dark">[ <b>Powód: ' ~ item.not_purchased_reason ~ '</b>
]</span>') %}
{% endif %}
{% if item.added_by and item.owner_id and item.added_by_id and item.added_by_id != item.owner_id %}
<span class="text-info">[ Dodał/a: <b>{{ item.added_by }}</b> ]</span>
{% if item.added_by_display %}
{% set _ = info_parts.append('<span class="text-info">[ Dodał/a: <b>' ~ item.added_by_display ~ '</b> ]</span>')
%}
{% endif %}
{% if info_parts %}
<div class="info-line ms-4 small d-flex flex-wrap gap-2" id="info-{{ item.id }}">
{{ info_parts | join(' ') | safe }}
</div>
{% endif %}
</div>