project_python_v6/templates/counterparties.html
2026-04-21 09:26:47 +05:00

37 lines
2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Контрагенты — Стройка{% endblock %}
{% block page_title %}{% if ctype=='1' %}Партнёры{% elif ctype=='2' %}Поставщики{% else %}Все контрагенты{% endif %}{% endblock %}
{% block topbar_actions %}
<a href="{{ url_for('counterparty_add') }}?type={{ ctype or '1' }}" class="btn btn-primary">+ Добавить</a>
{% endblock %}
{% block content %}
<div class="sort-bar">
Показать:
<a href="?type=" class="btn btn-sm {% if not ctype %}btn-primary{% else %}btn-secondary{% endif %}">Все</a>
<a href="?type=2" class="btn btn-sm {% if ctype=='2' %}btn-primary{% else %}btn-secondary{% endif %}">🏭 Поставщики</a>
<a href="?type=1" class="btn btn-sm {% if ctype=='1' %}btn-primary{% else %}btn-secondary{% endif %}">🤝 Партнёры</a>
</div>
<div class="table-wrapper">
<table class="data-table">
<thead><tr><th>#</th><th>Тип</th><th>Название</th><th>Контактное лицо</th><th>Телефон</th><th>Email</th><th>Адрес</th><th>Заказов</th><th>Действия</th></tr></thead>
<tbody>
{% for c in counterparties %}
<tr>
<td style="color:var(--text-light)">{{ c.id }}</td>
<td><span class="badge">{% if c.type==2 %}Поставщик{% else %}Партнёр{% endif %}</span></td>
<td><strong>{{ c.name }}</strong></td>
<td>{{ c.contact_person or '—' }}</td>
<td>{{ c.phone or '—' }}</td>
<td>{{ c.email or '—' }}</td>
<td>{{ c.address or '—' }}</td>
<td><span class="badge">{{ c.order_count }}</span></td>
<td><a href="{{ url_for('counterparty_edit', cid=c.id) }}" class="btn btn-sm btn-edit">✏️ Изменить</a></td>
</tr>
{% else %}
<tr><td colspan="9" style="text-align:center;padding:2rem;color:#aaa">Нет данных</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}