Assessor_2.0/tests/client-information-confirma...

30 lines
1.7 KiB
HTML

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><title>ASSESSOR — Synthetic client confirmation preview</title></head>
<body><p>Synthetic acceptance preview · Shared production confirmation dialog</p><div id="root"></div>
<script type="module">
import React, { useState, useCallback } from 'react';
import { createRoot } from 'react-dom/client';
import '@fontsource-variable/inter/wght.css';
import '/src/styles/layers.css';
import '/src/styles/ui-tokens.css';
import '/src/styles/tokens.css';
import '/src/styles/base.css';
import '/src/styles/components.css';
import '/src/styles/datahub.css';
import '/src/styles/import-workflow.css';
import { ClientInformationChangeDialog } from '/src/features/project-import/ClientInformationChangeDialog.tsx';
document.documentElement.dataset.theme = new URLSearchParams(location.search).get('theme') === 'light' ? 'light' : 'dark';
function Preview() {
const [visible,setVisible] = useState(true);
const [message,setMessage] = useState('No changes confirmed.');
const cancel = useCallback(()=>setVisible(false),[]);
return React.createElement(React.Fragment,null,
React.createElement('button',{className:'btn',onClick:()=>setVisible(true)},'Open warning'),
React.createElement('p',{role:'status'},message),
visible && React.createElement(ClientInformationChangeDialog,{changes:[
{label:'Name',previous:'Synthetic client',next:'Synthetic client revised'},
{label:'Consultant',previous:'Example consultant',next:'New example consultant'}],onCancel:cancel,onConfirm:()=>{setMessage('Confirmed — synthetic preview only.');setVisible(false);}}));
}
createRoot(document.getElementById('root')).render(React.createElement(Preview));
</script></body></html>