1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php /** Created by Anton on 07.02.2020. */
- use app\models\entity\Log;
- use app\models\entity\Tmc;
- use app\models\entity\TmcStatus;
- use yii\db\Query;
- /** @var string $act */
- $query = new Query();
- $query->select('t.id, t.title, tlog.issue_date, tlog.note')
- ->from(Tmc::tableName() . ' t')
- ->leftJoin(Log::tableName() . ' tlog', 'tlog.tmc = t.id')
- ->where('t.status = ' . TmcStatus::TMC_STATUS_REPAIR)
- ;
- $devices = $query->all();
- ?>
- <link href="/tmc/css/main.min.css" rel="stylesheet">
- <style type="text/css">
- .main_content {
- padding: 0;
- display: inline-flex;
- }
- </style>
- <div class="menuTask loco-scrol-blue scroller">
- <div class="menuTaskHeader">Список устройств в ремонте</div>
- <div class="boxB4">
- <div class="inpBox">
- <input class="js-search" type="text" placeholder="Поиск">
- <img src="/images/find.svg" alt="Поиск">
- </div>
- </div>
- <div class="boxB5">
- <div class="tmc-content">
- <?php foreach ($devices as $device): ?>
- <a href="?act=tmc/detail/added&id=<?= $device['id'] ?>" class="loco_list">
- <div>
- <h5><?= $device['title'] ?></h5>
- <p>
- <t class="loco_grey"><?= $device['issue_date'] ?></t>
- </p>
- <p>
- <t class="loco_grey"><?= $device['note'] ?></t>
- </p>
- </div>
- </a>
- <?php endforeach; ?>
- </div>
- </div>
- </div>
- <?php if ($act == 'tmc/repair') {
- require (dirname(__DIR__) . '/tmc/forms/repair.php');
- }?>
- <div role="log" aria-live="assertive" aria-relevant="additions" class="ui-helper-hidden-accessible"></div>
- <script type="application/javascript" src="tmc/js/search.js"></script>
|