Display holidays from JSON feed

This commit is contained in:
2020-07-14 21:36:43 +02:00
parent 5e0285d608
commit d3e6b5a549
5 changed files with 44 additions and 6 deletions

View File

@@ -395,7 +395,9 @@ function fetchCalendarSettings($pdo, $doctor)
function fetchDoctorHolidays($pdo, $doctor)
{
$query = "SELECT * FROM festivo WHERE medico IS NULL OR medico=?";
$query = "SELECT festivo.id, fecha_festivo, tipo_festivo, medico, nombre FROM festivo
INNER JOIN usuario ON festivo.medico = usuario.id;
WHERE medico IS NULL OR medico=?";
$result = $pdo->prepare($query);
$result->execute([$doctor]);
$data = $result->fetchAll(PDO::FETCH_ASSOC);