% // ========================= // BASISDATEN // ========================= const role = user?.role || null; // Arzt + Mitarbeiter dürfen Patienten bedienen const canPatientArea = role === "arzt" || role === "mitarbeiter"; const pid = patient && patient.id ? patient.id : null; const isActive = patient && patient.active ? true : false; const isWaiting = patient && patient.waiting_room ? true : false; const canUsePatient = canPatientArea && !!pid; function lockClass(allowed) { return allowed ? "" : "locked"; } function hrefIfAllowed(allowed, href) { return allowed ? href : "#"; } %>