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

    <div class="sixteen wide tablet sixteen wide computer column ">
        <div class="ui segment">
            
            <h4 class="ui dividing header teal centered">REGISTRO DE PROVEEDORES</h4>
            
            <table class="ui celled striped table">
                <thead>
                    <tr>
                        <th class="head_table">N°</th>
                        <th class="head_table">Nombre / Razon Social</th>
                        <th class="head_table">Documento</th>
                        <th class="head_table">Direccion</th>
                        <th class="head_table">Acciones</th>
                    </tr>
                </thead>
                <tbody>
                   <?php /**/ $i = $data->firstItem() /**/ ?>
                    <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $proveedor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr data-table="<?php echo e($proveedor->id_proveedor); ?>">
                        <td><?php echo e($i); ?></td>
                        <td><?php echo e($proveedor->nombre); ?></td>
                        <td><?php echo e($proveedor->tipo_documento ? $proveedor->tipo_documento->nombre ." : ". $proveedor->numero_documento : ''); ?></td>
                        <td><?php echo e($proveedor->direccion); ?></td>
                        <td>        
                            <div class="ui mini vertical animated positive button button_info_modal" title="Ver informacion detallada" data-id="<?php echo e($proveedor->id_proveedor); ?>">
                                <div class="hidden content">Info</div>
                                <div class="visible content"><i class="search icon"></i></div>
                            </div>                    
                            <a class="ui mini vertical animated blue button" title="Editar datos" href="<?php echo e(url('proveedor/editar/'.$proveedor->id_proveedor)); ?>">
                                <div class="hidden content">Editar</div>
                                <div class="visible content"><i class="pencil alternate  icon"></i></div>
                            </a>
                            <div class="ui mini vertical animated red button button_delete_modal" title="Eliminar registro" data-id="<?php echo e($proveedor->id_proveedor); ?>">
                                <div class="hidden content">Eliminar</div>
                                <div class="visible content"><i class="trash alternate icon"></i></div>
                            </div>
                        </td>
                    </tr>
                    <?php /**/ $i++ /**/ ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="5">
                            <?php echo $__env->make('layout.includes.pagination', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </th>
                    </tr>
                </tfoot>
                
            </table>

        </div>
    </div>

    <!--start delete modal -->
    <div class="ui small basic modal" id="delete_modal">
        <div class="ui icon header"><i class="trash alternate icon"></i>Eliminar Registro</div>
        <div class="content" style="text-align: center; font-size: 16px">
          <p>¿Está seguro que quiere eliminar este registro del sistema?</p>
        </div>
        <div class="actions">
            <div class="ui red basic cancel inverted button" title="Haga clic para salir"><i class="remove icon"></i>Cancelar</div>
            <div class="ui green ok inverted button" title="Haga clic para eliminar"> <i class="checkmark icon"></i>Eliminar</div>
        </div>
    </div>
    <!--end delete modal -->

    <!--start details modal -->
    <div class="ui standard small modal" id="detalles_modal">
        <div class="header">Información del Proveedor</div>
        <div class="content">
            <div class="description">
                <div class="ui equal width grid">
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Nombre / Razon Social : </b></div>
                        <div class="ten wide column"><span id="nombre"></span></div>
                    </div>
                   <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Tipo de Documento : </b></div>
                        <div class="ten wide column"><span id="tipo_documento"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Nro Documento : </b></div>
                        <div class="ten wide column"><span id="numero_documento"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Direccion : </b></div>
                        <div class="ten wide column"><span id="direccion"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Telefono : </b></div>
                        <div class="ten wide column"><span id="telefono"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Email : </b></div>
                        <div class="ten wide column"><span id="email"></span></div>
                    </div>
                </div>
            </div>
        </div>   
        <div class="actions">
            <div class="ui primary right labeled icon deny button">Cerrar<i class="times icon"></i></div>
        </div>
    </div>
    <!--end details modal -->

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

<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(asset('js/proveedor/listar.js')); ?>"></script>
<?php $__env->stopSection(); ?>



<?php echo $__env->make('layout.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>