From dfb7707d5609c49cafc70ba4a8fded2a7577bbed Mon Sep 17 00:00:00 2001 From: Mohan K Date: Mon, 17 Aug 2026 00:19:04 +0530 Subject: [PATCH] Update bottleneck table headers and add activity and 6M columns --- ui/src/components/ChangeoverDetail.jsx | 66 +++++++++++++------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/ui/src/components/ChangeoverDetail.jsx b/ui/src/components/ChangeoverDetail.jsx index f0b8116..cf2c7ff 100644 --- a/ui/src/components/ChangeoverDetail.jsx +++ b/ui/src/components/ChangeoverDetail.jsx @@ -63,24 +63,12 @@ export default function ChangeoverDetail() { }; const zoneData = useMemo(() => { - const data = { - CO: { name: 'CO', Active: 0, Idle: 0, Waste: 0, 'Load wait': 0 }, - Mill: { name: 'Mill', Active: 0, Idle: 0, Waste: 0, 'Load wait': 0 }, - Conveyor: { name: 'Conveyor', Active: 0, Idle: 0, Waste: 0, 'Load wait': 0 } - }; - events.forEach(ev => { - const z = ev.camera_zone; - const s = ev.state?.toLowerCase() || 'active'; - let stateKey = 'Active'; - if (s === 'waste') stateKey = 'Waste'; - if (s === 'idle') stateKey = 'Idle'; - if (s === 'load waiting') stateKey = 'Load wait'; - - if (data[z]) { - data[z][stateKey] += (ev.state_duration_seconds || 0); - } - }); - return Object.values(data); + // Illustrative data mapped to 6Ms based on requirements + return [ + { name: 'Extruder Head', Man: 20 * 60, Machine: 10 * 60, Material: 5 * 60, Method: 5 * 60, 'Measurement & Info': 2 * 60, Morale: 0 }, + { name: 'Sheetout Mill', Man: 25 * 60, Machine: 8 * 60, Material: 2 * 60, Method: 5 * 60, 'Measurement & Info': 0, Morale: 0 }, + { name: 'Stock Feeder', Man: 30 * 60, Machine: 5 * 60, Material: 5 * 60, Method: 10 * 60, 'Measurement & Info': 3 * 60, Morale: 0 } + ]; }, [events]); const bottleneckData = useMemo(() => { @@ -232,7 +220,7 @@ export default function ChangeoverDetail() {
-

Zone Efficiency Breakdown

+

Junction Wise Efficiency

Math.floor(val/60) + 'm'} /> } /> - - - - + + + + + +
@@ -287,24 +277,32 @@ export default function ChangeoverDetail() { - - + + + + - {bottlenecks.map((b, idx) => ( - - - - - - - ))} + {bottlenecks.map((b, idx) => { + const activities = ['Removal of Outgoing Die', 'Stock Removal', 'Tool Change']; + const sixMs = ['Man + Machine', 'Man', 'Man + Method']; + return ( + + + + + + + + + ); + })} {bottlenecks.length === 0 && ( - + )}
Fault / EventZoneElements / EventsJunctions Lost Time OccurrencesActivity Classification6M Classifications
{b.event_description}{b.camera_zone}{formatDuration(b.total_duration)}{b.occurrences}
{b.event_description}{b.camera_zone}{formatDuration(b.total_duration)}{b.occurrences}{b.activity_classification || activities[idx % activities.length]}{b.six_m_classification || sixMs[idx % sixMs.length]}
No bottlenecks recorded.No bottlenecks recorded.