<?php $__env->startSection('titulo'); ?>
    <i class="fas fa-user-tie"></i> Consulta Motorista
<?php $__env->stopSection(); ?>

<?php $__env->startSection('css'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(URL::asset('js/views/consulta/consmotorista.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('pagina'); ?>

    <div class="container-fluid">

        <div class="card rounded text-left">
            <div class="card-header">
                <i class="fas fa-filter"></i> <b>Filtros</b>
            </div>
            <div class="card-body">
                <div class="row" >
                    <div class="col col-sm-3 text-left">
                        <label for="txtNomePesquisa" class="col-form-label text-md-left">Motorista</label>
                        <br/>
                        <input id="txtNomePesquisa" class="form-control" type="text"/>
                    </div>

                    <div class="col col-sm-2 text-left">
                        <label for="txtCpfPesquisa" class="col-form-label text-md-left">CPF</label>
                        <br/>
                        <input id="txtCpfPesquisa" class="form-control mask_cpf" type="text"/>
                    </div>

                    <div class="col col-sm-2 text-left">
						<label for="txtMotoristaPesquisa" class="col-form-label text-md-left">&nbsp;</label>
						<br/>
						<button id="btnPesquisaMotorista"  class="btn btn-default btn-group-justified"><i class="fas fa-search"></i> Pesquisar</button>
					</div>
                </div>

            </div>
        </div>
        <br/>

        <div class="row" >
            <div class="col panel panel-primary table-responsive">

                <table id="tbMotorista" class="table table-hover text-left">
                    <thead>
                        <tr>
                            <th>Nome</th>
                            <th>CPF</th>
                            <th>Celular</th>
                            <th>Cidade</th>
                            <th>Status</th>
                            
                        </tr>
                    </thead>
                    <tbody>

                        <?php $__currentLoopData = $motorista; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $moto): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                
                                <td id="<?php echo e($moto->getId()); ?>_nome"><?php echo e($moto->getNome()); ?></td>
                                <td id="<?php echo e($moto->getId()); ?>_cpf"><?php echo e($moto->getCpf()); ?></td>
                                <td id="<?php echo e($moto->getId()); ?>_celular"><?php echo e($moto->getCelular()); ?></td>

                                <td id="<?php echo e($moto->getId()); ?>_cidade"
									data="<?php echo e($moto->getFkCidade()); ?>"
									data2="<?php echo e($moto->Cidade->getFkEstado()); ?>">
									<?php echo e($moto->Cidade->getNome()); ?>

								</td>
                                
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_endereco" value="<?php echo e($moto->getEndereco()); ?>"/>
								<input type="hidden" id="<?php echo e($moto->getId()); ?>_bairro" value="<?php echo e($moto->getBairro()); ?>"/>
								<input type="hidden" id="<?php echo e($moto->getId()); ?>_numero" value="<?php echo e($moto->getNumero()); ?>"/>
								<input type="hidden" id="<?php echo e($moto->getId()); ?>_complemento" value="<?php echo e($moto->getComplemento()); ?>"/>
								<input type="hidden" id="<?php echo e($moto->getId()); ?>_bairro" value="<?php echo e($moto->getBairro()); ?>"/>
								<input type="hidden" id="<?php echo e($moto->getId()); ?>_observacao" value="<?php echo e($moto->getObs()); ?>"/>

                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_rg" value="<?php echo e($moto->getRg()); ?>"/>
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_rg_orgao" value="<?php echo e($moto->getRgOrgao()); ?>"/>
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_rg_uf" value="<?php echo e($moto->getRgUf()); ?>"/>
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_cnh_nro" value="<?php echo e($moto->getCnh()); ?>"/>
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_cnh_categoria" value="<?php echo e($moto->getCnhCategoria()); ?>"/>
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_tipo" value="<?php echo e($moto->getTipo()); ?>"/>
                                <input type="hidden" id="<?php echo e($moto->getId()); ?>_celular" value="<?php echo e($moto->getCelular()); ?>"/>

                                <td id="<?php echo e($moto->getId()); ?>_ativo" data="<?php echo e($moto->getAtivo()); ?>">
                                    <?php if($moto->getAtivo()): ?>
                                        <span class="badge badge-success">Ativo</span>
                                    <?php else: ?>
                                        <span class="badge badge-danger">Inativo</span>
                                    <?php endif; ?>
                                </td>

                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </tbody>
                </table>

            </div>
        </div>
    </div>

   
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>