Compare commits

..
27 Commits
Author SHA1 Message Date
mohanki dfb7707d56 Update bottleneck table headers and add activity and 6M columns 2026-08-17 00:19:04 +05:30
mohanki ae931bf25e Replace SOP compliance checks with Suggested Decisions / Insights section 2026-08-17 00:12:40 +05:30
mohanki 15af3bc4ee Update UI with MRF logo and Lean Manufacturing KPI headers 2026-08-15 23:10:20 +05:30
mohanki 5b8a35f46c Robustly generate pg_hba.conf in /tmp during startup 2026-08-11 13:02:57 +05:30
mohanki 02207d6b80 Override pg_hba.conf using a custom file 2026-08-11 13:01:34 +05:30
mohanki 9aff075893 Add /api/eval for debugging 2026-08-11 12:59:40 +05:30
mohanki 9458176f88 Overwrite pg_hba.conf entirely to ensure no hostssl exists 2026-08-11 12:58:13 +05:30
mohanki 1deaefde7f Rename db to sop_db completely 2026-08-11 12:57:05 +05:30
mohanki 9fa8ce4186 Update db_fixer command to find and fix all pg_hba.conf files and append rules 2026-08-11 12:55:01 +05:30
mohanki 7122d55e38 Force db restart to load pg_hba.conf 2026-08-11 12:53:39 +05:30
mohanki f97f968caa Add db_fixer to correct pg_hba.conf 2026-08-11 12:52:33 +05:30
mohanki cdd8deeef5 Fix postgres pg_hba.conf via docker-compose 2026-08-11 12:51:18 +05:30
mohanki d264e3f1cc Fix Postgres SSL connection 2026-08-11 12:49:40 +05:30
mohanki a6cf6f3764 Add debug endpoint 2026-08-11 12:48:11 +05:30
mohanki e995c0ec0b Center and focus the View Event Timeline button 2026-07-28 14:40:03 +05:30
mohanki c77f63bb29 Fix login routing redirect 2026-07-28 14:32:10 +05:30
mohanki 9f2cc25db2 Add static password protection to the dashboard 2026-07-28 14:29:35 +05:30
mohanki 96c0d51867 Update grid to render exact seconds for waterfall effect and fix page title 2026-07-28 14:25:50 +05:30
mohanki 25a3ef2a5a Style event items as isolated box cards 2026-07-28 14:23:42 +05:30
mohanki c921e0ddef Implement Option 1: Synchronized Swimlanes with Time Anchor 2026-07-28 14:21:15 +05:30
mohanki 0def7a5b68 Refactor EventTimeline to Option 2 layout: Unified Panel with 3 scrolling tracks 2026-07-28 14:17:35 +05:30
mohanki d273cafd51 Enhance sticky header with proper glassmorphism blur 2026-07-28 14:08:24 +05:30
mohanki b0d8b664da Fix sticky header overlap by using correct bg variable 2026-07-28 14:07:04 +05:30
mohanki a767d5c255 Fix Traefik routing by replacing ports with expose for UI 2026-07-28 13:37:40 +05:30
mohanki 81350bf2d2 Fix Coolify nginx mount issue by baking config into UI image 2026-07-28 13:13:37 +05:30
mohanki 0aa2372a1d Change production port to 8095 2026-07-28 12:54:27 +05:30
mohanki 0894a9c21e Initial commit of SOP Monitoring Dashboard 2026-07-28 12:50:28 +05:30
+25 -69
View File
@@ -1,6 +1,6 @@
import React, { useState, useEffect, useMemo } from 'react';
import { useParams, useNavigate, Link } from 'react-router-dom';
import { Activity, Clock, AlertTriangle, Monitor, ArrowLeft, Calendar, CheckCircle2, TrendingUp, TrendingDown, Lightbulb } from 'lucide-react';
import { Activity, Clock, AlertTriangle, Monitor, ArrowLeft, Calendar } from 'lucide-react';
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip as RechartsTooltip, Legend, ResponsiveContainer, PieChart, Pie, Cell } from 'recharts';
export default function ChangeoverDetail() {
@@ -108,7 +108,7 @@ export default function ChangeoverDetail() {
<div className="container animate-fade-in">
<div className="header" style={{ position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center', textAlign: 'center', marginBottom: '3rem' }}>
<div style={{ position: 'absolute', top: 0, left: 0, display: 'flex', flexDirection: 'column', alignItems: 'center', background: '#ed1c24', padding: '10px', borderRadius: '4px' }}>
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d1/Mrf-logo.png" alt="MRF Logo" style={{ width: '60px' }} />
<img src="https://upload.wikimedia.org/wikipedia/commons/4/4b/Madras_Rubber_Factory_Logo.svg" alt="MRF Logo" style={{ width: '60px' }} />
<span style={{ color: 'yellow', fontWeight: 'bold', marginTop: '5px', fontSize: '0.9rem', letterSpacing: '1px' }}>DCG</span>
</div>
<Link to="/" style={{ color: 'var(--text-secondary)', textDecoration: 'none', display: 'flex', alignItems: 'center', gap: '0.5rem', marginBottom: '1.5rem', alignSelf: 'flex-end' }}>
@@ -189,77 +189,33 @@ export default function ChangeoverDetail() {
</div>
</div>
<div className="glass-panel" style={{ marginBottom: '2rem', padding: '2rem', position: 'relative', overflow: 'hidden' }}>
<div style={{ position: 'absolute', top: '-50px', right: '-50px', opacity: 0.05, pointerEvents: 'none' }}>
<Lightbulb size={200} />
</div>
<div className="glass-panel" style={{ marginBottom: '2rem' }}>
<h2 style={{ color: 'yellow', marginBottom: '1.5rem' }}>Suggested Decisions / Insights for the Changeover event (Illustrative)</h2>
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', marginBottom: '2rem' }}>
<div style={{ padding: '0.75rem', background: 'rgba(255, 204, 0, 0.1)', borderRadius: '12px' }}>
<Lightbulb color="#ffcc00" size={28} />
</div>
<div>
<h2 style={{ margin: 0, fontSize: '1.5rem', fontWeight: 600, color: '#fff' }}>Suggested Decisions & Insights</h2>
<p style={{ margin: '0.25rem 0 0 0', color: 'var(--text-secondary)', fontSize: '0.95rem' }}>AI-driven recommendations for process optimization (Illustrative)</p>
</div>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: '1rem', marginBottom: '2.5rem' }}>
<div style={{ background: 'rgba(255,255,255,0.03)', padding: '1rem', borderRadius: '12px', border: '1px solid rgba(255,255,255,0.05)' }}>
<div style={{ color: 'var(--text-secondary)', fontSize: '0.85rem', marginBottom: '0.25rem', display: 'flex', alignItems: 'center', gap: '0.5rem' }}><Calendar size={14} /> Date</div>
<div style={{ fontSize: '1.1rem', fontWeight: 500, color: '#fff' }}>09-06-2025</div>
</div>
<div style={{ background: 'rgba(255,255,255,0.03)', padding: '1rem', borderRadius: '12px', border: '1px solid rgba(255,255,255,0.05)' }}>
<div style={{ color: 'var(--text-secondary)', fontSize: '0.85rem', marginBottom: '0.25rem', display: 'flex', alignItems: 'center', gap: '0.5rem' }}><Clock size={14} /> Time</div>
<div style={{ fontSize: '1.1rem', fontWeight: 500, color: '#fff' }}>13:00 Hrs</div>
</div>
<div style={{ background: 'rgba(255,255,255,0.03)', padding: '1rem', borderRadius: '12px', border: '1px solid rgba(255,255,255,0.05)' }}>
<div style={{ color: 'var(--text-secondary)', fontSize: '0.85rem', marginBottom: '0.25rem', display: 'flex', alignItems: 'center', gap: '0.5rem' }}><Activity size={14} /> Type</div>
<div style={{ fontSize: '1.1rem', fontWeight: 500, color: '#fff' }}>Flowchannel Changeover</div>
</div>
<div style={{ display: 'grid', gridTemplateColumns: '80px 1fr', gap: '0.5rem', marginBottom: '2rem', fontSize: '0.95rem' }}>
<div style={{ color: 'var(--text-secondary)' }}>Date</div>
<div>09-06-2025</div>
<div style={{ color: 'var(--text-secondary)' }}>Time</div>
<div>13:00 Hrs</div>
<div style={{ color: 'var(--text-secondary)' }}>Type</div>
<div>Flowchannel Changeover</div>
</div>
<div style={{ display: 'grid', gridTemplateColumns: '1fr', gap: '2rem' }}>
<div>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem', marginBottom: '1.5rem', paddingBottom: '0.5rem', borderBottom: '1px solid rgba(255, 68, 68, 0.2)' }}>
<TrendingDown color="#ff4444" size={24} />
<h3 style={{ margin: 0, color: '#ff4444', fontSize: '1.2rem', fontWeight: 600 }}>Areas for Attention</h3>
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
{[
{ issue: "Idleness of 15 mins noticed during overall tool changeover operation.", action: "Operators to be trained accordingly." },
{ issue: "Incoming material was not kept nearby to the stock feeder before line stop.", action: "6 mins delayed - Operators to be trained." },
{ issue: "Extruder head not opened within the std time.", action: "Auto screw reverse rotation logic to be re-validated." },
{ issue: "Operator found not in place at the right time during stock feeding operation.", action: "5 mins delayed feeding of upper and middle barrels." }
].map((item, idx) => (
<div key={idx} style={{ background: 'rgba(255, 68, 68, 0.05)', padding: '1.25rem', borderRadius: '12px', borderLeft: '4px solid #ff4444' }}>
<div style={{ color: '#fff', fontSize: '0.95rem', marginBottom: '0.5rem', lineHeight: '1.5' }}>{item.issue}</div>
<div style={{ color: '#ff4444', fontSize: '0.9rem', fontWeight: 500, display: 'flex', alignItems: 'center', gap: '0.5rem' }}><AlertTriangle size={14} /> Action: {item.action}</div>
</div>
))}
</div>
</div>
<h3 style={{ color: '#ff4444', marginBottom: '1rem', fontSize: '1.1rem' }}>Events for Attention and Improvement</h3>
<ol style={{ paddingLeft: '1.5rem', marginBottom: '2rem', lineHeight: '1.8' }}>
<li>Idleness of 15 mins noticed during overall tool changeover operation. <span style={{ color: '#ff4444' }}>Operators to be trained accordingly.</span></li>
<li>Incoming material was not kept nearby to the stock feeder before line stop. <span style={{ color: '#ff4444' }}>6 mins delayed and Operators to be trained accordingly.</span></li>
<li>Extruder head not opened within the std time. <span style={{ color: '#ff4444' }}>Auto screw reverse rotation logic to be re-validated.</span></li>
<li>Operator found not in place at the right time during stock feeding operation. <span style={{ color: '#ff4444' }}>5 mins delayed feeding of upper and middle barrels.</span></li>
</ol>
<div>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem', marginBottom: '1.5rem', paddingBottom: '0.5rem', borderBottom: '1px solid rgba(0, 200, 81, 0.2)' }}>
<TrendingUp color="#00C851" size={24} />
<h3 style={{ margin: 0, color: '#00C851', fontSize: '1.2rem', fontWeight: 600 }}>Key Successes</h3>
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
{[
{ achievement: "Sheetout of removed stock is carried out within 10 mins", metric: "To be followed every time" },
{ achievement: "All operators were complied to their adherence to PPEs, SOPs and tooling arrangements", metric: "To be followed every time" },
{ achievement: "Dual barrel cleanout carried out", metric: "12 mins saved" },
{ achievement: "Incoming recipe was downloaded at the right time", metric: "To be followed every time" }
].map((item, idx) => (
<div key={idx} style={{ background: 'rgba(0, 200, 81, 0.05)', padding: '1.25rem', borderRadius: '12px', borderLeft: '4px solid #00C851' }}>
<div style={{ color: '#fff', fontSize: '0.95rem', marginBottom: '0.5rem', lineHeight: '1.5' }}>{item.achievement}</div>
<div style={{ color: '#00C851', fontSize: '0.9rem', fontWeight: 500, display: 'flex', alignItems: 'center', gap: '0.5rem' }}><CheckCircle2 size={14} /> {item.metric}</div>
</div>
))}
</div>
</div>
</div>
<h3 style={{ color: '#00C851', marginBottom: '1rem', fontSize: '1.1rem' }}>Events that Turned-out to be Best</h3>
<ol style={{ paddingLeft: '1.5rem', marginBottom: '1rem', lineHeight: '1.8' }}>
<li>Sheetout of removed stock is carried out within 10 mins <span style={{ color: '#00C851' }}>- To be followed every time</span></li>
<li>All operators were complied to their adherence to PPEs, SOPs and tooling arrangements <span style={{ color: '#00C851' }}>- To be followed every time</span></li>
<li>Dual barrel cleanout carried out <span style={{ color: '#00C851' }}>- 12 mins saved</span></li>
<li>Incoming recipe was downloaded at the right time <span style={{ color: '#00C851' }}>- To be followed every time</span></li>
</ol>
</div>
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2rem', marginBottom: '2rem' }}>