<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model modules\forms\models\Dt188 */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Dt188s', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;

$model->datetime = empty($model->datetime) == false ? Date('d/m/Y H:i', strtotime($model->datetime)) : $model->datetime;
$model->date = empty($model->date) == false && $model->date !== '1970-01-01' ? Date('d/m/Y', strtotime($model->date)) : ($model->date !== '1970-01-01' ? $model->date : null);

?>
<div class="dt188-view">
    <table class="table table-borderless">
        <tr>
            <td class="notbb nolrb nolb" align="right">
                <?= $this->render('//common/_viewheader', ['title' => 'Non-Compliance Report Form DT188']) ?>
                <?= $model->padno ?></td>
        </tr>
    </table>
    <table class="table table-borderless">
        <tr>
            <th class="DarkerBlue" style="text-align: right">NCR Ref No.</th>
            <td><?= $model->id ?></td>
        </tr>
        <tr>
            <td class="nobb DarkerBlue">Subject:</td>
            <td class="nobb"><?= $model->subject ?></td>
        </tr>
        <tr>
            <td class="nobb DarkerBlue">Name (person identifying non compliance):</td>
            <td class="nobb DarkerBlue">Date & Time (if applicable):</td>
        </tr>
        <tr>
            <td class="notb"><?= $model->name ?></td>
            <td class="notb"><?= $model->datetime ?></td>
        </tr>
        <tr>
            <td class="nobb DarkerBlue" colspan="2">Detail of Non-Compliance (e.g. materials/equipment/authority to
                work/competence/etc.)</td>
        </tr>
        <tr>
            <td class="notb" colspan="2"><?= $model->details ?></td>
        </tr>
        <tr>
            <td class="nobb DarkerBlue" colspan="2">Actions: (Determine reasons for escalation, if applicable)</td>
        </tr>
        <tr>
            <td class="notb" colspan="2"><?= $model->actions ?></td>
        </tr>
        <tr>
            <td class="notbb DarkerBlue" colspan="2">Escalated to:</td>
        </tr>
        <tr>
            <td class="notb" colspan="2"><?= $model->escalatedto ?></td>
        </tr>
        <tr>
            <td class="notbb DarkerBlue" colspan="2">Signature:</td>
        </tr>
        <tr>
            <td class="notb" colspan="2"><img src="<?= $model->signature ?>"> </img></td>
        </tr>

        <tr>
            <td class="nobb DarkerBlue" colspan="2">Date:</td>
        </tr>
        <tr>
            <td class="notb" colspan="2">
                <?= $model->date ?></td>
        </tr>

    </table>
</div>