/* HLiD — Workflow, Observability, Integrations, Case, Next, Footer */ /* Demo request form — POSTs to window.HLID_DEMO_ENDPOINT or falls back to mailto */ function DemoForm() { const { t, locale } = useT(); const [state, setState] = React.useState({ status: 'idle', msg: '' }); const [form, setForm] = React.useState({ name: '', email: '', company: '', entities: '', note: '' }); const upd = (k) => (e) => setForm(f => ({ ...f, [k]: e.target.value })); const submit = async (e) => { e.preventDefault(); if (!form.email || !form.name || !form.company) { setState({ status: 'error', msg: t('f.err') }); return; } setState({ status: 'sending', msg: '' }); try { // No endpoint configured → skip straight to the mailto fallback, so no // personal data is POSTed to a dead route (see Datenschutz §2). const endpoint = window.HLID_DEMO_ENDPOINT; if (!endpoint) throw new Error('demo endpoint not configured'); const res = await fetch(endpoint, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ...form, source: 'hlid.at', ts: new Date().toISOString() }), }); if (!res.ok) throw new Error('Endpoint returned ' + res.status); setState({ status: 'ok', msg: t('f.ok') }); if (window.umami) window.umami.track('demo-submitted'); } catch (err) { // Fallback: open mail client with prefilled body (localized) const de = locale === 'DE'; const body = encodeURIComponent(de ? `Name: ${form.name}\nE-Mail: ${form.email}\nUnternehmen: ${form.company}\nGesellschaften: ${form.entities}\n\n${form.note}` : `Name: ${form.name}\nEmail: ${form.email}\nCompany: ${form.company}\nEntities: ${form.entities}\n\n${form.note}` ); const subject = encodeURIComponent((de ? 'Demo-Anfrage — ' : 'Demo request — ') + form.company); window.location.href = `mailto:hlid@nibelung.io?subject=${subject}&body=${body}`; setState({ status: 'fallback', msg: t('f.fallback') }); } }; if (state.status === 'ok') { return (
app.hlid.at / inbox / INV-2025-08421
Demo
MR
VAT rate on line 3 read at 72% confidence (20% vs. 10% reduced on this vendor's history). Freight line is new for this vendor. All other fields above 95%.
{t('obs.lede')}
{t('int.foot')}
{t('case.body')}
{d}