Files
work-volume-tracker/app/templates/projects/edit.html
T
2026-09-30 16:42:02 +03:00

73 lines
6.9 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>Редактировать проект — {{ project.name }}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light">
<main class="container py-4" style="max-width: 900px">
<nav class="mb-3"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="/projects/">Проекты</a></li><li class="breadcrumb-item"><a href="/projects/{{ project.id }}">{{ project.name }}</a></li><li class="breadcrumb-item active">Редактирование</li></ol></nav>
<h1 class="h2 mb-4">Редактировать проект</h1>
<form method="post" action="/projects/{{ project.id }}/edit" class="card border-0 shadow-sm">
<div class="card-body">
<h2 class="h5 mb-3">Проект</h2>
<div class="row g-3 mb-4">
<div class="col-md-6"><label class="form-label" for="name">Название проекта *</label><input class="form-control" id="name" name="name" value="{{ project.name }}" required></div>
<div class="col-md-6"><label class="form-label" for="status">Статус</label><select class="form-select" id="status" name="status">
{% for value, label in [('active','Активный'),('completed','Завершён'),('on_hold','Приостановлен')] %}<option value="{{ value }}" {% if project.status == value %}selected{% endif %}>{{ label }}</option>{% endfor %}
{% if project.status and project.status not in ['active','completed','on_hold'] %}<option value="{{ project.status }}" selected>{{ project.status }}</option>{% endif %}
</select></div>
<div class="col-md-6"><label class="form-label" for="start_date">Дата начала</label><input class="form-control" type="date" id="start_date" name="start_date" value="{{ project.start_date.isoformat() if project.start_date else '' }}"></div>
<div class="col-md-6"><label class="form-label" for="end_date">Дата окончания</label><input class="form-control" type="date" id="end_date" name="end_date" value="{{ project.end_date.isoformat() if project.end_date else '' }}"></div>
</div>
<h2 class="h5 mb-3">Договор</h2>
<div class="row g-3 mb-4">
<div class="col-md-6"><label class="form-label" for="contract_number">Номер</label><input class="form-control" id="contract_number" name="contract_number" value="{{ project.contract_number or '' }}"></div>
<div class="col-md-6"><label class="form-label" for="contract_date">Дата</label><input class="form-control" type="date" id="contract_date" name="contract_date" value="{{ project.contract_date.isoformat() if project.contract_date else '' }}"></div>
<div class="col-md-6"><label class="form-label" for="contract_amount">Сумма</label><input class="form-control" id="contract_amount" name="contract_amount" type="number" step="0.01" value="{{ project.contract_amount if project.contract_amount is not none else '' }}"></div>
<div class="col-md-6"><label class="form-label" for="currency">Валюта</label><input class="form-control" id="currency" name="currency" value="{{ project.currency or 'RUB' }}"></div>
</div>
<h2 class="h5 mb-3">Участники</h2>
<div class="row g-3 mb-4">
<div class="col-md-4"><label class="form-label" for="investor_name">Инвестор</label><input class="form-control" id="investor_name" name="investor_name" value="{{ project.investor_name or '' }}"></div>
<div class="col-md-4"><label class="form-label" for="customer_name">Заказчик</label><input class="form-control" id="customer_name" name="customer_name" value="{{ project.effective_customer_name }}"></div>
<div class="col-md-4"><label class="form-label" for="contractor_name">Подрядчик</label><input class="form-control" id="contractor_name" name="contractor_name" value="{{ project.contractor_name or '' }}"></div>
</div>
<h2 class="h5 mb-3">Объект</h2>
<div class="row g-3 mb-4">
<div class="col-md-6"><label class="form-label" for="construction_name">Наименование строительства</label><input class="form-control" id="construction_name" name="construction_name" value="{{ project.construction_name or '' }}"></div>
<div class="col-md-6"><label class="form-label" for="object_name">Наименование объекта</label><input class="form-control" id="object_name" name="object_name" value="{{ project.object_name or '' }}"></div>
</div>
<h2 class="h5 mb-3">Подписанты</h2>
<div class="row g-3">
<div class="col-md-6">
<div class="card bg-light border-0"><div class="card-body">
<h3 class="h6 mb-3">Заказчик</h3>
<div class="row g-3">
<div class="col-12"><label class="form-label" for="customer_signer_name">ФИО</label><input class="form-control" id="customer_signer_name" name="customer_signer_name" value="{{ project.customer_signer_name or '' }}"></div>
<div class="col-12"><label class="form-label" for="customer_signer_position">Должность</label><input class="form-control" id="customer_signer_position" name="customer_signer_position" value="{{ project.customer_signer_position or '' }}"></div>
</div>
</div></div>
</div>
<div class="col-md-6">
<div class="card bg-light border-0"><div class="card-body">
<h3 class="h6 mb-3">Подрядчик</h3>
<div class="row g-3">
<div class="col-12"><label class="form-label" for="contractor_signer_name">ФИО</label><input class="form-control" id="contractor_signer_name" name="contractor_signer_name" value="{{ project.contractor_signer_name or '' }}"></div>
<div class="col-12"><label class="form-label" for="contractor_signer_position">Должность</label><input class="form-control" id="contractor_signer_position" name="contractor_signer_position" value="{{ project.contractor_signer_position or '' }}"></div>
</div>
</div></div>
</div>
</div>
</div>
<div class="card-footer bg-white d-flex justify-content-end gap-2"><a href="/projects/{{ project.id }}" class="btn btn-outline-secondary">Отмена</a><button class="btn btn-primary" type="submit">Сохранить</button></div>
</form>
</main>
</body>
</html>