Update grid to render exact seconds for waterfall effect and fix page title
This commit is contained in:
@@ -50,8 +50,8 @@ export default function EventTimeline() {
|
||||
const chronologicalBlocks = useMemo(() => {
|
||||
const blocks = {};
|
||||
events.forEach(ev => {
|
||||
// Group by Minute (HH:MM)
|
||||
const timeKey = ev.start_time.substring(0, 5);
|
||||
// Group by exact time (HH:MM:SS) for a waterfall layout
|
||||
const timeKey = ev.start_time.substring(0, 8);
|
||||
if (!blocks[timeKey]) {
|
||||
blocks[timeKey] = { timeKey, CO: [], Mill: [], Conveyor: [] };
|
||||
}
|
||||
@@ -79,7 +79,7 @@ export default function EventTimeline() {
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '0.5rem' }}>
|
||||
<span style={{ fontSize: '0.85rem', color: 'var(--text-secondary)' }}>
|
||||
{ev.start_time.substring(0, 5)} - {ev.end_time.substring(0, 5)}
|
||||
{ev.start_time.substring(0, 8)} - {ev.end_time.substring(0, 8)}
|
||||
</span>
|
||||
{getStateBadge(ev.state)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user