da50f3b5ea
- Design tokens (ds.ts, theme.ts, scoreTheme.ts): new warm palette (#152642 navy, #f9f8f6 warm white, #e8e7e4 borders, #b8975a gold accent), flat score tier badges replacing CSS gradients, Inter + DM Serif Display typography - Card components: white-background cards, DM Serif score numbers, max-2 badge chips with +N overflow tooltip, editorial score badge positioning - Layout shell: gold left-accent nav active state, 64px top bar, outlined workspace chip, DM Serif page titles - Shared atoms: GenericBadge (outlined/solid variants), ResultFilterBar (simplified chip styles), DecisionContextPanel (dot metrics, no left accent) - Global replacement (118 files): #1e3a5f→#152642, #e2e8f0→#e8e7e4, #f4f6f9→#f9f8f6 — all handled via Node.js for proper UTF-8 safety Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
72 lines
2.4 KiB
TypeScript
72 lines
2.4 KiB
TypeScript
import { Box, Button, Tooltip } from '@mui/material'
|
|
import { CheckCircle, XCircle, Send, Copy } from 'lucide-react'
|
|
import type { AIOutput } from '../../domain/aiOutput'
|
|
import type { ReviewStatus } from '../../domain/enums'
|
|
|
|
interface Props {
|
|
output: AIOutput
|
|
onUpdateStatus: (status: ReviewStatus) => void
|
|
onCopyJson: () => void
|
|
isSubmitting?: boolean
|
|
}
|
|
|
|
export function AIReviewActionToolbar({ output, onUpdateStatus, onCopyJson, isSubmitting }: Props) {
|
|
const { reviewStatus } = output
|
|
|
|
const canSendToReview = reviewStatus === 'UNREVIEWED' || reviewStatus === 'FLAGGED'
|
|
const canApprove = reviewStatus === 'IN_REVIEW' || reviewStatus === 'UNREVIEWED'
|
|
const canReject = reviewStatus !== 'REJECTED'
|
|
|
|
return (
|
|
<Box sx={{ display: 'flex', gap: 0.75, flexWrap: 'wrap' }}>
|
|
{canSendToReview && (
|
|
<Button
|
|
size="small"
|
|
variant="outlined"
|
|
disabled={isSubmitting}
|
|
startIcon={<Send size={13} />}
|
|
onClick={() => onUpdateStatus('IN_REVIEW')}
|
|
sx={{ textTransform: 'none', fontSize: '0.75rem', color: '#d97706', borderColor: '#d97706', '&:hover': { bgcolor: '#fffbeb', borderColor: '#b45309' } }}
|
|
>
|
|
Zur Prüfung
|
|
</Button>
|
|
)}
|
|
{canApprove && (
|
|
<Button
|
|
size="small"
|
|
variant="contained"
|
|
disabled={isSubmitting}
|
|
startIcon={<CheckCircle size={13} />}
|
|
onClick={() => onUpdateStatus('APPROVED')}
|
|
sx={{ textTransform: 'none', fontSize: '0.75rem', bgcolor: '#1a7a4a', '&:hover': { bgcolor: '#155f3a' } }}
|
|
>
|
|
Genehmigen
|
|
</Button>
|
|
)}
|
|
{canReject && (
|
|
<Button
|
|
size="small"
|
|
variant="outlined"
|
|
disabled={isSubmitting}
|
|
startIcon={<XCircle size={13} />}
|
|
onClick={() => onUpdateStatus('REJECTED')}
|
|
sx={{ textTransform: 'none', fontSize: '0.75rem', color: '#c0392b', borderColor: '#c0392b', '&:hover': { bgcolor: '#fef2f2', borderColor: '#a93226' } }}
|
|
>
|
|
Ablehnen
|
|
</Button>
|
|
)}
|
|
<Tooltip title="Output-JSON kopieren">
|
|
<Button
|
|
size="small"
|
|
variant="outlined"
|
|
onClick={onCopyJson}
|
|
startIcon={<Copy size={13} />}
|
|
sx={{ textTransform: 'none', fontSize: '0.75rem', color: '#64748b', borderColor: '#e8e7e4', '&:hover': { bgcolor: '#f8fafc' } }}
|
|
>
|
|
JSON
|
|
</Button>
|
|
</Tooltip>
|
|
</Box>
|
|
)
|
|
}
|