{% extends "base.html" %} {% load static %} {% block title %}{{ equipment.name }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{# ===== Хлебные крошки ===== #}
{# ===== Основная информация ===== #}
{% if 'ноутбук' in equipment.name|lower or 'laptop' in equipment.name|lower %} {% elif 'монитор' in equipment.name|lower or 'display' in equipment.name|lower %} {% elif 'принтер' in equipment.name|lower or 'printer' in equipment.name|lower %} {% elif 'телефон' in equipment.name|lower or 'phone' in equipment.name|lower %} {% elif 'сервер' in equipment.name|lower or 'server' in equipment.name|lower %} {% else %} {% endif %}

{{ equipment.name }}

{{ equipment.inventory_number }} {% include "procurement/_equipment_status.html" with status=equipment.status %}
{# Характеристики #}
Характеристики
    {% if equipment.category %}
  • Категория {{ equipment.category.name }}
  • {% endif %} {% if equipment.serial_number %}
  • Серийный номер {{ equipment.serial_number }}
  • {% endif %} {% if equipment.model %}
  • Модель {{ equipment.model }}
  • {% endif %} {% if equipment.manufacturer %}
  • Производитель {{ equipment.manufacturer }}
  • {% endif %} {% if equipment.location %}
  • Расположение {{ equipment.location }}
  • {% endif %}
{# Описание #} {% if equipment.notes %}
Примечания

{{ equipment.notes }}

{% endif %} {# История обслуживания #}
История обслуживания
{% if can_manage %} {% endif %}
{% if equipment.maintenance_records.exists %}
{% for record in equipment.maintenance_records.all %} {% endfor %}
Дата Тип Описание Стоимость
{{ record.date|date:"d.m.Y" }} {{ record.get_type_display }} {{ record.description|truncatechars:50 }} {% if record.cost %}{{ record.cost|floatformat:0 }} ₽{% else %}—{% endif %}
{% else %}

Записей об обслуживании нет

{% endif %}
{# История передач #}
История передач
{% if equipment.transfer_logs.exists %}
{% for log in equipment.transfer_logs.all %} {% endfor %}
Дата Откуда Куда Причина
{{ 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 }}
{% else %}

Передач не было

{% endif %}
{# ===== Боковая панель ===== #}
{# Действия #} {% if can_manage %}
Действия
{% if equipment.status != 'retired' %} {% endif %}
{% endif %} {# Информация о владении #}
Владение
  • Отдел {{ equipment.department.name|default:"—" }}
  • Ответственный {{ equipment.responsible_person.get_full_name|default:"—" }}
{# Финансовая информация #}
Финансы
  • Дата покупки {{ equipment.purchase_date|date:"d.m.Y" }}
  • Стоимость {{ equipment.purchase_cost|floatformat:0 }} ₽
  • {% if equipment.warranty_until %}
  • Гарантия до {{ equipment.warranty_until|date:"d.m.Y" }}
  • {% endif %}
{# ===== Модалки ===== #} {% if can_manage %} {# Модалка обслуживания #} {# Модалка перевода #} {% endif %} {% endblock %} {% block extra_js %} {% endblock %}