<?php
require_once '../config/config.php';
require_once '../includes/auth.php';
requireAdmin();
require_once '../includes/header.php';
?>

<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <div class="call-panel">
                <h1>Painel de Chamada</h1>
                <div id="ultimaChamada">
                    <div class="patient-name" id="nomePaciente"></div>
                    <div class="doctor-info" id="infoMedico"></div>
                    <div class="room-info" id="infoConsultorio"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- Histórico de Chamadas -->
    <div class="row mt-4">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <h5 class="card-title">Últimas Chamadas</h5>
                    <div class="table-responsive">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>Horário</th>
                                    <th>Paciente</th>
                                    <th>Médico</th>
                                    <th>Consultório</th>
                                </tr>
                            </thead>
                            <tbody id="historicoLista">
                                <!-- Preenchido via JavaScript -->
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="<?php echo BASE_URL; ?>/assets/js/painel.js"></script>
<?php require_once '../includes/footer.php'; ?> 