<?php $__env->startSection('titulo'); ?>
    <i class="fas fa-truck"></i> Consulta Veículo
<?php $__env->stopSection(); ?>

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

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

    <div class="container-fluid">
        <div class="row" >
            <div class="col col-sm-2 text-left">
                <label for="txtPlacaPesquisa" class="col-form-label text-md-left">Busca Placa</label>
                <br/>
                <input id="txtPlacaPesquisa" class="form-control" type="text"/>
            </div>
           
            <div class="col col-sm-2 text-left">
                <label for="txtCidadePesquisa" class="col-form-label text-md-left">&nbsp;</label>
                <br/>
                <button id="btnPesquisaVeiculo"  class="btn btn-default btn-group-justified"><i class="fas fa-search"></i> Pesquisar</button>
            </div>
        </div>
    <br/>
    <div class="row" >
        <div class="col panel panel-primary table-responsive">

                <table id="tbVeiculos" class="table table-hover text-left">
                    <thead>
                        <tr>
                            <th>Placa</th>
                            <th>Marca</th>
                            <th>Modelo</th>
                            <th>Ano</th>
                            <th>Tipo</th>
                            <th>Situação</th>
                           
                        </tr>
                    </thead>
                    <tbody>

                        <?php $__currentLoopData = $veiculos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $veiculo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td id="<?php echo e($veiculo->getId()); ?>_placa"><?php echo e($veiculo->getPlaca()); ?></td>
                                <td id="<?php echo e($veiculo->getId()); ?>_marca"><?php echo e($veiculo->getMarca()); ?></td>
                                <td id="<?php echo e($veiculo->getId()); ?>_modelo"><?php echo e($veiculo->getModelo()); ?></td>
                                <td id="<?php echo e($veiculo->getId()); ?>_ano"><?php echo e($veiculo->getAno()); ?></td>
                                <td id="<?php echo e($veiculo->getId()); ?>_tipo" data="<?php echo e($veiculo->Tipo->getId()); ?>"><?php echo e($veiculo->Tipo->getNome()); ?></td>
                                <td id="<?php echo e($veiculo->getId()); ?>_situacao" data="<?php echo e($veiculo->getSituacao()); ?>">
                                    <?php if($veiculo->getSituacao() == 'A'): ?>
                                        <span class="badge badge-success">Ativo</span>
                                    <?php elseif($veiculo->getSituacao() == 'I'): ?>
                                        <span class="badge badge-danger">Inativo</span>
                                    <?php elseif($veiculo->getSituacao() == 'B'): ?>
                                        <span class="badge badge-warning">Bloqueado</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(); ?>