Добавлен фильтр 'Есть канал связи' в список клиентов

- Новый фильтр has_contact_channel показывает клиентов с записями в ContactChannel
- Проверяет наличие альтернативных контактов (Instagram, Telegram и т.д.)
- Добавлен чекбокс в форму фильтров с flex-wrap для переноса
- Обновлено условие показа кнопки Очистить
- Фильтр автоматически сохраняется в пагинации через url_replace
This commit is contained in:
2026-01-03 15:38:22 +03:00
parent 36cca23b60
commit e6fd44ef6b
2 changed files with 25 additions and 3 deletions

View File

@@ -41,7 +41,7 @@
<!-- Фильтры -->
<div class="col-md-6">
<div class="d-flex gap-3 align-items-center">
<div class="d-flex gap-3 align-items-center flex-wrap">
<div class="form-check">
{{ filter.form.has_notes }}
<label class="form-check-label" for="{{ filter.form.has_notes.id_for_label }}">
@@ -60,6 +60,12 @@
Нет email
</label>
</div>
<div class="form-check">
{{ filter.form.has_contact_channel }}
<label class="form-check-label" for="{{ filter.form.has_contact_channel.id_for_label }}">
Есть канал связи
</label>
</div>
</div>
</div>
@@ -69,7 +75,7 @@
<button type="submit" class="btn btn-primary">
<i class="bi bi-search"></i> Поиск / Фильтр
</button>
{% if query or filter.form.has_notes.value or filter.form.no_phone.value or filter.form.no_email.value %}
{% if query or filter.form.has_notes.value or filter.form.no_phone.value or filter.form.no_email.value or filter.form.has_contact_channel.value %}
<a href="{% url 'customers:customer-list' %}" class="btn btn-outline-secondary">
<i class="bi bi-x-circle"></i> Очистить
</a>