<?= $this->extend('layout/management_layout') ?>
<?= $this->section('content') ?>
<div class="container-fluid">
    <div class="wrapper">
        <div class="content"></div>
                <h1>Performance Reviews</h1>
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>Employee</th>
                            <th>Position</th>
                            <th>Review Date</th>
                            <th>Rating</th>
                            <th>Comments</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        // Example data - in real scenario, this will be fetched from the database
                        $performanceReviews = [
                            ['employee' => 'John Doe', 'position' => 'Teacher', 'review_date' => '2024-01-15', 'rating' => 'Excellent', 'comments' => 'Great performance throughout the year.'],
                            ['employee' => 'Jane Smith', 'position' => 'administrator', 'review_date' => '2024-01-20', 'rating' => 'Good', 'comments' => 'Consistently meets expectations.'],
                            ['employee' => 'Emily Johnson', 'position' => 'Teacher', 'review_date' => '2024-02-10', 'rating' => 'Satisfactory', 'comments' => 'Room for improvement in classroom management.'],
                            // Add more reviews as needed
                        ];

                        foreach ($performanceReviews as $review) {
                            $dateDisp = !empty($review['review_date']) ? local_date($review['review_date'], 'm-d-Y') : '';
                            echo "<tr>
                                    <td>{$review['employee']}</td>
                                    <td>{$review['position']}</td>
                                    <td>" . esc($dateDisp) . "</td>
                                    <td>{$review['rating']}</td>
                                    <td>{$review['comments']}</td>
                                  </tr>";
                        }
                        ?>
                    </tbody>
                </table>
            </div>
        </div>
        <?= $this->endSection() ?>
