@extends('adminlte::page')

@section('title', 'Rubros')

@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 {{ $tipo_item == 'S' ? 'Rubros': 'Reparaciones'}} </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-search"></i> Buscar
                        </button>
                        <button type="submit" class="btn btn-info toastrDefaultSuccess" id="btn_Grabar" name="btn_Grabar"> <i
                                class="fas fa-save">
                                Grabar</i></button>
                        <button type="submit" class="btn btn-info toastrDefaultSuccess" id="btn_Modifica"
                            name="btn_Modifica"> <i class="fas fa-save">
                                Modificar</i></button>
                        <button type="button" class="btn btn-danger" onclick="Limpiar()"> <i class="fas fa-trash">
                                Limpiar</i></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="servicios_form" method="post" enctype="multipart/form-data">
            @csrf
            <div class="row justify-content-center">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="card card-success" id="my-card">
                        <div class="card-header">
                            <h3 class="card-title">Datos {{ $tipo_item == 'S' ? 'Rubros': 'Reparaciones'}}</h3>
                        </div>
                        <!-- /.card-header -->
                        <!-- form start -->
    
                        <div class="card-body">
                            <div class="form-group">
                                <input id="id_item" name="id_item" hidden value="0">
                                <input id="tipo_item" name="tipo_item" hidden value="{{ $tipo_item }}">
                                <label>Descripción:</label>
    
                                <div class="input-group">
                                    <div class="input-group-prepend">
                                        <span class="input-group-text"><i class="fas fa-car"></i></span>
                                    </div>
                                    <input type="text" class="form-control" id="descripcion" name="descripcion"
                                        placeholder="Descripción">
                                </div>
                                <!-- /.input group -->
                            </div>
    
                            <div class="form-group">
                                <label>Descripción Larga:</label>
    
                                <div class="input-group">
                                    <div class="input-group-prepend">
                                        <span class="input-group-text"><i class="fas fa-car"></i></span>
                                    </div>
                                    <input type="text" class="form-control" id="descripcion_larga" name="descripcion_larga"
                                        placeholder="Descripción Larga">
                                </div>
                                <!-- /.input group -->
                            </div>
    
                            <div class="row">
                                <div class="col-4">
                                    <div class="form-group">
                                        <label>Precio:</label>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                              <span class="input-group-text">$</span>
                                            </div>
                                            <input type="number" class="form-control" id="precio" name="precio">
                                            <div class="input-group-append">
                                              <span class="input-group-text">.00</span>
                                            </div>
                                        </div>
                                    </div>        
                                </div>
                                <div class="col-5">
                                    
                                </div>
                            </div>
                            
                            
                            <div class="form-group">
                                <div class="form-check">
                                    <input class="form-check-input" type="checkbox" id="aplica_iva" name="aplica_iva">
                                    <label class="form-check-label">Aplica IVA</label>
                                </div>
                            </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>
                        <!-- /.card-body -->
    
                        <div class="card-footer">
                            <!--<button type="submit" class="btn btn-primary">Submit</button>-->
                        </div>
    
                         {{-- <div class="overlay" id="card-refresh">
                            <i class="fas fa-2x fa-sync-alt fa-spin"></i>
                        </div>  --}}
                    </div>
                </div>
                
            </div>
        </form>
    </div>
    
    <!--</div>
                                                                                                            </section>-->

    <div class="modal fade" id="modal-lg">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"></h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

                </div>
                <div class="modal-footer justify-content-between">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

    <!--xl large-->
    <div class="modal fade" id="modal-xl">
        <div class="modal-dialog modal-xl">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"> <i class="fas fa-search"> </i> Búsqueda de {{ $tipo_item == 'S' ? 'Rubros': 'Reparaciones'}}</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>-->
                    <div class="row">
                        <div class="col-12">

                            <!-- /.card -->
                            <div class="card">
                                <div class="card-header">
                                    <h3 class="card-title"></h3>
                                </div>
                                <!-- /.card-header -->
                                <div class="card-body">
                                    <table id="tblBuscarItems" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
                                                <th>cod Item</th>
                                                <th>Descripción</th>
                                                <th>Descripción Larga</th>
                                                <th>fecha ingreso</th>
                                                <th>Precio</th>
                                                <th>Estado</th>
                                                <th>Tipo Item</th>
                                                <th>IVA</th>
                                            </tr>
                                        </thead>
                                        <tfoot>

                                        </tfoot>
                                    </table>
                                </div>
                                <!-- /.card-body -->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer justify-content-between">
                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                                                                                                                          <button type="button" class="btn btn-primary">Save changes</button>-->
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
@stop

@section('css')
    
@stop

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