PageSourceSearch

https://app.ololand.ai/assets/DecisionReceiptArtifact-D194lBO4.js

js ololand.ai collected 2026-10-05 12:21:38 UTC 3,600 bytes, 1 lines download raw bytes

1import{l,j as e,ft as o,d0 as c}from"./vendor-CJ3Pa3Ob.js";import{N as m,ao as x}from"./index-CT7QwV5N.js";import{u,a as p}from"./usePurchaseLane-CyI_IK22.js";import{p as h}from"./purchaseLane-D0_HUYlH.js";function v({receipt:t,canCreate:a,isCreating:s=!1,createError:i=!1,onCreate:r}){return e.jsxs("div",{className:"grid gap-4 text-[var(--theme-text)]",children:[e.jsxs("header",{children:[e.jsx("div",{className:"text-xs tracking-wide text-[var(--theme-text-muted)] uppercase",children:"Decision Receipt"}),e.jsx("h2",{className:"mt-1 text-lg font-semibold",children:"Draft decision record"}),e.jsx("p",{className:"mt-1 text-sm text-[var(--theme-text-muted)]",children:"An immutable draft snapshot, not an approval or investment decision."})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rounded-lg border border-[var(--glass-border)] bg-[var(--theme-surface-raised)] p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[var(--theme-text-muted)]",children:"Recommendation"}),e.jsx("div",{className:"mt-1 text-lg font-semibold capitalize",children:t.recommendation.verdict?.replaceAll("_"," ")??"Needs data"})]}),e.jsxs("span",{className:"rounded-full border border-[var(--glass-border)] px-2 py-1 text-[11px] font-medium capitalize",children:["Draft v",t.version," · ",t.evidence_tier]})]}),t.decision_note?e.jsx("p",{className:"mt-3 text-sm text-[var(--theme-text-muted)]",children:t.decision_note}):null]}),e.jsxs("section",{className:"grid gap-2",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(o,{className:"size-4 text-[var(--theme-accent)]"}),"Source lineage"]}),e.jsx(n,{label:"Opportunity snapshot",value:t.opportunity_snapshot_id}),e.jsx(n,{label:"Financing scenario",value:t.scenario_summary.financing_scenario}),e.jsx(n,{label:"Financing run",value:t.financing_analysis_run_id}),e.jsx(n,{label:"Previous receipt",value:t.previous_receipt_id})]})]}):e.jsx("div",{className:"rounded-lg border border-dashed border-[var(--glass-border)] p-4 text-sm text-[var(--theme-text-muted)]",children:"No decision receipt draft exists yet."}),a?e.jsx(x,{type:"button",size:"sm",variant:"outline",className:"w-fit",onClick:r,disabled:s,children:s?"Creating…":t?"Create updated draft":"Create draft receipt"}):e.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-3 text-sm",children:[e.jsx(c,{className:"size-4 text-amber-500"}),"Draft creation is unavailable until an immutable opportunity snapshot resolves."]}),i?e.jsx("p",{role:"alert",className:"text-sm text-red-400",children:"The draft could not be created. No receipt was changed."}):null]})}function N({deal:t}){const{hasFeature:a}=m(),s=a("ownership_purchase_lane"),i=u(t.id,s),r=p(t.id,s),d=l({mutationFn:()=>h.createReceiptDraft(t.id,{}),onSuccess:()=>r.refetch()});return s?i.isLoading||r.isLoading?e.jsx("div",{className:"p-4 text-sm text-[var(--theme-text-muted)]",children:"Loading Decision Receipt…"}):e.jsx(v,{receipt:r.data,canCreate:!!i.data?.screening_snapshot_id,isCreating:d.isPending,createError:d.isError,onCreate:()=>d.mutate()}):null}function n({label:t,value:a}){return e.jsxs("div",{className:"rounded-md border border-[var(--glass-border)] px-3 py-2",children:[e.jsx("div",{className:"text-xs text-[var(--theme-text-muted)]",children:t}),e.jsx("div",{className:"mt-1 text-xs font-medium break-all",children:a??"Not available"})]})}export{N as DecisionReceiptArtifact,v as DecisionReceiptArtifactContent};

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.