2024-09-27 15:28:55 +05:00
|
|
|
{include file=$header}
|
|
|
|
<div class="row">
|
|
|
|
<h1>Задачи <button type="button" class="btn btn-secondary" data-bs-toggle="modal" data-bs-target="#exampleModal">+</button></h1>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h2>Мои задачи</h2>
|
|
|
|
{section name=customer loop=$mytask}
|
|
|
|
<div class="card mb-2">
|
|
|
|
<div class="card-header">
|
|
|
|
От: {$mytask[customer].avtor.fio}<br>
|
|
|
|
{$mytask[customer].d}<br>
|
2024-09-30 08:50:06 +05:00
|
|
|
Срок: {$mytask[customer].array.srok}<br>
|
2024-09-27 15:28:55 +05:00
|
|
|
{if $mytask[customer].status==1}<span style="color: #e74c3c;">Новая</span>{/if}
|
|
|
|
{if $mytask[customer].status==2}<span style="color: #27ae60;">Выполняется</span>{/if}
|
2024-09-30 08:50:06 +05:00
|
|
|
{if $mytask[customer].status==3}<span style="color: #0e4927;">Приостановлена</span>{/if}
|
|
|
|
{if $mytask[customer].status==0}<span style="color: #95a5a6;">Завершена</span>{/if}
|
|
|
|
|
|
|
|
| Приоритет: {if $mytask[customer].array.prioritet==0}<span style="color: #95a5a6;">Низкий</span>{/if}
|
|
|
|
{if $mytask[customer].array.prioritet==1}<span style="color: #27ae60;">Средний</span>{/if}
|
|
|
|
{if $mytask[customer].array.prioritet==2}<span style="color: #e74c3c;">Срочный</span>{/if}
|
2024-09-27 15:28:55 +05:00
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<p class="card-text">{$mytask[customer].txt|br}</p>
|
2024-09-30 08:50:06 +05:00
|
|
|
<p class="card-text"><a href="/files/task/{$mytask[customer].array.doc}">{$mytask[customer].array.doc}</a></p>
|
|
|
|
<button type="button" class="btn btn-primary start_task" data-id="{$mytask[customer].id}">Начать выполнение</button>
|
|
|
|
<a href="#" class="btn btn-primary">Перенести срок</a>
|
|
|
|
<a href="#" class="btn btn-primary">Делегировать</a>
|
2024-09-27 15:28:55 +05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/section}
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h2>Поставленные мной</h2>
|
2024-09-30 08:50:06 +05:00
|
|
|
{section name=customer loop=$mytasksend}
|
|
|
|
<div class="card mb-2">
|
|
|
|
<div class="card-header">
|
|
|
|
От: {$mytasksend[customer].avtor.fio}<br>
|
|
|
|
{$mytasksend[customer].d}<br>
|
|
|
|
Срок: {$mytasksend[customer].array.srok}<br>
|
|
|
|
{if $mytasksend[customer].status==1}<span style="color: #e74c3c;">Новая</span>{/if}
|
|
|
|
{if $mytasksend[customer].status==2}<span style="color: #27ae60;">Выполняется</span>{/if}
|
|
|
|
{if $mytasksend[customer].status==3}<span style="color: #0e4927;">Приостановлена</span>{/if}
|
|
|
|
{if $mytasksend[customer].status==0}<span style="color: #95a5a6;">Завершена</span>{/if}
|
|
|
|
|
|
|
|
| Приоритет: {if $mytasksend[customer].array.prioritet==0}<span style="color: #95a5a6;">Низкий</span>{/if}
|
|
|
|
{if $mytasksend[customer].array.prioritet==1}<span style="color: #27ae60;">Средний</span>{/if}
|
|
|
|
{if $mytasksend[customer].array.prioritet==2}<span style="color: #e74c3c;">Срочный</span>{/if}
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<p class="card-text">{$mytasksend[customer].txt|br}</p>
|
|
|
|
<p class="card-text"><a href="/files/task/{$mytasksend[customer].array.doc}">{$mytasksend[customer].array.doc}</a></p>
|
|
|
|
<button type="button" class="btn btn-primary start_task" data-id="{$mytasksend[customer].id}">Начать выполнение</button>
|
|
|
|
<a href="#" class="btn btn-primary">Перенести срок</a>
|
|
|
|
<a href="#" class="btn btn-primary">Делегировать</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/section}
|
2024-09-27 15:28:55 +05:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Модальное окно -->
|
|
|
|
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h1 class="modal-title fs-5" id="exampleModalLabel">Новая задача</h1>
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
|
|
<form id="newtask" action="/task/" enctype="multipart/form-data" method="post">
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="target_user" class="form-label">Ответственный</label>
|
|
|
|
|
|
|
|
<select name="target_user" id="target_user" class="form-control">
|
|
|
|
{section name=customer loop=$users}
|
|
|
|
<option value="{$users[customer].id}">{$users[customer].fio} ({$users[customer].dolznost})</option>
|
|
|
|
{/section}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="srok" class="form-label">Срок</label>
|
|
|
|
<input type="input" class="form-control" id="srok" name="srok">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="txt" class="form-label">Суть обращения</label>
|
|
|
|
<textarea class="form-control" id="txt" name="txt" style="height: 200px;"></textarea>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="prioritet" class="form-label">Приоритет</label>
|
|
|
|
<select name="prioritet" id="prioritet" class="form-control">
|
|
|
|
<option value="0">Низкий</option>
|
|
|
|
<option value="1">Средний</option>
|
|
|
|
<option value="2">Срочный</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="doc" class="form-label">Приказ</label>
|
|
|
|
<input type="file" class="form-control" id="doc" name="doc">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="user" class="form-label">Заказчик</label>
|
|
|
|
|
|
|
|
<select name="user" id="user" class="form-control">
|
|
|
|
{section name=customer loop=$users}
|
|
|
|
<option value="{$users[customer].id}" {if ($smarty.session.user_id==$users[customer].id)} selected {/if}>{$users[customer].fio} ({$users[customer].dolznost})</option>
|
|
|
|
{/section}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="submit" name="ok" value="Добавить" class="btn btn-primary">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{include file=$footer}
|