Termine-Tab nur offene Termine, Spalten links, Formular 60% Breite

- Termine-Tab (/) zeigt in der Liste nur noch offene (nicht erledigte)
  Termine; Überschrift entsprechend "Offene Termine"
- Spalten Arzt, Fachrichtung und Bemerkungen linksbündig (Header + Zellen)
- Eingabe-Panel (AppointmentForm) auf 60% Breite reduziert und zentriert

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 18:47:02 +02:00
parent 2662b9a3e1
commit 9499011a3a
3 changed files with 12 additions and 9 deletions
+5 -2
View File
@@ -126,6 +126,9 @@ export default function Home() {
const handlePrint = () => window.print(); const handlePrint = () => window.print();
// Termine-Tab zeigt nur offene (nicht erledigte) Termine
const openAppointments = appointments.filter((a) => !a.erledigt);
// Aktuelle (offene) Termine ab heute für die Druckansicht // Aktuelle (offene) Termine ab heute für die Druckansicht
const startOfToday = new Date(); const startOfToday = new Date();
startOfToday.setHours(0, 0, 0, 0); startOfToday.setHours(0, 0, 0, 0);
@@ -156,12 +159,12 @@ export default function Home() {
</div> </div>
<div className="bg-white border border-black rounded-lg shadow-md p-6"> <div className="bg-white border border-black rounded-lg shadow-md p-6">
<h2 className="text-xl font-semibold mb-4">Alle Termine</h2> <h2 className="text-xl font-semibold mb-4">Offene Termine</h2>
{isLoading ? ( {isLoading ? (
<div className="text-center py-4">Lade Daten...</div> <div className="text-center py-4">Lade Daten...</div>
) : ( ) : (
<AppointmentList <AppointmentList
appointments={appointments} appointments={openAppointments}
onToggleDone={toggleDone} onToggleDone={toggleDone}
onEdit={startEdit} onEdit={startEdit}
onDelete={setDeleteId} onDelete={setDeleteId}
+1 -1
View File
@@ -98,7 +98,7 @@ export default function AppointmentForm({
'w-full px-2 py-1 text-sm rounded border-2 border-gray-400 bg-white focus:border-blue-500 focus:outline-none'; 'w-full px-2 py-1 text-sm rounded border-2 border-gray-400 bg-white focus:border-blue-500 focus:outline-none';
return ( return (
<div className="bg-[#CCCCFF] border border-black p-6 rounded-lg mb-6"> <div className="bg-[#CCCCFF] border border-black p-6 rounded-lg mb-6 w-3/5 mx-auto">
{editingAppointment && ( {editingAppointment && (
<div className="mb-4 p-3 bg-blue-100 border border-blue-400 rounded text-sm text-blue-800"> <div className="mb-4 p-3 bg-blue-100 border border-blue-400 rounded text-sm text-blue-800">
<strong>Bearbeitungsmodus:</strong> Sie bearbeiten einen bestehenden <strong>Bearbeitungsmodus:</strong> Sie bearbeiten einen bestehenden
+6 -6
View File
@@ -56,12 +56,12 @@ export default function AppointmentList({
<thead> <thead>
<tr className="bg-[#CCCCFF] border-b-2 border-gray-400"> <tr className="bg-[#CCCCFF] border-b-2 border-gray-400">
<th className="p-2 text-center">Erledigt</th> <th className="p-2 text-center">Erledigt</th>
<th className="p-2 text-center">Arzt</th> <th className="p-2 text-left">Arzt</th>
<th className="p-2 text-center">Fachrichtung</th> <th className="p-2 text-left">Fachrichtung</th>
<th className="p-2 text-center">Datum</th> <th className="p-2 text-center">Datum</th>
<th className="p-2 text-center">Tag</th> <th className="p-2 text-center">Tag</th>
<th className="p-2 text-center">Zeit</th> <th className="p-2 text-center">Zeit</th>
<th className="p-2 text-center">Bemerkungen</th> <th className="p-2 text-left">Bemerkungen</th>
{hasActions && <th className="p-2 text-center">Aktion</th>} {hasActions && <th className="p-2 text-center">Aktion</th>}
</tr> </tr>
</thead> </thead>
@@ -94,12 +94,12 @@ export default function AppointmentList({
} }
/> />
</td> </td>
<td className="p-2 text-center font-medium">{app.arztName}</td> <td className="p-2 text-left font-medium">{app.arztName}</td>
<td className="p-2 text-center">{app.arztArt || '-'}</td> <td className="p-2 text-left">{app.arztArt || '-'}</td>
<td className="p-2 text-center">{formatDate(app.termin)}</td> <td className="p-2 text-center">{formatDate(app.termin)}</td>
<td className="p-2 text-center">{getWeekday(app.termin)}</td> <td className="p-2 text-center">{getWeekday(app.termin)}</td>
<td className="p-2 text-center">{formatTime(app.termin)}</td> <td className="p-2 text-center">{formatTime(app.termin)}</td>
<td className="p-2 text-center">{app.bemerkungen || '-'}</td> <td className="p-2 text-left">{app.bemerkungen || '-'}</td>
{hasActions && ( {hasActions && (
<td <td
className="p-2 text-center" className="p-2 text-center"