/* ════════════════════════════════════════════════════════════════════════════ dashboards-native-mutations.jsx Inline mutation flows that replace the "Open in classic ↗" deep-links for the most-used create/edit operations. After v81, the host can add a villa, the admin can create a host account, and the host can edit their settings without ever leaving the new editorial dashboards. Pattern: • Each wizard is a Modal component portaled to
• Multi-step wizards render a step indicator + per-step form • All POSTs use the SAME endpoints the operational pages call so data stays compatible. No schema changes. • Loading/error/success states styled with the editorial primitives. Exported via window.TLB_NATIVE_MUTATIONS so other section components can open them on demand. ════════════════════════════════════════════════════════════════════════════ */ const { useState: useState_M, useEffect: useEffect_M, useRef: useRef_M } = React; // ── Modal shell ───────────────────────────────────────────────────────── function Modal({ open, onClose, title, subtitle, children, width = 720 }) { useEffect_M(() => { if (!open) return; document.body.style.overflow = 'hidden'; const onKey = (e) => { if (e.key === 'Escape') onClose(); }; document.addEventListener('keydown', onKey); return () => { document.body.style.overflow = ''; document.removeEventListener('keydown', onKey); }; }, [open, onClose]); if (!open) return null; return ReactDOM.createPortal({created.password}
thetropicaldoor.com/villas, elitehavens.com/seminyak) → click the bookmark → confirms count → loops through every detected villa link with a live progress panel.