diff --git a/backend/procurement/views_frontend.py b/backend/procurement/views_frontend.py index 4895e2e1..d12ff69b 100644 --- a/backend/procurement/views_frontend.py +++ b/backend/procurement/views_frontend.py @@ -214,7 +214,7 @@ def equipment_detail(request, pk): 'procurement_item', 'procurement_item__request' ).prefetch_related( - 'maintenance_records', + 'maintenance_history', 'transfer_logs__from_department', 'transfer_logs__to_department', 'transfer_logs__from_person', diff --git a/backend/templates/procurement/equipment_detail.html b/backend/templates/procurement/equipment_detail.html index e308bc6c..3c6cd351 100644 --- a/backend/templates/procurement/equipment_detail.html +++ b/backend/templates/procurement/equipment_detail.html @@ -11,14 +11,6 @@ {% block content %}
| Дата | -Тип | -Описание | -Стоимость | -
|---|---|---|---|
| {{ record.date|date:"d.m.Y" }} | -{{ record.get_type_display }} | -{{ record.description|truncatechars:50 }} | -- {% if record.cost %}{{ record.cost|floatformat:0 }} ₽{% else %}—{% endif %} - | -
Записей об обслуживании нет
| Дата | -Откуда | -Куда | -Причина | -
|---|---|---|---|
| {{ log.created_at|date:"d.m.Y" }} | -- {% if log.from_department %}{{ log.from_department.name }}{% endif %} - {% if log.from_person %}({{ log.from_person.get_full_name }}){% endif %} - | -- {% if log.to_department %}{{ log.to_department.name }}{% endif %} - {% if log.to_person %}({{ log.to_person.get_full_name }}){% endif %} - | -{{ log.reason|truncatechars:40 }} | -
Передач не было