65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Wartezimmer</title>
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-dark bg-dark px-3">
|
|
<span class="navbar-brand">🪑 Wartezimmer</span>
|
|
<a href="/dashboard" class="btn btn-outline-light btn-sm">Dashboard</a>
|
|
</nav>
|
|
|
|
<div class="container mt-4">
|
|
|
|
<!-- ✅ EINMAL Flash anzeigen -->
|
|
<%- include("partials/flash") %>
|
|
|
|
<% if (patients.length === 0) { %>
|
|
<div class="alert alert-info">
|
|
Keine Patienten im Wartezimmer
|
|
</div>
|
|
<% } else { %>
|
|
|
|
<table class="table table-bordered table-hover">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Geburtstag</th>
|
|
<th>Aktion</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<% patients.forEach(p => { %>
|
|
<tr>
|
|
<td><strong><%= p.firstname %> <%= p.lastname %></strong></td>
|
|
<td><%= new Date(p.birthdate).toLocaleDateString("de-DE") %></td>
|
|
<td>
|
|
<% if (user.role === 'arzt') { %>
|
|
<form method="POST"
|
|
action="patients/waiting-room/call/<%= p.id %>"
|
|
class="d-inline">
|
|
<button class="btn btn-sm btn-success">
|
|
▶️ Aufrufen
|
|
</button>
|
|
</form>
|
|
<% } else { %>
|
|
<span class="text-muted">🔒 Nur Arzt</span>
|
|
<% } %>
|
|
</td>
|
|
</tr>
|
|
<% }) %>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|