Submarine
Deploy HouseHub / deploy (push) Successful in 2s

This commit is contained in:
2026-06-19 21:37:20 +02:00
parent 2e30569675
commit 142d4612a9
6 changed files with 634 additions and 189 deletions
@@ -3,13 +3,22 @@ header('Content-Type: application/json');
require __DIR__ . '/../../../../includes/db.php';
try {
// 🔥 LE FIX : On interroge la NOUVELLE table des quotas individuels !
$stmt = $pdo->query("
SELECT person_id, leave_type, initial_balance, balance_year
FROM pf_leave_balances
SELECT
person_id,
leave_type AS type,
allowance,
method,
anniversary_date AS date
FROM pf_person_leave_meta
");
$balances = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode(['balances' => $balances]);
echo json_encode([
'status' => 'success',
'balances' => $balances
]);
} catch (PDOException $e) {
http_response_code(500);
echo json_encode([
@@ -17,3 +26,4 @@ try {
'message' => $e->getMessage(),
]);
}
?>