// Overlay modals — Approval workflow + Export/Preflight. function ModalShell({ onClose, title, subtitle, badge, width = 720, children, footer }) { return (
e.stopPropagation()} style={{ width, maxWidth: '100%', maxHeight: '90vh', background: 'var(--bg-panel)', border: '1px solid var(--line-strong)', boxShadow: '0 20px 60px rgba(10, 31, 61, 0.25)', display: 'flex', flexDirection: 'column', }} > {/* Header */}
{badge}
{subtitle}
} onClick={onClose}/>
{/* Body */}
{children}
{footer && (
{footer}
)}
); } // ============ APPROVAL MODAL ============ function ApprovalModal({ onClose }) { const stages = [ { name: 'Designer', who: 'A. Rao', role: 'Design Cell · MoRD', status: 'done', when: '14 Jul · 13:22' }, { name: 'Peer Review', who: 'M. Nair', role: 'Sr. Designer', status: 'done', when: '14 Jul · 13:50' }, { name: 'Reviewer', who: 'S. Iyer', role: 'Section Officer', status: 'current', when: 'pending' }, { name: 'Approving Authority',who: 'Dr. R. Krishnan', role: 'Under Secretary', status: 'waiting', when: '—' }, { name: 'Publication', who: 'System', role: 'CPPP Portal', status: 'waiting', when: '—' }, ]; const comments = [ { who: 'S. Iyer', role: 'Reviewer', when: '13:50', text: 'Please right-align the date column in the Critical Dates table. Also confirm EMD figure with Accounts.', target: 'schedule' }, { who: 'M. Nair', role: 'Sr. Designer', when: '13:22', text: 'Devanagari body is looking clean. Consider tightening the leading by 0.5pt on the Hindi paragraph.', target: 'body' }, { who: 'A. Rao', role: 'Designer', when: '11:30', text: 'Draft ready for peer review. Used the certified MoRD Tender Cover template with bilingual body.', target: null, me: true }, ]; return ( In Review · 2 of 5} width={820} footer={ }>Audit trail }>Compare v0.6 ↔ v0.7 Request Changes Reject }>Approve & Advance } >
{/* Left: workflow chain */}
{stages.map((s, i) => { const done = s.status === 'done'; const current = s.status === 'current'; return (
{/* Connector line */} {i < stages.length - 1 && (
)} {/* Dot */}
{done ? : {i + 1}}
{s.name}
{current && Current}
{s.who}
{s.role.toUpperCase()} · {s.when}
); })}
policy · MoRD-DES-2024/07
SLA · 48 hr per stage
signature · Digital · DSC Class 3
audit · Immutable · Blockchain-anchored
{/* Right: comments */}
}>Reply {comments.map((c, i) => (
{c.who}{c.me ? ' · you' : ''}
{c.role.toUpperCase()}
{c.when}
{c.text}
{c.target && (
pinned to · {c.target}
)}
))}