<?php

use yii\helpers\Html;
use common\widgets\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\LicensedatabeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Driving Licenses';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="licensedatabe-index">


	<p>
		To check driving linceses you require a code from the driver;
		This codes last 21 days, 
		The Employee will need their Driving License Number, NI Number and Post Code on their license
		THe link's are <?= HTML::A('create a Key', 'https://www.viewdrivingrecord.service.gov.uk/driving-record/licence-number', ['target' => '_blank']) ?> and 
		To Check you Need the Last 8 charaters of the employees driving license number and the code from the above link.
		<?= HTML::A('Check a Key', 'https://www.viewdrivingrecord.service.gov.uk/driving-record/validate', ['target' => '_blank']) ?>
	</p>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('Add License', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            //['class' => 'yii\grid\SerialColumn'],

            //'id',
            'user.fullname',
            // 'deleted_by',
            // 'deleted_at',
            // 'deleted',
            // 'actid',
             'status',
             'activepoints',
            // 'padno',
            // 'jobno',
            // 'employee',
            // 'name',
            // 'licensenumber',
            // 'dob',
            'issuingbody',
            // 'issuedate',
            'expirydate',
            // 'address',
    		'created_at:datetime',
            'updated_at:datetime',
            'createdby.fullname',
            'updatedby.fullname',
        
            ['class' => 'common\widgets\ActionColumn'],
        ],
    ]); ?>
</div>
