diff --git a/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx b/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx new file mode 100644 index 0000000..169b319 --- /dev/null +++ b/src/app/quickaction-dashboard/register-sign-contract/company/page.tsx @@ -0,0 +1,257 @@ +'use client' + +import { useState, useEffect } from 'react' +import PageLayout from '../../../components/PageLayout' + +export default function CompanySignContractPage() { + const [companyName, setCompanyName] = useState('') + const [repName, setRepName] = useState('') + const [repTitle, setRepTitle] = useState('') + const [location, setLocation] = useState('') + const [date, setDate] = useState('') + const [note, setNote] = useState('') + const [agreeContract, setAgreeContract] = useState(false) + const [agreeData, setAgreeData] = useState(false) + const [confirmSignature, setConfirmSignature] = useState(false) + const [submitting, setSubmitting] = useState(false) + const [success, setSuccess] = useState(false) + const [error, setError] = useState('') + + useEffect(() => { + setDate(new Date().toISOString().slice(0,10)) + }, []) + + const valid = () => + companyName.trim().length > 2 && + repName.trim().length > 4 && + repTitle.trim().length > 1 && + location.trim().length > 1 && + agreeContract && + agreeData && + confirmSignature + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault() + if (!valid()) { + setError('Bitte alle Pflichtfelder & Bestätigungen ausfüllen.') + return + } + setError('') + setSubmitting(true) + try { + // TODO: POST /contracts/company/sign { companyName, repName, repTitle, location, date, note } + await new Promise(r => setTimeout(r, 1400)) + setSuccess(true) + } catch { + setError('Signatur fehlgeschlagen. Bitte erneut versuchen.') + } finally { + setSubmitting(false) + } + } + + return ( + +
+ {/* Background */} +
+
+ + + +
+
+

+ Sign Company Partnership Contract +

+

+ Prüfe die Vertragsdetails und unterschreibe im Namen des Unternehmens. +

+ + {/* Meta + Preview */} +
+
+
+

Contract Information

+
    +
  • Contract ID: COMP-2024-017
  • +
  • Version: 2.4 (gültig ab 01.11.2024)
  • +
  • Jurisdiction: EU / Germany
  • +
  • Language: DE (binding)
  • +
+
+
+

Achtung

+

+ Du bestätigst rechtsverbindlich, dass du bevollmächtigt bist im Namen des Unternehmens zu unterschreiben. +

+
+
+
+
+

+ (Vertragsvorschau / PDF Platzhalter) +
Company Contract PDF would render here. +

+
+ Scroll preview (disabled in mock) +
+
+
+
+ +
+ + {/* Company Signature Fields */} +
+

Company & Representative

+
+
+ + { setCompanyName(e.target.value); setError('') }} + placeholder="Firmenname offiziell" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + setDate(e.target.value)} + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + { setLocation(e.target.value); setError('') }} + placeholder="z.B. München" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + { setRepName(e.target.value); setError('') }} + placeholder="Vor- und Nachname" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + { setRepTitle(e.target.value); setError('') }} + placeholder="z.B. Geschäftsführer, Authorized Signatory" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + setNote(e.target.value)} + placeholder="Interne Referenz / Zusatz" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + /> +
+
+
+ +
+ + {/* Confirmations */} +
+

Bestätigungen

+ + + +
+ + {error && ( +
+ {error} +
+ )} + {success && ( +
+ Vertrag erfolgreich unterzeichnet. +
+ )} + +
+ +
+
+
+
+ + ) +} diff --git a/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx b/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx new file mode 100644 index 0000000..bdd6e58 --- /dev/null +++ b/src/app/quickaction-dashboard/register-sign-contract/personal/page.tsx @@ -0,0 +1,232 @@ +'use client' + +import { useState, useEffect } from 'react' +import PageLayout from '../../../components/PageLayout' + +export default function PersonalSignContractPage() { + const [fullName, setFullName] = useState('') + const [location, setLocation] = useState('') + const [date, setDate] = useState('') + const [note, setNote] = useState('') + const [agreeContract, setAgreeContract] = useState(false) + const [agreeData, setAgreeData] = useState(false) + const [confirmSignature, setConfirmSignature] = useState(false) + const [submitting, setSubmitting] = useState(false) + const [success, setSuccess] = useState(false) + const [error, setError] = useState('') + + useEffect(() => { + setDate(new Date().toISOString().slice(0, 10)) + }, []) + + const valid = () => + fullName.trim().length > 4 && + location.trim().length > 1 && + agreeContract && + agreeData && + confirmSignature + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault() + if (!valid()) { + setError('Bitte alle Pflichtfelder & Bestätigungen ausfüllen.') + return + } + setError('') + setSubmitting(true) + try { + // TODO: POST /contracts/personal/sign { fullName, location, date, note } + await new Promise(r => setTimeout(r, 1200)) + setSuccess(true) + } catch { + setError('Signatur fehlgeschlagen. Bitte erneut versuchen.') + } finally { + setSubmitting(false) + } + } + + return ( + +
+ {/* Background */} +
+
+ + + +
+
+

+ Sign Personal Participation Contract +

+

+ Bitte überprüfe die Vertragsdetails und unterschreibe elektronisch. +

+ + {/* Contract Meta + Preview */} +
+
+
+

Contract Information

+
    +
  • Contract ID: PERS-2024-001
  • +
  • Version: 1.2 (gültig ab 01.11.2024)
  • +
  • Jurisdiction: EU / Germany
  • +
  • Language: DE (verbindlich)
  • +
+
+
+

Hinweis

+

+ Deine elektronische Signatur ist rechtsverbindlich. Stelle sicher, dass alle Angaben korrekt sind. +

+
+
+
+
+

+ (Vertragsvorschau / PDF Platzhalter) +
Der vollständige Vertrag wird hier als PDF gerendert. +

+
+ Scroll preview (disabled in mock) +
+
+
+
+ +
+ + {/* Signature Fields */} +
+

Signature Details

+
+
+ + { setFullName(e.target.value); setError('') }} + placeholder="Vor- und Nachname" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +

+ Muss deinem amtlichen Ausweis entsprechen. +

+
+
+ + setDate(e.target.value)} + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + { setLocation(e.target.value); setError('') }} + placeholder="z.B. Berlin" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + required + /> +
+
+ + setNote(e.target.value)} + placeholder="Optionale zusätzliche Bemerkung" + className="w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent" + /> +
+
+
+ +
+ + {/* Confirmations */} +
+

Bestätigungen

+ + + +
+ + {error && ( +
+ {error} +
+ )} + {success && ( +
+ Vertrag erfolgreich unterzeichnet. +
+ )} + +
+ +
+
+
+
+ + ) +}