WIP main worktree changes before merge
This commit is contained in:
@@ -29,6 +29,7 @@ function SummaryCard(props: {
|
||||
|
||||
export function NormalizationSummary({ normalization }: NormalizationSummaryProps) {
|
||||
const hasMaterialUnmapped = normalization.materialUnmappedRowCount > 0;
|
||||
const hasWarnings = normalization.warnings.length > 0;
|
||||
|
||||
return (
|
||||
<Panel
|
||||
@@ -36,10 +37,13 @@ export function NormalizationSummary({ normalization }: NormalizationSummaryProp
|
||||
subtitle="Pack, parser, and residual mapping health for the compact statement surface."
|
||||
variant="surface"
|
||||
>
|
||||
<div className="grid gap-3 md:grid-cols-2 xl:grid-cols-5">
|
||||
<div className="grid gap-3 md:grid-cols-2 xl:grid-cols-8">
|
||||
<SummaryCard label="Pack" value={normalization.fiscalPack ?? 'unknown'} />
|
||||
<SummaryCard label="Regime" value={normalization.regime} />
|
||||
<SummaryCard label="Parser" value={`fiscal-xbrl ${normalization.parserVersion}`} />
|
||||
<SummaryCard label="Parser" value={`${normalization.parserEngine} ${normalization.parserVersion}`} />
|
||||
<SummaryCard label="Surface Rows" value={String(normalization.surfaceRowCount)} />
|
||||
<SummaryCard label="Detail Rows" value={String(normalization.detailRowCount)} />
|
||||
<SummaryCard label="KPI Rows" value={String(normalization.kpiRowCount)} />
|
||||
<SummaryCard label="Unmapped Rows" value={String(normalization.unmappedRowCount)} />
|
||||
<SummaryCard
|
||||
label="Material Unmapped"
|
||||
@@ -47,6 +51,23 @@ export function NormalizationSummary({ normalization }: NormalizationSummaryProp
|
||||
tone={hasMaterialUnmapped ? 'warning' : 'default'}
|
||||
/>
|
||||
</div>
|
||||
{hasWarnings ? (
|
||||
<div className="mt-3 rounded-xl border border-[color:var(--line-weak)] bg-[color:var(--panel-soft)] px-3 py-3">
|
||||
<p className="panel-heading text-[10px] uppercase tracking-[0.16em] text-[color:var(--terminal-muted)]">
|
||||
Parser Warnings
|
||||
</p>
|
||||
<div className="mt-2 flex flex-wrap gap-2">
|
||||
{normalization.warnings.map((warning) => (
|
||||
<span
|
||||
key={warning}
|
||||
className="rounded-full border border-[color:var(--line-weak)] bg-[rgba(88,102,122,0.16)] px-3 py-1 text-xs text-[color:var(--terminal-bright)]"
|
||||
>
|
||||
{warning}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
{hasMaterialUnmapped ? (
|
||||
<div className="mt-3 flex items-start gap-2 rounded-xl border border-[#7f6250] bg-[rgba(91,66,46,0.18)] px-3 py-3 text-sm text-[#f5d5c0]">
|
||||
<AlertTriangle className="mt-0.5 size-4 shrink-0" />
|
||||
|
||||
@@ -37,6 +37,9 @@ function renderList(values: string[]) {
|
||||
|
||||
export function StatementRowInspector(props: StatementRowInspectorProps) {
|
||||
const selection = props.selection;
|
||||
const parentSurfaceLabel = selection?.kind === 'detail'
|
||||
? selection.parentSurfaceRow?.label ?? (selection.row.parentSurfaceKey === 'unmapped' ? 'Unmapped / Residual' : selection.row.parentSurfaceKey)
|
||||
: null;
|
||||
|
||||
return (
|
||||
<Panel
|
||||
@@ -122,7 +125,7 @@ export function StatementRowInspector(props: StatementRowInspectorProps) {
|
||||
<div className="grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4">
|
||||
<InspectorCard label="Label" value={selection.row.label} />
|
||||
<InspectorCard label="Key" value={selection.row.key} />
|
||||
<InspectorCard label="Parent Surface" value={selection.parentSurfaceRow?.label ?? selection.row.parentSurfaceKey} />
|
||||
<InspectorCard label="Parent Surface" value={parentSurfaceLabel ?? selection.row.parentSurfaceKey} />
|
||||
<InspectorCard label="Residual" value={selection.row.residualFlag ? 'Yes' : 'No'} />
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user