Praxissofttware/views/open_services.ejs

77 lines
2.2 KiB
Plaintext

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Offene Leistungen</title>
<link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-4">
<h3>🧾 Offene Leistungen</h3>
<% let currentPatient = null; %>
<% rows.forEach(r => { %>
<% if (!currentPatient || currentPatient !== r.patient_id) { %>
<% currentPatient = r.patient_id; %>
<hr>
<h5>
👤 <%= r.firstname %> <%= r.lastname %>
<form method="POST"
action="/patients/<%= r.patient_id %>/create-invoice"
target="_blank"
class="d-inline float-end">
<button class="btn btn-sm btn-success">
🧾 Rechnung erstellen
</button>
</form>
<a href="/services/open"
class="btn btn-sm btn-outline-secondary ms-1">
🔄 Aktualisieren
</a>
</h5>
<% } %>
<div class="border rounded p-2 mb-2 d-flex align-items-center gap-2">
<strong class="flex-grow-1">
<%= r.name_de %>
</strong>
<form method="POST"
action="/patients/services/update-price/<%= r.patient_service_id %>"
class="d-flex gap-1">
<input type="number"
step="0.01"
name="price"
value="<%= Number(r.price).toFixed(2) %>"
class="form-control form-control-sm"
style="width:100px">
<button class="btn btn-sm btn-outline-primary">
💾
</button>
</form>
<form method="POST"
action="/patients/services/delete/<%= r.patient_service_id %>"
onsubmit="return confirm('Leistung entfernen?')">
<button class="btn btn-sm btn-outline-danger">
</button>
</form>
</div>
<% }) %>
</div>
<script src="/js/open-services.js"></script>
</body>
</html>