import { Separator } from '@radix-ui/react-separator'; import { Bar, BarChart, CartesianGrid, LabelList, ResponsiveContainer, Tooltip, XAxis, } from 'recharts'; import { Card } from '@/common/components/atoms/Card/Card'; import { CardContent } from '@/common/components/atoms/Card/Card.Content'; import { CardDescription } from '@/common/components/atoms/Card/Card.Description'; import { CardHeader } from '@/common/components/atoms/Card/Card.Header'; import { CardTitle } from '@/common/components/atoms/Card/Card.Title'; import { DateRangePicker } from '@/common/components/organisms/DateRangePicker/DateRangePicker'; import { useHomeLogic } from '@/common/hooks/useHomeLogic/useHomeLogic'; import { StatsCard } from '@/pages/Home/components/StatsCard/StatsCard'; import { CasePieChart } from '../CasePieChart/CasePieChart'; export const OperationalOverviewSection = ({ from, to, setDate, }: { from: ReturnType['mmFrom']; to: ReturnType['mmTo']; setDate: ReturnType['setMMDate']; }) => { const caseByStatusData = [ { status: 'Collection In Progress', count: 76 }, { status: 'Manual Review', count: 41 }, { status: 'Approved', count: 109 }, { status: 'Revisions', count: 34 }, { status: 'Rejected', count: 82 }, ]; const totalActiveCases = 228; const manualReviewCasesAssignmentData = { unassigned: { count: 21, }, assigned: { count: 20, reviewers: [ { name: 'Nitzan Guy', count: 9 }, { name: 'Alon Peretz', count: 8 }, { name: 'Adi Nir', count: 3 }, ], }, }; return ( <>

Operational Overview

New Cases vs. Completed Cases Number of cases that haven't reached a final decision, by Status, in selected time range
{ return [value, name === 'completed' ? 'Completed Cases' : 'New Cases']; }} /> value} style={{ fill: 'white', fontSize: '12px' }} /> value} style={{ fill: 'white', fontSize: '12px' }} />

All Cases by Status

Distribution of all active cases by status

({ status: item.status, count: item.count, }))} getDefinition={status => { const statusMap = { 'Collection In Progress': { color: '#936AF6', text: 'Collection In Progress' }, 'Manual Review': { color: '#007AFF', text: 'Manual Review' }, Approved: { color: '#4CAF50', text: 'Approved' }, Revisions: { color: '#FFB74D', text: 'Revisions' }, Rejected: { color: '#F44336', text: 'Rejected' }, }; return statusMap[status] || { color: '#65AFFF', text: status }; }} nameKey="status" valueKey="count" config={caseByStatusData.reduce((acc, curr) => { const statusMap = { 'Collection In Progress': { color: '#936AF6' }, 'Manual Review': { color: '#007AFF' }, Approved: { color: '#4CAF50' }, Revisions: { color: '#FFB74D' }, Rejected: { color: '#F44336' }, }; return { ...acc, [curr.status]: { label: curr.status, color: statusMap[curr.status]?.color || '#65AFFF', }, }; }, {})} />

Overall Active Cases

Cases that haven't reached a decision, in selected time range

{totalActiveCases}

Manual Review Cases

Unassigned

{manualReviewCasesAssignmentData.unassigned.count}

Assigned

{manualReviewCasesAssignmentData.assigned.count}

Assignment breakdown:
{manualReviewCasesAssignmentData.assigned.reviewers.map((reviewer, index) => (
{reviewer.name} {reviewer.count}
))}
); };