Files
Project_WEB/cleaning/templates/cleaning/order_detail.html
T
Dmitry 97591a71ea Add initial Django project structure with cleaning app
- Created .gitignore to exclude Python-generated files and virtual environments.
- Added .python-version to specify Python version 3.13.
- Implemented models for Client, Brigade, Service, Order, and CompletedWork.
- Created Django admin configurations for managing models.
- Added management command to seed the database with test data.
- Created initial migrations for the models.
- Developed views and templates for listing and detailing orders, clients, and brigades.
- Set up URL routing for the cleaning app.
- Configured Django settings and WSGI/ASGI entry points.
- Added basic test structure in tests.py.
- Included project metadata in pyproject.toml and uv.lock.
2026-05-16 16:09:37 +03:00

37 lines
1.5 KiB
HTML
Raw 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 'cleaning/base.html' %}
{% block title %}Детали заказа{% endblock %}
{% block content %}
{# card — Bootstrap-компонент для группировки информации #}
<div class="card">
<div class="card-header"><h4>Заказ №{{ order.pk }}</h4></div>
<div class="card-body">
<p><strong>Клиент:</strong> <a href="{% url 'cleaning:client_detail' order.client.pk %}">{{ order.client }}</a></p>
<p><strong>Бригада:</strong> <a href="{% url 'cleaning:brigade_detail' order.brigade.pk %}">{{ order.brigade }}</a></p>
<p><strong>Дата:</strong> {{ order.date }}</p>
<p><strong>Время:</strong> {{ order.start_time }} — {{ order.end_time }}</p>
</div>
</div>
<h5 class="mt-4">Выполненные работы</h5> {# mt-4 — отступ сверху #}
<table class="table table-striped">
<thead>
<tr><th>Услуга</th><th>Площадь, м²</th><th>Стоимость, руб.</th></tr>
</thead>
<tbody>
{% for work in order.completedwork_set.all %}
<tr>
<td>{{ work.service.name }}</td>
<td>{{ work.area }}</td>
<td>{{ work.cost }}</td>
</tr>
{% endfor %}
</tbody>
{# tfoot с table-group-divider — отделяет итоговую строку чертой #}
<tfoot class="table-group-divider">
<tr><td colspan="2"><strong>Итого</strong></td><td><strong>{{ order.total_cost }} руб.</strong></td></tr>
</tfoot>
</table>
{% endblock %}