crm-rush/api/modules/task/index.html

109 lines
4.2 KiB
HTML
Raw Normal View History

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>
{if $mytask[customer].status==1}<span style="color: #e74c3c;">Новая</span>{/if}
{if $mytask[customer].status==2}<span style="color: #27ae60;">Выполняется</span>{/if}
{if $mytask[customer].status==3}<span style="color: #95a5a6;">Завершена</span>{/if}
</div>
<div class="card-body">
<p class="card-text">{$mytask[customer].txt|br}</p>
<a href="#" class="btn btn-primary">Перейти куда-нибудь</a>
</div>
</div>
{/section}
</div>
<div class="col-md-6">
<h2>Поставленные мной</h2>
</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}