<?php
/**
 * GET /api/app/attendance/service-types
 */
require_once __DIR__ . '/../../bootstrap.php';
requireApiPermission('attendance.view');

try {
    $stmt = $pdo->query("SELECT id, name FROM service_types WHERE is_active = 1 ORDER BY name");
    echo json_encode($stmt->fetchAll(PDO::FETCH_ASSOC));
} catch (PDOException $e) {
    http_response_code(500);
    echo json_encode([]);
}
