<?= $this->extend('layout/management_layout') ?>
<?= $this->section('content') ?>
<div class="container-fluid">
    <div class="wrapper">
        <div class="content"></div>
                <h1>administrator Attendance Records</h1>
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>administrator Name</th>
                            <th>Date</th>
                            <th>Time In</th>
                            <th>Time Out</th>
                            <th>Status</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        // Example data - in real scenario, this will be fetched from the database
                        $attendanceRecords = [
                            ['name' => 'John Doe', 'date' => '2024-06-01', 'time_in' => '09:00 AM', 'time_out' => '05:00 PM', 'status' => 'Present'],
                            ['name' => 'Jane Smith', 'date' => '2024-06-01', 'time_in' => '09:15 AM', 'time_out' => '05:15 PM', 'status' => 'Present'],
                            ['name' => 'Alice Johnson', 'date' => '2024-06-01', 'time_in' => '09:30 AM', 'time_out' => '04:45 PM', 'status' => 'Late'],
                            // Add more records as needed
                        ];

                        foreach ($attendanceRecords as $record) {
                            $dateDisp = !empty($record['date']) ? local_date($record['date'], 'm-d-Y') : '';
                            echo "<tr>
                                    <td>{$record['name']}</td>
                                    <td>" . esc($dateDisp) . "</td>
                                    <td>{$record['time_in']}</td>
                                    <td>{$record['time_out']}</td>
                                    <td>{$record['status']}</td>
                                  </tr>";
                        }
                        ?>
                    </tbody>
                </table>
            </div>
        </div>
       <?= $this->endSection() ?>
