mirror of
https://github.com/ada-dmitry/Project_WEB.git
synced 2026-09-23 23:50:20 +00:00
- 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.
37 lines
1.5 KiB
HTML
37 lines
1.5 KiB
HTML
{% 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 %}
|