<?php

use yii\helpers\Html;

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

$this->title = 'Vehicle Keys: ' . $model->vehiclel->reg .' - '.$model->type;
$this->params['breadcrumbs'][] = ['label' => 'Vehiclekeysbes', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="vehiclekeysbe-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="card card-default">
		<div class="card-header">Keys</div>
		<div class="card-body">
			<div class="row">
				<div class="col-sm-2 data-label">Employee</div>
				<div class="col-sm-4"><?= isset($model->employeel) ? $model->employeel->fullname : null ?></div>
				<div class="col-sm-2 data-label">Vehicle</div>
				<div class="col-sm-4"><?= $model->vehiclel->reg ?></div>
			</div>

			<div class="row">
				<div class="col-sm-2 data-label">Key Type</div>
				<div class="col-sm-4"><?= $model->type ?></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-2 data-label">Location</div>
				<div class="col-sm-4"><?= $model->location ?></div>
				<div class="col-sm-2 data-label">Peg</div>
				<div class="col-sm-4"><?= $model->peg ?></div>
			</div>
		</div>
	</div>
	<div class="card card-default">
		<div class="card-header">Accountability</div>
		<div class="card-body">
			<div class="row">
				<div class="col-sm-2 data-label">Created by</div>
				<div class="col-sm-2"><?= $model->createdby->fullname ?></div>
				<div class="col-sm-2 data-label">Updated by</div>
				<div class="col-sm-2"><?= $model->updatedby->fullname ?></div>
				<div class="col-sm-2 data-label">Deleted by</div>
				<div class="col-sm-2"><?= isset($model->deletedby) ? $model->deletedby : null ?></div>
			</div>
			<div class="row">
				<div class="col-sm-2 data-label">Created at</div>
				<div class="col-sm-2"><?= date('d/m/Y H:i', $model->created_at) ?></div>
				<div class="col-sm-2 data-label">Updated at</div>
				<div class="col-sm-2"><?= date('d/m/Y H:i', $model->updated_at) ?></div>
				<div class="col-sm-2 data-label">Deleted at</div>
				<div class="col-sm-2"><?= $model->deleted_at ? date('d/m/Y H:i', $model->deleted_at) : '' ?></div>
			</div>
		</div>
	</div>
</div>
