PageSourceSearch

https://agentoai.dk/assets/ProductionReadinessReport-DuHTmCYE.js

js agentoai.dk collected 2026-10-02 01:55:35 UTC 4,821 bytes, 1 lines download raw bytes

1import{r as l,j as e}from"./framer-motion-CQxuJa5n.js";import{C as N,f as w,S as k,g as y,B as m,p as x,D as b,i as g,K as v,Z as _,s as u,t as i,ac as S}from"./index-CSx7K-7R.js";import{B as f}from"./badge-Yar_qzGV.js";import{P as C}from"./progress-xZI-P8gz.js";import{P}from"./play-Bwj0pelq.js";import{S as B}from"./skip-forward-DEmKorBr.js";import{C as O}from"./circle-x-Bjw_qpIQ.js";import{C as R}from"./circle-check-big-BvOaTfBT.js";import"./recharts-CFjfazL9.js";const p={provisioning_chain:"Provisioning Pipeline",knowledge_coverage:"Videndækning",phone_binding:"Telefonnumre",analytics_pipeline:"Analytics Pipeline",sms_configuration:"SMS Konfiguration",calendar_integrations:"Kalenderintegrationer",handoff_configuration:"Viderestilling",recording_compliance:"GDPR Optagelse",cost_data_quality:"Omkostningsdata",soft_delete_lifecycle:"Soft Delete",secrets_availability:"API Nøgler"},K=a=>{switch(a){case"pass":return e.jsx(R,{className:"h-4 w-4 text-green-500"});case"fail":return e.jsx(O,{className:"h-4 w-4 text-red-500"});case"warning":return e.jsx(S,{className:"h-4 w-4 text-yellow-500"});default:return e.jsx(B,{className:"h-4 w-4 text-muted-foreground"})}},L=a=>{const r={pass:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",fail:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",skip:"bg-muted text-muted-foreground"};return r[a]||r.skip};function V(){const[a,r]=l.useState(null),[n,o]=l.useState(!1),[d,c]=l.useState(!1),h=async()=>{o(!0);try{const{data:s,error:t}=await u.functions.invoke("run-production-simulation");if(t)throw t;r(s),i.success("Simulation fuldført")}catch(s){i.error("Simulation fejlede: "+(s.message||"Ukendt fejl"))}finally{o(!1)}},j=async()=>{c(!0);try{const{data:s,error:t}=await u.functions.invoke("seed-simulation-partners");if(t)throw t;i.success(`${s.created}/${s.total} simulerede partnere oprettet`)}catch(s){i.error("Seeding fejlede: "+(s.message||"Ukendt fejl"))}finally{c(!1)}};return e.jsx("div",{className:"space-y-6",children:e.jsxs(N,{children:[e.jsxs(w,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"h-5 w-5 text-primary"}),e.jsx(y,{children:"Production Readiness Report"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(m,{variant:"outline",size:"sm",onClick:j,disabled:d,children:[d?e.jsx(x,{className:"h-4 w-4 animate-spin mr-1"}):e.jsx(b,{className:"h-4 w-4 mr-1"}),"Seed 10 partnere"]}),e.jsxs(m,{size:"sm",onClick:h,disabled:n,children:[n?e.jsx(x,{className:"h-4 w-4 animate-spin mr-1"}):e.jsx(P,{className:"h-4 w-4 mr-1"}),"Kør simulation"]})]})]}),a&&e.jsxs(g,{className:"space-y-6",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsxs("div",{className:"text-5xl font-bold",children:[a.readiness_score,"%"]}),e.jsx(f,{className:v("text-lg px-4 py-1",{"bg-green-500 hover:bg-green-600":a.go_no_go==="GO","bg-yellow-500 hover:bg-yellow-600 text-black":a.go_no_go==="CONDITIONAL","bg-red-500 hover:bg-red-600":a.go_no_go==="NO-GO"}),children:a.go_no_go}),e.jsx(C,{value:a.readiness_score,className:"h-3 max-w-md mx-auto"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.summary.pass," pass · ",a.summary.warning," warnings · ",a.summary.fail," fail · ",a.summary.skip," skipped"]})]}),e.jsx("div",{className:"grid gap-3",children:a.results.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[K(s.status),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-sm",children:p[s.flow]||s.flow}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.message})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.duration_ms,"ms"]}),e.jsx(f,{className:L(s.status),variant:"secondary",children:s.status})]})]},s.flow))}),a.sections.blocks_scale.length>0&&e.jsxs("div",{className:"p-4 border border-red-200 dark:border-red-800 rounded-lg bg-red-50 dark:bg-red-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(_,{className:"h-4 w-4 text-red-500"}),e.jsx("h4",{className:"font-semibold text-sm text-red-700 dark:text-red-400",children:"Blokerer skalering"})]}),e.jsx("ul",{className:"text-sm text-red-600 dark:text-red-400 space-y-1",children:a.sections.blocks_scale.map((s,t)=>e.jsxs("li",{children:["• ",p[s]||s]},t))})]})]}),!a&&!n&&e.jsx(g,{children:e.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:'Klik "Kør simulation" for at validere alle kritiske flows mod live data.'})})]})})}export{V as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.