% const role = user?.role || null; // ✅ Regeln const canDoctorArea = role === "arzt"; // nur Arzt const canAdminArea = role === "admin"; // nur Admin const canPatients = role === "arzt" || role === "mitarbeiter"; const canStaffArea = role === "arzt" || role === "mitarbeiter"; // Medikamente + offene Leistungen function hrefIfAllowed(allowed, href) { return allowed ? href : "#"; } function lockClass(allowed) { return allowed ? "" : "locked"; } function lockClick(allowed) { return allowed ? "" : 'onclick="return false;"'; } %>