<div data-action="daj_zdarzenia_odbicia" data-active="1"></div>
<div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-body table-responsive table-fixed-height table-fixed-height-30">
                <table id="PracownicyTable" class="table hover-rows custom-table OtherPracownicyTable" data-start-height="30vh">
                    <thead>
                    <tr class="text-uppercase">
                        <th style="width: 1%">Numer</th>
                        <th>Nazwisko i imię</th>
                        <th>Komórka</th>
                        <th>Stanowisko</th>
                        <th>Pion</th>
                        <th>Data</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($employees['bPracownicy']['bPracownik'] as $k => $employee) : ?>
                        <tr class="clickable-row"
                            data-key="<?php echo $employee['bGid']; ?>,<?php echo $employee['bNumerEwidencyjny']; ?>">
                            <td class="info-addon"><?php echo $employee['bNumerEwidencyjny']; ?></td>
                            <td><?php echo $employee['bNazwiskoImie']; ?></td>
                            <td><?php echo !empty($employee['bKomorka']) ? $employee['bKomorka'] : ''; ?></td>
                            <td><?php echo !empty($employee['bStanowisko']) ? $employee['bStanowisko'] : ''; ?></td>
                            <td><?php echo !empty($employee['bPion']) ? $employee['bPion'] : ''; ?></td>
                            <td><span class="span-date"><?php echo !empty($employee['bDataPrzyjecia']) ? $employee['bDataPrzyjecia'] : ''; ?></span></td>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
        <?php echo $this->Element('table_loading'); ?>
        <div data-container="table">
            <div class="no-data">
                <p>Wybierz pracownika</p>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.page-name:first-of-type').html('<?php echo $pageName; ?>');
    })
</script>

<script>
    // $(document).ready(function () {
    //     setTimeout(function () {
    //         $('.clickable-row').eq(0).find('td').eq(0).trigger('click');
    //     });
    // });
</script>

<style>
    .fc-scroller {
        max-height: calc(44vh)!important;
    }
</style>

<?php echo $this->element('alert_close'); ?>
