@extends('adminlte::page')

@section('title', 'Modelos')

@section('content_header')

    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <!-- left column -->
                <div class="col-md-6">
                    <h1><i class="fa fa-th" aria-hidden="true"></i> Mantenimiento de Modelos de Vehículos</h1>
                </div>

                <div class="col-md-6" id="grupo__accion">
                    <br><br>
                    <div class="float-right">
                        <button type="button" class="btn btn-primary" id="busquedaVeh"> <i class="fas fa-plus"></i> Nuevo
                        </button>
                        <button type="button" class="btn btn-success" id="btnRecargar"> <i class="fas fa-retweet"></i>
                            Actualizar</button>
                    </div>

                </div>
            </div>
        </div>
    </section>
@stop

@section('content')
    <!--<section class="content">
    <div class="container-fluid">-->
    <div style="display:none;" id="loader"></div>
    <div id="DivPrincipal">
        <form id="vehiculo_form" method="post" enctype="multipart/form-data">
            @csrf
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- /.card -->
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body">
                            <table id="tblBuscarModelos" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>Cod marca</th>
                                        <th>Des marca</th>
                                        <th>IdDetcatalogo</th>
                                        <th>Idcatalogo</th>
                                        <th>Cod Modelo</th>
                                        <th>Descripción</th>
                                        <th>Idpadre</th>
                                        <th>Estado</th>
                                    </tr>
                                </thead>
                                <tfoot>

                                </tfoot>
                            </table>
                        </div>
                        <!-- /.card-body -->
                    </div>

                </div>

            </div>
        </form>
    </div>
    <!--</div>
                                                                                                                                </section>-->


    <!--xl large-->
    <div class="modal fade" id="modal-xl">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"> <i class="fas fa-search"> </i> Modelos de Vehículos</h4>
                    <button id="CloseModal" type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <!--<p>One fine body&hellip;</p>-->
                    <form id="modelo_form" method="post" enctype="multipart/form-data">
                        @csrf
                        <div class="row">
                            <div class="col-12">

                                <div class="card-body">
                                    <input id="IdDetcatalogo" name="IdDetcatalogo" hidden value="0">
                                    <input id="CodigoCatalogo" name="CodigoCatalogo" hidden>
                                    <input id="IdPadre" name="IdPadre" hidden>

                                    <div class="form-group">
                                        <label>Marca: </label>
                                        <select class="form-control select2bs4" style="width: 100%;" id="marca" name="marca"
                                            tabindex="-1">
                                            {{-- @foreach ($marcas as $marca)
                                                <option value="{{ $marca->IdDetcatalogo }}"> {{ $marca->Descricion }} </option>
                                            @endforeach --}}
                                        </select>
                                    </div>

                                    <div class="form-group">
                                        <label for="InputOperacion">Descripcíon: </label>
                                        <input type="text" class="form-control" id="descricion" name="descricion"
                                            placeholder="Ingrese el Modelo">
                                    </div>
                                    <div class="form-group">
                                        <label>Estado: </label>
                                        <select class="form-control select2bs4" style="width: 100%;" id="estado"
                                            name="estado">
                                            <option value="A" selected="selected">Activo</option>
                                            <option value="I">Inactivo</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer justify-content-rigth">
                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
                    <button type="button" class="btn btn-primary" id="btnGuardar" name="btnGuardar">Guardar Cambios</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
@stop

@section('css')
    
@stop

@section('js')
    <script src="../../js/mantenimientos/vehiculo/modelos.js"></script>
@stop
