d15a13e485
- Delete all ops page components (ReviewQueue, AIMonitoring, Governance, SourceMonitoring, ActivityTimeline, SignalPipeline) - Remove OPERATIONS workspace from AppShell config, nav order, path detection - Remove all /ops/* routes from App.tsx - Remove WorkspaceType.OPERATIONS from allowedWorkspaces in authService, sessionStore, permissions - Keep MarketIntelligence page (already moved to /supply/market-intelligence) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import { Box, Typography } from '@mui/material'
|
|
import type { SxProps, Theme } from '@mui/material'
|
|
import type { ReactNode } from 'react'
|
|
import type { ConfidenceLevel } from '../../domain/enums'
|
|
import { ConfidenceBadge } from '../badges/ConfidenceBadge'
|
|
|
|
interface FieldWithConfidenceProps {
|
|
label: string
|
|
value: ReactNode
|
|
confidence?: number
|
|
confidenceLevel?: ConfidenceLevel
|
|
layout?: 'row' | 'column'
|
|
sx?: SxProps<Theme>
|
|
}
|
|
|
|
export function FieldWithConfidence({
|
|
label,
|
|
value,
|
|
confidence,
|
|
confidenceLevel,
|
|
layout = 'column',
|
|
sx,
|
|
}: FieldWithConfidenceProps) {
|
|
const showBadge = confidence !== undefined || confidenceLevel !== undefined
|
|
|
|
if (layout === 'row') {
|
|
return (
|
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1, ...sx }}>
|
|
<Typography sx={{ fontSize: '0.75rem', color: 'text.secondary', minWidth: 80 }}>
|
|
{label}
|
|
</Typography>
|
|
<Box sx={{ flex: 1 }}>{value}</Box>
|
|
{showBadge && (
|
|
<ConfidenceBadge level={confidenceLevel} score={confidence} />
|
|
)}
|
|
</Box>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<Box sx={sx}>
|
|
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 0.25 }}>
|
|
<Typography sx={{ fontSize: '0.75rem', color: 'text.secondary' }}>
|
|
{label}
|
|
</Typography>
|
|
{showBadge && (
|
|
<ConfidenceBadge level={confidenceLevel} score={confidence} />
|
|
)}
|
|
</Box>
|
|
<Box sx={{ fontSize: '0.875rem' }}>{value}</Box>
|
|
</Box>
|
|
)
|
|
}
|