diff --git a/src/screens/Lead.jsx b/src/screens/Lead.jsx index e32a890..fd045dc 100644 --- a/src/screens/Lead.jsx +++ b/src/screens/Lead.jsx @@ -301,81 +301,6 @@ export default function Lead() { const stage = phaseOf(STAGES.find((s) => s.name === stateName), row) const holds = holdsOf(stage) - /* WHAT IS HAPPENING NOW, lifted above the numbers. An operator's first - question about a lead is "what is going on / what do I do", not "what is - the premium" — so the status strip (an alert when blocked or stalled, the - live state otherwise) sits directly under the header, before the metrics. - Rendered full-width there rather than inside the narrow work column. */ - const statusStrip = ( -blocked ? ( -
-
- ) : stalled ? ( -
-
- ) : stage?.kind === 'customer' && stage.doing ? ( - /* Not an agent working, and not a task of yours either — the lead - is with someone outside the business. Without this the screen - went blank at exactly the stage where an operator is most likely - to wonder whether something has broken. */ -
-
- ) : stage?.kind === 'auto' ? ( -
-
- ) : null - ) // Only what THIS user may run. The workflow refuses the rest server-side // anyway; showing them a row of buttons that all 403 reads as a broken app // rather than as a control. @@ -454,6 +379,83 @@ blocked ? ( // the way out rather than going on promising two minutes. const stillFor = row.updated_at ? now - Date.parse(row.updated_at) : 0 const stalled = !blocked && stage?.kind === 'auto' && stillFor > STALL_AFTER_MS + + /* WHAT IS HAPPENING NOW, lifted above the numbers. An operator's first + question about a lead is "what is going on / what do I do", not "what is + the premium" — so the status strip (an alert when blocked or stalled, the + live state otherwise) sits directly under the header, before the metrics. + Rendered full-width there rather than inside the narrow work column. */ + const statusStrip = ( +blocked ? ( +
+
+ ) : stalled ? ( +
+
+ ) : stage?.kind === 'customer' && stage.doing ? ( + /* Not an agent working, and not a task of yours either — the lead + is with someone outside the business. Without this the screen + went blank at exactly the stage where an operator is most likely + to wonder whether something has broken. */ +
+
+ ) : stage?.kind === 'auto' ? ( +
+
+ ) : null + ) + ? { mins: Math.round(stillFor / 60000), nudge: nudgeFor(stage, row) } : null