diff --git a/pflegepilot_v3/frontend/src/app/(app)/admin/page.tsx b/pflegepilot_v3/frontend/src/app/(app)/admin/page.tsx index b723462..ed6b54a 100644 --- a/pflegepilot_v3/frontend/src/app/(app)/admin/page.tsx +++ b/pflegepilot_v3/frontend/src/app/(app)/admin/page.tsx @@ -16,7 +16,7 @@ import { import { ResponsiveTable, type Column } from "@/components/ResponsiveTable"; import { BegruendungModal } from "@/components/BegruendungModal"; import { Collapsible } from "@/components/Collapsible"; -import { getAccent } from "@/lib/theme"; +import { getAccent, buttonStyles } from "@/lib/theme"; type Aktion = { typ: "sperren" | "entsperren" | "loeschen" | "abo"; nutzer: NutzerAdmin }; @@ -114,17 +114,17 @@ export default function AdminPage() { n.id === eigeneId ? ( eigenes Konto ) : ( -
+
{n.aktiv ? ( - ) : ( - )} - -
@@ -151,13 +151,21 @@ export default function AdminPage() {

Neues Konto anlegen

+ {/* autoComplete bewusst "off"/"new-password" statt username/ + current-password: dies legt ein NEUES, fremdes Konto an, iOS + Safari soll hier nicht die eigenen gespeicherten Zugangsdaten + des Admins vorschlagen. */} setNeuBenutzername(e.target.value)} className="rounded-lg border border-slate-300 px-3 py-2 text-sm" /> setNeuName(e.target.value)} className="rounded-lg border border-slate-300 px-3 py-2 text-sm" /> setDsgvoPid(e.target.value ? Number(e.target.value) : null)} @@ -227,6 +241,8 @@ export default function AdminPage() { Rechtsgrundlage / Aktenzeichen setDsgvoGrund(e.target.value)} className="w-64 rounded-lg border border-slate-300 px-3 py-2 text-sm" @@ -295,18 +311,18 @@ export default function AdminPage() { {(b.groesse_bytes / 1024 / 1024).toFixed(1)} MB
-
+
Herunterladen @@ -341,7 +357,7 @@ export default function AdminPage() { setRestoreDatei(e.target.files?.[0] ?? null); setRestoreErfolg(null); }} - className="text-sm" + className={buttonStyles.fileInput} />
diff --git a/pflegepilot_v3/frontend/src/app/(app)/aufgaben/page.tsx b/pflegepilot_v3/frontend/src/app/(app)/aufgaben/page.tsx index 3b62abe..a7f9e75 100644 --- a/pflegepilot_v3/frontend/src/app/(app)/aufgaben/page.tsx +++ b/pflegepilot_v3/frontend/src/app/(app)/aufgaben/page.tsx @@ -6,7 +6,7 @@ import { googleCalendarUrl, icsUrl, useAufgaben, useAufgabenMutationen } from "@ import { ResponsiveTable, type Column } from "@/components/ResponsiveTable"; import type { Aufgabe } from "@/lib/aufgaben"; import { AufgabeModal } from "@/components/AufgabeModal"; -import { getAccent } from "@/lib/theme"; +import { getAccent, buttonStyles } from "@/lib/theme"; const PRIORITAET_BADGE: Record = { hoch: getAccent("rose").badge, @@ -75,7 +75,7 @@ export default function AufgabenPage() { key: "aktion", label: "", render: (a) => ( - ), diff --git a/pflegepilot_v3/frontend/src/app/(app)/changelog/page.tsx b/pflegepilot_v3/frontend/src/app/(app)/changelog/page.tsx index bdda5ab..71cf4f0 100644 --- a/pflegepilot_v3/frontend/src/app/(app)/changelog/page.tsx +++ b/pflegepilot_v3/frontend/src/app/(app)/changelog/page.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import { useAuth } from "@/lib/auth"; import { useChangelog, useChangelogMutationen, type ChangelogEintrag } from "@/lib/changelog"; -import { accentForKey, getAccent } from "@/lib/theme"; +import { accentForKey, getAccent, buttonStyles } from "@/lib/theme"; export default function ChangelogPage() { const { meQuery } = useAuth(); @@ -50,7 +50,7 @@ export default function ChangelogPage() { {istAdmin && ( @@ -70,11 +70,11 @@ export default function ChangelogPage() {

{e.titel}

{istAdmin && ( -
- -
diff --git a/pflegepilot_v3/frontend/src/app/(app)/dashboard/page.tsx b/pflegepilot_v3/frontend/src/app/(app)/dashboard/page.tsx index c229a42..0220f25 100644 --- a/pflegepilot_v3/frontend/src/app/(app)/dashboard/page.tsx +++ b/pflegepilot_v3/frontend/src/app/(app)/dashboard/page.tsx @@ -7,7 +7,7 @@ import { useDashboard, type DashboardPatientKachel } from "@/lib/patienten"; import { useAntraegeFuerPatient, pdfUrl } from "@/lib/briefe"; import { useAufgaben, type Aufgabe } from "@/lib/aufgaben"; import { BentoGrid, BentoTile } from "@/components/BentoGrid"; -import { getAccent } from "@/lib/theme"; +import { getAccent, buttonStyles } from "@/lib/theme"; const ANTRAG_TYP_LABEL: Record = { erstantrag: "Erstantrag", @@ -16,6 +16,9 @@ const ANTRAG_TYP_LABEL: Record = { adressaenderung: "Adressänderung", vollmacht: "Vollmacht", patientenverfuegung: "Patientenverfügung", + eingliederung: "Eingliederungshilfe", + grundsicherung: "Grundsicherung", + blindenhilfe: "Blindenhilfe", }; const ANTRAG_STATUS_LABEL: Record = { @@ -97,7 +100,7 @@ function PatientKachel({ patient, aufgaben }: { patient: DashboardPatientKachel; target="_blank" rel="noreferrer" onClick={(e) => e.stopPropagation()} - className="shrink-0 text-slate-500 underline" + className={`shrink-0 ${buttonStyles.small}`} > PDF @@ -158,8 +161,8 @@ export default function DashboardPage() {

{data.offene_aufgaben}

-

Schnellzugriff

- +

Schnellzugriff

+ + Neuer Patient
diff --git a/pflegepilot_v3/frontend/src/components/BudgetTracker.tsx b/pflegepilot_v3/frontend/src/components/BudgetTracker.tsx index e775fb6..3fc2f65 100644 --- a/pflegepilot_v3/frontend/src/components/BudgetTracker.tsx +++ b/pflegepilot_v3/frontend/src/components/BudgetTracker.tsx @@ -7,6 +7,7 @@ import { useLeistungMutationen, type Leistung, } from "@/lib/leistungen"; +import { buttonStyles } from "@/lib/theme"; export function BudgetTracker({ leistung }: { leistung: Leistung }) { const [offen, setOffen] = useState(false); @@ -26,7 +27,7 @@ export function BudgetTracker({ leistung }: { leistung: Leistung }) { @@ -44,7 +45,7 @@ export function BudgetTracker({ leistung }: { leistung: Leistung }) {
Budget & Ausgaben {aktuellesJahr} -
@@ -88,7 +89,7 @@ export function BudgetTracker({ leistung }: { leistung: Leistung }) { @@ -133,7 +134,7 @@ export function BudgetTracker({ leistung }: { leistung: Leistung }) { { onSuccess: () => setNeueAusgabe((f) => ({ ...f, betrag: "", beschreibung: "" })) } ) } - className="rounded bg-slate-800 px-2 py-1 text-white disabled:opacity-50" + className={buttonStyles.smallPrimary} > + Erfassen diff --git a/pflegepilot_v3/frontend/src/lib/theme.ts b/pflegepilot_v3/frontend/src/lib/theme.ts index 90b0b3f..7cbdf62 100644 --- a/pflegepilot_v3/frontend/src/lib/theme.ts +++ b/pflegepilot_v3/frontend/src/lib/theme.ts @@ -109,3 +109,41 @@ export function accentForKey(key: string): AccentName { } return ACCENT_NAMES[hash % ACCENT_NAMES.length]; } + +/** + * Wiederverwendbare Button-Stile fuer Aktions-Ausloeser. Ersetzt das + * verbreitete "nur unterstrichener Text" Muster (z. B. "Loeschen"/ + * "Bearbeiten"/"PDF" als reiner Link) - wirkte optisch nach Entwicklung statt + * fertigem Produkt und war auf Touch-Geraeten schwer treffsicher zu tippen. + * Vier Farb-Varianten (neutral/primary/danger/success), je in normaler und + * kleiner (fuer dichte Listen/Tabellenzeilen) Groesse, plus eine Pill-Form + * fuer "+"-Aktionen ("+ Widerspruch", "+ eigene Leistung erfassen", ...). + * Alle Groessen liegen bei py-1.5+ fuer ausreichend grosse Tippflaechen. + */ +export const buttonStyles = { + secondary: + "inline-flex items-center justify-center gap-1 rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm font-medium text-slate-700 transition hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50", + primary: + "inline-flex items-center justify-center gap-1 rounded-lg bg-slate-800 px-3 py-2 text-sm font-medium text-white transition hover:bg-slate-700 disabled:cursor-not-allowed disabled:opacity-50", + danger: + "inline-flex items-center justify-center gap-1 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm font-medium text-red-700 transition hover:bg-red-100 disabled:cursor-not-allowed disabled:opacity-50", + success: + "inline-flex items-center justify-center gap-1 rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-700 transition hover:bg-emerald-100 disabled:cursor-not-allowed disabled:opacity-50", + small: + "inline-flex items-center justify-center gap-1 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs font-medium text-slate-600 transition hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50", + smallDanger: + "inline-flex items-center justify-center gap-1 rounded-lg border border-red-200 bg-red-50 px-2.5 py-1.5 text-xs font-medium text-red-700 transition hover:bg-red-100 disabled:cursor-not-allowed disabled:opacity-50", + smallSuccess: + "inline-flex items-center justify-center gap-1 rounded-lg border border-emerald-200 bg-emerald-50 px-2.5 py-1.5 text-xs font-medium text-emerald-700 transition hover:bg-emerald-100 disabled:cursor-not-allowed disabled:opacity-50", + smallPrimary: + "inline-flex items-center justify-center gap-1 rounded-lg bg-slate-800 px-2.5 py-1.5 text-xs font-medium text-white transition hover:bg-slate-700 disabled:cursor-not-allowed disabled:opacity-50", + add: + "inline-flex items-center justify-center gap-1 rounded-full border border-slate-300 bg-white px-3 py-1.5 text-xs font-medium text-slate-700 transition hover:border-slate-400 hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50", + /** Nativer verliert unter Tailwind-Preflight seine + * Browser-Standard-Chrome und wirkt dadurch wie reiner Fliesstext statt + * eines Buttons - das ::file-selector-button-Pseudoelement wird ueber + * Tailwinds file:-Variante gezielt nachgestylt, damit es wie die uebrigen + * primary-Buttons der App aussieht. */ + fileInput: + "block w-full text-sm text-slate-600 file:mr-3 file:cursor-pointer file:rounded-lg file:border-0 file:bg-slate-800 file:px-3 file:py-2 file:text-sm file:font-medium file:text-white file:transition hover:file:bg-slate-700 file:disabled:cursor-not-allowed file:disabled:opacity-50", +} as const;