diff --git a/src/components/pages/production/uniformity/chart/UniformityGaugeChart.tsx b/src/components/pages/production/uniformity/chart/UniformityGaugeChart.tsx index e8d2a5ca..04fbef9c 100644 --- a/src/components/pages/production/uniformity/chart/UniformityGaugeChart.tsx +++ b/src/components/pages/production/uniformity/chart/UniformityGaugeChart.tsx @@ -1,7 +1,8 @@ -import React from 'react'; +import React, { useState } from 'react'; import { Cell, Pie, PieChart, ResponsiveContainer } from 'recharts'; import Card from '@/components/Card'; import { formatNumber } from '@/lib/helper'; +import { Icon } from '@iconify/react'; interface UniformityGaugeChartProps { value: number; @@ -9,6 +10,9 @@ interface UniformityGaugeChartProps { week?: string; currentValue?: number; totalValue?: number; + onWeekChange?: (direction: 'prev' | 'next') => void; + hasPrevWeek?: boolean; + hasNextWeek?: boolean; } const UniformityGaugeChart: React.FC = ({ @@ -17,6 +21,9 @@ const UniformityGaugeChart: React.FC = ({ week, currentValue, totalValue, + onWeekChange, + hasPrevWeek = false, + hasNextWeek = false, }) => { const numberOfSegments = 50; const filledSegments = Math.round((value / 100) * numberOfSegments); @@ -70,29 +77,49 @@ const UniformityGaugeChart: React.FC = ({ - -
-
-
- - {week} - +
+ + +
+
+
+ + {week} + +
+
+ + {formatNumber(currentValue ?? 0)} + + From + + {formatNumber(totalValue ?? 0)} + +
-
- - {formatNumber(currentValue ?? 0)} - - From - {formatNumber(totalValue ?? 0)} -
-
-
-
+ + + + ); };