womp
This commit is contained in:
parent
21fc147f52
commit
48cca56b49
2 changed files with 93 additions and 2 deletions
57
Frontend/app/datenschutz/page.tsx
Normal file
57
Frontend/app/datenschutz/page.tsx
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import Link from "next/link"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { ChevronLeft } from "lucide-react"
|
||||
|
||||
export default function DatenschutzPage() {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center p-4">
|
||||
<Card className="w-full max-w-4xl border-border/60 shadow-lg">
|
||||
<CardHeader className="space-y-1 pb-6">
|
||||
<div className="flex items-center gap-2">
|
||||
<Link href="/">
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8">
|
||||
<ChevronLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
</Link>
|
||||
<CardTitle className="text-2xl font-semibold tracking-tight">Datenschutzerklärung</CardTitle>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4 text-sm text-muted-foreground">
|
||||
<section>
|
||||
<h2 className="mb-2 text-lg font-medium text-foreground">1. Datenschutz auf einen Blick</h2>
|
||||
<p className="mb-2">
|
||||
Allgemeine Hinweise: Die folgenden Hinweise geben einen einfachen Überblick darüber, was mit Ihren
|
||||
personenbezogenen Daten passiert, wenn Sie diese Website besuchen.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2 className="mb-2 text-lg font-medium text-foreground">2. Allgemeine Hinweise und Pflichtinformationen</h2>
|
||||
<h3 className="mb-1 font-medium text-foreground">Datenschutz</h3>
|
||||
<p className="mb-2">
|
||||
Die Betreiber dieser Seiten nehmen den Schutz Ihrer persönlichen Daten sehr ernst. Wir behandeln Ihre
|
||||
personenbezogenen Daten vertraulich und entsprechend der gesetzlichen Datenschutzvorschriften sowie dieser
|
||||
Datenschutzerklärung.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2 className="mb-2 text-lg font-medium text-foreground">3. Datenerfassung auf dieser Website</h2>
|
||||
<p className="mb-2">
|
||||
<strong>Wer ist verantwortlich für die Datenerfassung auf dieser Website?</strong>
|
||||
<br />
|
||||
Die Datenverarbeitung auf dieser Website erfolgt durch den Websitebetreiber.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div className="pt-4">
|
||||
<Link href="/">
|
||||
<Button>Zurück zur Startseite</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -26,6 +26,7 @@ export function RegisterForm({ onSwitchToLogin }: RegisterFormProps) {
|
|||
const [selectedRoomIds, setSelectedRoomIds] = useState<number[]>([]) // Stores IDs of rooms for 'RAUMBETREUER' role
|
||||
const [error, setError] = useState("") // Stores error messages
|
||||
const [isLoading, setIsLoading] = useState(false) // Tracks loading state for the form
|
||||
const [privacyAccepted, setPrivacyAccepted] = useState(false) // Tracks privacy policy acceptance
|
||||
|
||||
// Handles toggling selection of supervised rooms for 'RAUMBETREUER'
|
||||
const handleRoomToggle = (roomId: number) => {
|
||||
|
|
@ -43,6 +44,11 @@ export function RegisterForm({ onSwitchToLogin }: RegisterFormProps) {
|
|||
return
|
||||
}
|
||||
|
||||
if (!privacyAccepted) {
|
||||
setError("Bitte akzeptieren Sie die Datenschutzerklärung")
|
||||
return
|
||||
}
|
||||
|
||||
setIsLoading(true) // Show loading indicator
|
||||
|
||||
// Attempt to register the new user with provided details
|
||||
|
|
@ -190,13 +196,40 @@ export function RegisterForm({ onSwitchToLogin }: RegisterFormProps) {
|
|||
/>
|
||||
<span className={`text-sm font-medium ${role === "RAUMBETREUER" ? "text-primary" : "text-foreground"}`}>
|
||||
Raumbetreuer
|
||||
|
||||
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Room selection for 'RAUMBETREUER' role */}
|
||||
{/* Privacy Policy Checkbox - ADDED */}
|
||||
<div className="flex items-start space-x-3 pt-2">
|
||||
<Checkbox
|
||||
id="privacy"
|
||||
checked={privacyAccepted}
|
||||
onCheckedChange={(checked) => setPrivacyAccepted(checked as boolean)}
|
||||
/>
|
||||
<div className="grid gap-1.5 leading-none">
|
||||
<label
|
||||
htmlFor="privacy"
|
||||
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer"
|
||||
>
|
||||
Ich akzeptiere die{" "}
|
||||
<a
|
||||
href="/datenschutz"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="font-medium text-primary underline-offset-4 hover:underline"
|
||||
>
|
||||
Datenschutzerklärung
|
||||
</a>
|
||||
</label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Die Zustimmung ist erforderlich für die Registrierung.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{role === "RAUMBETREUER" && (
|
||||
<div className="space-y-3">
|
||||
<Label className="text-sm font-medium">Betreute Räume</Label>
|
||||
|
|
@ -224,6 +257,7 @@ export function RegisterForm({ onSwitchToLogin }: RegisterFormProps) {
|
|||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
</CardContent>
|
||||
<CardFooter className="flex flex-col gap-4 pt-2">
|
||||
{/* Submit button with loading state */}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue