refactor: remove price column from category list table

This commit is contained in:
2025-12-26 23:59:11 +03:00
parent 607afd6af5
commit 1eaee7de5e
2 changed files with 170 additions and 225 deletions

View File

@@ -13,167 +13,132 @@
</div> </div>
<div class="row g-3"> <div class="row g-3">
<!-- Основные операции --> <!-- Главные операции -->
<div class="col-12"> <div class="col-12">
<h6 class="text-uppercase text-muted mb-3" style="font-size: 0.75rem; letter-spacing: 0.5px; font-weight: 600;">Операции</h6> <h5 class="text-muted mb-4 fw-normal" style="font-size: 1.1rem; letter-spacing: 0.5px;">
<div class="row g-3"> Главные операции
<!-- Склады --> </h5>
<div class="col-md-6 col-lg-4"> <div class="row g-4">
<a href="{% url 'inventory:warehouse-list' %}" class="card shadow-sm h-100 text-decoration-none"> <!-- Документы поступления -->
<div class="card-body p-3"> <div class="col-12 col-md-6 col-lg-3">
<div class="d-flex align-items-center"> <a href="{% url 'inventory:incoming-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="rounded-circle bg-primary bg-opacity-10 p-3 me-3"> <div class="card-body p-5">
<i class="bi bi-building text-primary" style="font-size: 1.5rem;"></i> <div class="text-center">
</div> <i class="bi bi-file-earmark-plus text-muted mb-3" style="font-size: 2.5rem;"></i>
<div class="flex-grow-1"> <h6 class="mb-2 text-dark fw-medium">Документы поступления</h6>
<h6 class="mb-0 text-dark">Склады</h6> <small class="text-muted">Коллективное поступление</small>
<small class="text-muted">Управление складами</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div>
</a>
</div>
<!-- Приходы -->
<div class="col-md-6 col-lg-4">
<a href="{% url 'inventory:incoming-list' %}" class="card shadow-sm h-100 text-decoration-none">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="rounded-circle bg-success bg-opacity-10 p-3 me-3">
<i class="bi bi-arrow-down-square text-success" style="font-size: 1.5rem;"></i>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Приходы</h6>
<small class="text-muted">Поступление товара</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div>
</a>
</div>
<!-- Продажи -->
<div class="col-md-6 col-lg-4">
<a href="{% url 'inventory:sale-list' %}" class="card shadow-sm h-100 text-decoration-none">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="rounded-circle bg-danger bg-opacity-10 p-3 me-3">
<i class="bi bi-arrow-up-square text-danger" style="font-size: 1.5rem;"></i>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Продажи</h6>
<small class="text-muted">Реализация товара</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div>
</a>
</div>
<!-- Инвентаризация -->
<div class="col-md-6 col-lg-4">
<a href="{% url 'inventory:inventory-list' %}" class="card shadow-sm h-100 text-decoration-none">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="rounded-circle bg-info bg-opacity-10 p-3 me-3">
<i class="bi bi-clipboard-check text-info" style="font-size: 1.5rem;"></i>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Инвентаризация</h6>
<small class="text-muted">Переучет товаров</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div>
</a>
</div>
<!-- Списания -->
<div class="col-md-6 col-lg-4">
<a href="{% url 'inventory:writeoff-list' %}" class="card shadow-sm h-100 text-decoration-none">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="rounded-circle bg-warning bg-opacity-10 p-3 me-3">
<i class="bi bi-x-circle text-warning" style="font-size: 1.5rem;"></i>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Списания</h6>
<small class="text-muted">Списание товара</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div> </div>
</div> </div>
</a> </a>
</div> </div>
<!-- Документы списания --> <!-- Документы списания -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-3">
<a href="{% url 'inventory:writeoff-document-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:writeoff-document-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-5">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-danger bg-opacity-10 p-3 me-3"> <i class="bi bi-file-earmark-minus text-muted mb-3" style="font-size: 2.5rem;"></i>
<i class="bi bi-file-earmark-minus text-danger" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Документы списания</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Документы списания</h6>
<small class="text-muted">Коллективное списание</small> <small class="text-muted">Коллективное списание</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div> </div>
</a> </a>
</div> </div>
<!-- Документы поступления --> <!-- Инвентаризация -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-3">
<a href="{% url 'inventory:incoming-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:inventory-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-5">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-success bg-opacity-10 p-3 me-3"> <i class="bi bi-clipboard-check text-muted mb-3" style="font-size: 2.5rem;"></i>
<i class="bi bi-file-earmark-plus text-success" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Инвентаризация</h6>
</div> <small class="text-muted">Переучет товаров</small>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Документы поступления</h6>
<small class="text-muted">Коллективное поступление</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div>
</a>
</div>
<!-- Перемещения -->
<div class="col-md-6 col-lg-4">
<a href="{% url 'inventory:transfer-list' %}" class="card shadow-sm h-100 text-decoration-none">
<div class="card-body p-3">
<div class="d-flex align-items-center">
<div class="rounded-circle bg-secondary bg-opacity-10 p-3 me-3">
<i class="bi bi-arrow-left-right text-secondary" style="font-size: 1.5rem;"></i>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Перемещения</h6>
<small class="text-muted">Между складами</small>
</div>
<i class="bi bi-chevron-right text-muted"></i>
</div> </div>
</div> </div>
</a> </a>
</div> </div>
<!-- Трансформации --> <!-- Трансформации -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-3">
<a href="{% url 'inventory:transformation-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:transformation-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-5">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-purple bg-opacity-10 p-3 me-3"> <i class="bi bi-arrow-repeat text-muted mb-3" style="font-size: 2.5rem;"></i>
<i class="bi bi-arrow-repeat text-purple" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Трансформации</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Трансформации</h6>
<small class="text-muted">Превращение товаров</small> <small class="text-muted">Превращение товаров</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i> </div>
</a>
</div>
</div>
</div>
<!-- Основные операции -->
<div class="col-12 mt-4">
<h5 class="text-muted mb-4 fw-normal" style="font-size: 1.1rem; letter-spacing: 0.5px;">
Операции
</h5>
<div class="row g-4">
<!-- Склады -->
<div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:warehouse-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-4">
<div class="text-center">
<i class="bi bi-building text-muted mb-3" style="font-size: 2rem;"></i>
<h6 class="mb-2 text-dark fw-medium">Склады</h6>
<small class="text-muted">Управление складами</small>
</div>
</div>
</a>
</div>
<!-- Приходы -->
<div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:incoming-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-4">
<div class="text-center">
<i class="bi bi-arrow-down-square text-muted mb-3" style="font-size: 2rem;"></i>
<h6 class="mb-2 text-dark fw-medium">Приходы</h6>
<small class="text-muted">Поступление товара</small>
</div>
</div>
</a>
</div>
<!-- Продажи -->
<div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:sale-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-4">
<div class="text-center">
<i class="bi bi-arrow-up-square text-muted mb-3" style="font-size: 2rem;"></i>
<h6 class="mb-2 text-dark fw-medium">Продажи</h6>
<small class="text-muted">Реализация товара</small>
</div>
</div>
</a>
</div>
<!-- Списания -->
<div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:writeoff-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-4">
<div class="text-center">
<i class="bi bi-x-circle text-muted mb-3" style="font-size: 2rem;"></i>
<h6 class="mb-2 text-dark fw-medium">Списания</h6>
<small class="text-muted">Списание товара</small>
</div>
</div>
</a>
</div>
<!-- Перемещения -->
<div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:transfer-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-4">
<div class="text-center">
<i class="bi bi-arrow-left-right text-muted mb-3" style="font-size: 2rem;"></i>
<h6 class="mb-2 text-dark fw-medium">Перемещения</h6>
<small class="text-muted">Между складами</small>
</div> </div>
</div> </div>
</a> </a>
@@ -183,94 +148,71 @@
<!-- Справочники --> <!-- Справочники -->
<div class="col-12 mt-4"> <div class="col-12 mt-4">
<h6 class="text-uppercase text-muted mb-3" style="font-size: 0.75rem; letter-spacing: 0.5px; font-weight: 600;">Справочники</h6> <h5 class="text-muted mb-4 fw-normal" style="font-size: 1.1rem; letter-spacing: 0.5px;">
<div class="row g-3"> Справочники
</h5>
<div class="row g-4">
<!-- Остатки --> <!-- Остатки -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:stock-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:stock-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-4">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-primary bg-opacity-10 p-3 me-3"> <i class="bi bi-box-seam text-muted mb-3" style="font-size: 2rem;"></i>
<i class="bi bi-box-seam text-primary" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Остатки</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Остатки</h6>
<small class="text-muted">Текущие остатки товаров</small> <small class="text-muted">Текущие остатки товаров</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div> </div>
</a> </a>
</div> </div>
<!-- Партии --> <!-- Партии -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:batch-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:batch-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-4">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-success bg-opacity-10 p-3 me-3"> <i class="bi bi-diagram-3 text-muted mb-3" style="font-size: 2rem;"></i>
<i class="bi bi-diagram-3 text-success" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Партии</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Партии</h6>
<small class="text-muted">Партии товаров</small> <small class="text-muted">Партии товаров</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div> </div>
</a> </a>
</div> </div>
<!-- Документы поступлений --> <!-- Документы поступлений -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:incoming-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:incoming-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-4">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-secondary bg-opacity-10 p-3 me-3"> <i class="bi bi-box-arrow-in-down text-muted mb-3" style="font-size: 2rem;"></i>
<i class="bi bi-box-arrow-in-down text-secondary" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Документы поступлений</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Документы поступлений</h6>
<small class="text-muted">История поступлений</small> <small class="text-muted">История поступлений</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div> </div>
</a> </a>
</div> </div>
<!-- Резервирования --> <!-- Резервирования -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:reservation-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:reservation-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-4">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-warning bg-opacity-10 p-3 me-3"> <i class="bi bi-bookmark-check text-muted mb-3" style="font-size: 2rem;"></i>
<i class="bi bi-bookmark-check text-warning" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Резервирования</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Резервирования</h6>
<small class="text-muted">Активные резервы</small> <small class="text-muted">Активные резервы</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div> </div>
</a> </a>
</div> </div>
<!-- Распределение --> <!-- Распределение -->
<div class="col-md-6 col-lg-4"> <div class="col-12 col-md-6 col-lg-4">
<a href="{% url 'inventory:allocation-list' %}" class="card shadow-sm h-100 text-decoration-none"> <a href="{% url 'inventory:allocation-list' %}" class="card-main-operation h-100 text-decoration-none">
<div class="card-body p-3"> <div class="card-body p-4">
<div class="d-flex align-items-center"> <div class="text-center">
<div class="rounded-circle bg-danger bg-opacity-10 p-3 me-3"> <i class="bi bi-distribute-vertical text-muted mb-3" style="font-size: 2rem;"></i>
<i class="bi bi-distribute-vertical text-danger" style="font-size: 1.5rem;"></i> <h6 class="mb-2 text-dark fw-medium">Распределение</h6>
</div>
<div class="flex-grow-1">
<h6 class="mb-0 text-dark">Распределение</h6>
<small class="text-muted">Распределение продаж</small> <small class="text-muted">Распределение продаж</small>
</div> </div>
<i class="bi bi-chevron-right text-muted"></i>
</div>
</div> </div>
</a> </a>
</div> </div>
@@ -280,16 +222,6 @@
</div> </div>
<style> <style>
.card {
transition: transform 0.2s ease, box-shadow 0.2s ease;
border: 1px solid #e9ecef;
}
.card:hover {
transform: translateY(-2px);
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}
.card-body { .card-body {
cursor: pointer; cursor: pointer;
} }
@@ -301,5 +233,28 @@
.text-purple { .text-purple {
color: #6f42c1 !important; color: #6f42c1 !important;
} }
.border-purple {
border-color: #6f42c1 !important;
}
/* Стили для всех карточек операций */
.card-main-operation {
border: 1px solid #e0e0e0;
border-radius: 8px;
background-color: #ffffff;
transition: all 0.3s ease;
}
.card-main-operation:hover {
border-color: #6f42c1;
background: linear-gradient(135deg, #f8f4ff 0%, #e8e4ff 100%);
box-shadow: 0 8px 25px rgba(111, 66, 193, 0.25);
transform: translateY(-2px);
}
.card-main-operation .card-body {
cursor: pointer;
}
</style> </style>
{% endblock %} {% endblock %}

View File

@@ -26,7 +26,6 @@
<tr> <tr>
<th>Название</th> <th>Название</th>
<th>Артикул</th> <th>Артикул</th>
<th>Цена</th>
<th>Статус</th> <th>Статус</th>
<th>Действия</th> <th>Действия</th>
</tr> </tr>
@@ -80,15 +79,6 @@
{% endif %} {% endif %}
</td> </td>
<!-- Колонка "Цена" -->
<td>
{% if item.price %}
{{ item.price|floatformat:0 }} руб.
{% else %}
<span class="text-muted"></span>
{% endif %}
</td>
<!-- Колонка "Статус" (только для категорий) --> <!-- Колонка "Статус" (только для категорий) -->
<td> <td>
{% if item.item_type == 'category' %} {% if item.item_type == 'category' %}