<div class='row'>
        <?php $filters = $_reporte->getOptions();?>
        <table class="w-100">
            <tr>
                <td><strong><?php echo $_translator->_getTranslation('Sucursal');?></strong></td>
                <td><?php echo $filters['store_name'] ?></td>
                <td></td>
                <td class="text-right"><span class="_report btn btn-primary btn-sm" data-reportname="mobile_time_clock" data-toggle='modal' data-target='#modalFiltroReportes'><i class="fa fa-pencil"></i></span></td>
            </tr>
            <tr>
                <td><strong><?php echo $_translator->_getTranslation('Fecha inicio');?></strong></td>
                <td><?php echo $filters['fechaInicio'] ?></td>
                <td><strong><?php echo $_translator->_getTranslation('Fecha fin');?></strong></td>
                <td class="text-right"><?php echo $filters['fechaFin'] ?></td>
            </tr>
            <tr>
               
            </tr>
        </table>
        <hr/>
        <?php $result = $_reporte->getReporte(); ?> 
        <table class="table">
            <thead>
                <tr>
                    <th><?php echo $_translator->_getTranslation('Nombre') ?></th>
                    <th class="text-center"><?php echo $_translator->_getTranslation('Entrada') ?></th>
                    <th class="text-center"><?php echo $_translator->_getTranslation('Salida') ?></th>
                    <th class="text-center"><?php echo $_translator->_getTranslation('Horas') ?></th>
                    <!--<th></th>-->
                </tr>
            </thead>
           <tbody class="time_clock">
            <?php 
            foreach($result['data'] as $row){?>
                <tr class="_edit" data-id="<?php echo $row['id'] ?>">
                    <td><?php echo $row['userName'] ?></td>
                    <td class="text-center"> <?php echo $row['check_in'] ?></td>
                    <td class="text-center"> <?php echo $row['check_out'] ?></td>
                    <td class="text-center"> <?php echo number_format($row['total'],2) ?></td>
                    <!--<td><i class="fa fa-ellipsis-v"></i></td>-->
                </tr><?php                    
            }?>            
            </tbody>
        </table>        
</div>
<?php include ROOT."/View/Modal/agregarTimeClock.php"; ?>
<style>
</style>
<script>
    $('#check_in,#check_out').datetimepicker({format: "MM/DD/YYYY hh:mm A "});
    $('._updateTimeClock').on('click',function(){
        updateTimeClock();
    });
    
    $('._closeModalTimeClock').on('click',function(){
        clearForm('timeClock');
        $('.flashmessenger').html('');
        $('#modalAgregarTimeClock').modal('hide');
    });
    
    $('tbody.time_clock tr._edit').on('click',function(e){
        if (!$(e.target).closest('._delete').length) {
            clearForm('timeClock');
            $('.flashmessenger').html('');
            $('#titulo_modal_timeClock').html('Editar Checada');
            var id = $(this).data('id');
            setDataToEditTimeClock(id);
        }       
    }); 
    
    $('tbody.time_clock tr ._delete').on('click',function(){
        var id = $(this).data('id');
        deleteTimeClock(id);
    });
</script>