<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model backend\models\Datestsbe */

$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Datestsbes', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="datestsbe-view">

    <p>
        <?= Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('Delete', ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => 'Are you sure you want to delete this item?',
                'method' => 'post',
            ],
        ]) ?>
    </p>


	<div class="row">
		<div class='col-sm-2 data-label'>Tester</div>
		<div class='col-sm-4'><?= $model->testerl->fullname ?></div>
	</div>

	<div class="row">
		<div class='col-sm-2 data-label'>Employee</div>
		<div class='col-sm-4'><?= $model->employeel->fullname ?></div>
		<div class='col-sm-2 data-label'>Witness</div>
		<div class='col-sm-4'><?= $model->witnessl->fullname ?></div>
	</div>


	<div class="row">
		<div class='col-sm-2 data-label'>Job No</div>
		<div class='col-sm-4'><?= $model->jobno ?></div>
	</div>


	<div class="row">
		<div class='col-sm-2 data-label'>Date</div>
		<div class='col-sm-4'><?= $model->date ?></div>


		<div class='col-sm-2 data-label'>Status</div>
		<div class='col-sm-4'><?= $model->status ?></div>
	</div>

	<div class="row">
		<div class="col-sm-3 data-label">Test</div>
		<div class="col-sm-2 data-label">Result</div>
		<div class="col-sm-2 data-label">Level</div>
		<div class="col-sm-5 data-label">Comments</div>
		
	</div>
	<?php foreach ($model->rows as $key => $steps) { ?>
	<div class="row">
		<div class="col-sm-3"><?= $steps->test ?></div>
		<div class="col-sm-2"><?= $steps->result ?></div>
		<div class="col-sm-2"><?= $steps->level ?></div>
		<div class="col-sm-5"><?= $steps->comments ?></div>
	</div>
	<?php } ?>


	<div class="row">
		<div class='col-sm-2 data-label'>Result</div>
		<div class='col-sm-4'><?= $model->result ?></div>
	</div>
	<div class="row">
		<div class='col-sm-12 data-label'>Comments</div>
		<div class='col-sm-12'><?= $model->comments ?></div>
	</div>
	
	<div class="row">
	 <div class="card card-default">
		<div class="card-header h4">Accountability</div>
		<div class="card-body">
			<div class="col-sm-12">
				<div class="row">
					<div class="col-sm-2 data-label">Created By</div>
					<div class="col-sm-2"><?= $model->createdby ? $model->createdby->fullname : null ?></div> 
					<div class="col-sm-2 data-label">Updated By</div>
					<div class="col-sm-2"><?= $model->updatedby ? $model->updatedby->fullname : null ?></div>
					<div class="col-sm-2 data-label">Deleted By</div>
					<div class="col-sm-2"><?= $model->deleted_by ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2 data-label">Created At</div>
					<div class="col-sm-2"><?= $model->created_at ?></div>
					<div class="col-sm-2 data-label">Updated At</div>
					<div class="col-sm-2"><?= $model->updated_at ?></div>
					<div class="col-sm-2 data-label">Deleted At</div>
					<div class="col-sm-2"><?= $model->deleted_at > 0 ? $model->deleted_at : null ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2 data-label">Status</div>
					<div class="col-sm-2"><?= $model->status ?></div>
				</div>
			</div>
		</div>
	</div>
	
</div>
