Create appointment dialog on click

This commit is contained in:
2020-06-26 12:19:51 +02:00
parent b93df4005b
commit 21213f993d
6 changed files with 1359 additions and 51 deletions

View File

@@ -8,6 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/style.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="static/fullcalendar.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="static/jquery-ui.css" type="text/css" media="screen"/>
<script src="static/jquery-3.5.1.min.js"></script>
<script src="static/jquery-ui.min.js"></script>
<script src="static/moment.min.js"></script>
@@ -20,6 +21,8 @@
include 'database.php';
$pdo = connectDatabase();
$list = listPatients($pdo);
$calendar_settings = fetchCalendarSettings($pdo, $doctor);
?>
<?php if($_SESSION["user_type"] == 1): ?>
<form name="select_doctor" method="post" action="appointment_management.php">
@@ -35,6 +38,31 @@
</div>
<?php endif; ?>
<?php closeDatabase($pdo); ?>
<div id="dialog-form" title="Añadir cita">
<form>
<div class="input-group">
<label for="hora">Hora</label>
<input type="time" name="hora" value="">
</div>
<div class="input-group">
<label for="duracion">Duración</label>
<input type="number" name="duracion" value="<?php echo $calendar_settings[8]; ?>" step="30">
</div>
<div class="input-group">
<label for="observaciones">Observaciones</label>
<input type="text" name="observaciones" value="">
</div>
<div class="input-group">
<select id="paciente" name="paciente">
<option>Seleccione un paciente</option>
<?php foreach ($patients as $row) : ?>
<option value="<?php echo $row[0]; ?>"><?php echo $row[1]; ?></option>
<?php endforeach ?>
</select>
</div>
<button class="create_btn" type="submit" name="crear" >Añadir cita</button>
</form>
</div>
<div class="response"></div>
<div id="calendar"></div>
</body>