<div class="view">
	<div class="card card-default">
		<div class="card-header h4">License Details</div>
		<div class="card-body">
			<div class="col-sm-12">
				<div class="row">
					<div class="col-sm-2">Employee Name</div>
					<div class="col-sm-2"><?= $model->user->fullname ?></div>
					<div class="col-sm-2">Name on License</div>
					<div class="col-sm-2"><?= $model->name ?></div>
					<div class="col-sm-2">License Number</div>
					<div class="col-sm-2"><?= $model->licensenumber ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2">Date of Birth</div>
					<div class="col-sm-2"><?= $model->dob ?></div>
					<div class="col-sm-2">Issuing Body</div>
					<div class="col-sm-2"><?= $model->issuingbody ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2">Issue Date</div>
					<div class="col-sm-2"><?= $model->issuedate ?></div>
					<div class="col-sm-2">Expiry Date</div>
					<div class="col-sm-2"><?= $model->expirydate ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2">Address on License</div>
					<div class="col-sm-2"><?= $model->address ?></div>
				</div>
			</div>
		</div>
	</div>
	<div class="card card-default">
		<div class="card-header h4">Categories</div>
		<div class="card-body">
			<div class="col-sm-12">
				<div class="row">
					<div class="col-sm-2">Category Name</div>
					<div class="col-sm-6">Entitlement</div>
					<div class="col-sm-2">Issued Date</div>
					<div class="col-sm-2">Expiry Date</div>
				</div>
				<?php foreach ($model->cats as $a => $cat) { ?>
				<div class="row">
					<div class="col-sm-2"><?= $cat->description->category ?></div>
					<div class="col-sm-6"><?= $cat->description->description ?></div>
					<div class="col-sm-2"><?= $cat->startdate ?></div>
					<div class="col-sm-2"><?= $cat->enddate ?></div>
				</div>
			<?php } ?>
			</div>
		</div>
	</div>
	<?php if ($model->endorsements) { ?>
		<div class="card card-danger">
			<div class="card-header h4">Endorsements</div>
			<div class="card-body">
				<div class="col-sm-12">
					<div class="row">
						<div class="col-sm-2">Points Awarded</div>
						<div class="col-sm-6">Description</div>
						<div class="col-sm-2">Issued Date</div>
						<div class="col-sm-2">Expiry Date</div>
					</div>
					<?php foreach ($model->endorsements as $a => $cat) { ?>
					<div class="row">
						<div class="col-sm-2"><?= $cat->pointsawarded ?></div>
						<div class="col-sm-6"><?= $cat->description ?></div>
						<div class="col-sm-2"><?= $cat->issuedate ?></div>
						<div class="col-sm-2"><?= $cat->expirydate ?></div>
					</div>
				<?php } ?>
				</div>
			</div>
		</div>
	<?php } ?>
		<?php if ($model->files) { ?>
			<?= $this->render('/uploads/files', ['files' => $model->files]); ?>
		<?php } ?> 
	
	<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">Created By</div>
					<div class="col-sm-2"><?= $model->createdby->fullname ?></div>
					<div class="col-sm-2">Created At</div>
					<div class="col-sm-2"><?= date ('d/m/Y', $model->created_at) ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2">Updated By</div>
					<div class="col-sm-2"><?= $model->updatedby->fullname ?></div>
					<div class="col-sm-2">Updated At</div>
					<div class="col-sm-2"><?= date ('d/m/Y', $model->updated_at) ?></div>

				</div>
				<div class="row">
					<div class="col-sm-2">Deleted By</div>
					<div class="col-sm-2"><?= $model->deleted_by ?></div>
					<div class="col-sm-2">Deleted At</div>
					<div class="col-sm-2"><?= $model->deleted_at > 0 ? date ('d/m/Y', $model->deleted_at) : null ?></div>
					<div class="col-sm-2">Deleted</div>
					<div class="col-sm-2"><?= $model->deleted == true ? 'Yes' : 'No' ?></div>
				</div>
				<div class="row">
					<div class="col-sm-2">Status</div>
					<div class="col-sm-2"><?= $model->status ?></div>
				</div>
			</div>
		</div>
	</div>
 	<div class="hidden">
		
		<div class="col-sm-2">Actid</div>
		<div class="col-sm-2"><?= $model->actid ?></div>
		<div class="col-sm-2">Pad No</div>
		<div class="col-sm-2"><?= $model->padno ?></div>
		<div class="col-sm-2">Job NO</div>
		<div class="col-sm-2"><?= $model->jobno ?></div>

	</div>
</div>
