<?php
// csr/test_api.php
?>
<!DOCTYPE html>
<html>
<head>
    <title>API Test</title>
<link rel="stylesheet" href="../assets/theme.css">
<link rel="stylesheet" href="../assets/portal-dark.css">
    <link rel="stylesheet" href="../assets/ushs-global-theme.css">
</head>
<body>
    <h1>API Test</h1>
    <div id="result"></div>
    
    <script>
    fetch('ajax/get_dashboard_data.php')
        .then(response => response.json())
        .then(data => {
            document.getElementById('result').innerHTML = 
                '<pre>' + JSON.stringify(data, null, 2) + '</pre>';
        })
        .catch(error => {
            document.getElementById('result').innerHTML = 'Error: ' + error;
        });
    </script>
</body>
</html>