massive update
This commit is contained in:
33
templates/pages/enterprises/add_enterprise.html
Normal file
33
templates/pages/enterprises/add_enterprise.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h3>Добавить предприятие</h3>
|
||||
<form method="post" action="{{ url_for('add_enterprise_post') }}">
|
||||
<div class="form-group">
|
||||
<label for="code">Код</label>
|
||||
<input class="form-control" id="code" name="code" required type="text">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Название предприятия</label>
|
||||
<input class="form-control" id="name" name="name" required type="text">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="short_name">Краткое название</label>
|
||||
<input class="form-control" id="short_name" name="short_name" required type="text">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input class="form-control" id="email" name="email" type="email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="activities">Виды деятельности</label>
|
||||
<select class="form-control" id="activities" name="activities" required multiple>
|
||||
{% for activity in activities %}
|
||||
<option value="{{ activity.id }}">{{ activity.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Отправить</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
266
templates/pages/enterprises/details.html
Normal file
266
templates/pages/enterprises/details.html
Normal file
@ -0,0 +1,266 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-4">Код</div>
|
||||
<div class="col-8">{{ ent.contact_info.code }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Имя</div>
|
||||
<div class="col-8">{{ ent.contact_info.code }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Краткое имя</div>
|
||||
<div class="col-8">{{ ent.contact_info.short_name }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Email</div>
|
||||
<div class="col-8">{{ ent.contact_info.email }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6>Отделы</h6>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Id
|
||||
</th>
|
||||
<th scope="col">
|
||||
Код
|
||||
</th>
|
||||
<th scope="col">
|
||||
Имя
|
||||
</th>
|
||||
<th scope="col">
|
||||
Краткое имя
|
||||
</th>
|
||||
<th scope="col">
|
||||
Email
|
||||
</th>
|
||||
<th scope="col">
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in ent.divisions %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{ item.id }}
|
||||
</th>
|
||||
<td>
|
||||
{{ item.contact_info.code }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.contact_info.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.contact_info.short_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.contact_info.email }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('division_details', div_id=item.id) }}">Детали</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6>Руководители</h6>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Id
|
||||
</th>
|
||||
<th scope="col">
|
||||
Фамилия
|
||||
</th>
|
||||
<th scope="col">
|
||||
Имя
|
||||
</th>
|
||||
<th scope="col">
|
||||
Отчество
|
||||
</th>
|
||||
<th scope="col">
|
||||
Дата заступления
|
||||
</th>
|
||||
<th scope="col">
|
||||
Дата снятия
|
||||
</th>
|
||||
<th scope="col">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in ent.contact_info.head %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{ item.id }}
|
||||
</th>
|
||||
<td>
|
||||
{{ item.last_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.first_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.second_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.date_of_start }}
|
||||
</td>
|
||||
<td>
|
||||
{% if not item.date_of_end %}
|
||||
---
|
||||
{% else %}
|
||||
{{ item.date_of_end }}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if not item.date_of_end %}
|
||||
<b>Активен</b>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6>Телефоны</h6>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Id
|
||||
</th>
|
||||
<th scope="col">
|
||||
Номер
|
||||
</th>
|
||||
<th scope="col">
|
||||
Дата заступления
|
||||
</th>
|
||||
<th scope="col">
|
||||
Дата снятия
|
||||
</th>
|
||||
<th scope="col">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in ent.contact_info.phone_numbers %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{ item.id }}
|
||||
</th>
|
||||
<td>
|
||||
{{ item.number }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.date_of_start }}
|
||||
</td>
|
||||
<td>
|
||||
{% if not item.date_of_end %}
|
||||
---
|
||||
{% else %}
|
||||
{{ item.date_of_end }}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if not item.date_of_end %}
|
||||
<b>Активен</b>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h6>Местоположения</h6>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Id
|
||||
</th>
|
||||
<th scope="col">
|
||||
Страна
|
||||
</th>
|
||||
<th scope="col">
|
||||
Город
|
||||
</th>
|
||||
<th scope="col">
|
||||
Улица
|
||||
</th>
|
||||
<th scope="col">
|
||||
Здание
|
||||
</th>
|
||||
<th scope="col">
|
||||
Комната
|
||||
</th>
|
||||
<th scope="col">
|
||||
Дата заступления
|
||||
</th>
|
||||
<th scope="col">
|
||||
Дата снятия
|
||||
</th>
|
||||
<th scope="col">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in ent.contact_info.locations %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{ item.id }}
|
||||
</th>
|
||||
<td>
|
||||
{{ item.country }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.city }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.street }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.house }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.room }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.date_of_start }}
|
||||
</td>
|
||||
<td>
|
||||
{% if not item.date_of_end %}
|
||||
---
|
||||
{% else %}
|
||||
{{ item.date_of_end }}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if not item.date_of_end %}
|
||||
<b>Активен</b>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
52
templates/pages/enterprises/index.html
Normal file
52
templates/pages/enterprises/index.html
Normal file
@ -0,0 +1,52 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Id
|
||||
</th>
|
||||
<th scope="col">
|
||||
Код
|
||||
</th>
|
||||
<th scope="col">
|
||||
Имя
|
||||
</th>
|
||||
<th scope="col">
|
||||
Краткое имя
|
||||
</th>
|
||||
<th scope="col">
|
||||
Email
|
||||
</th>
|
||||
<th scope="col">
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in data %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{ item.id }}
|
||||
</th>
|
||||
<td>
|
||||
{{ item.contact_info.code }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.contact_info.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.contact_info.short_name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.contact_info.email }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('enterprise_details', ent_id=item.id) }}">Детали</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user