From 9a1b8c15c3eb1dba28b4b72bd0f260a20b5ec1a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 22 Jun 2026 16:02:49 +0000 Subject: [PATCH] fix: mostra ritardo in minuti per le partenze nella status pill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Il pill di stato per le partenze mostrava solo il testo generico dell'API (es. "Delayed") invece dei minuti di ritardo calcolati. Ora calcola e mostra "+X min" / "In orario" / "Decollato" con color-coding, esattamente come giĆ  avviene per gli arrivi. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_017nFkYKxv7ELcRcYpcD8whW --- src/screens/FlightScreen.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/screens/FlightScreen.tsx b/src/screens/FlightScreen.tsx index de34c36..132c4d0 100644 --- a/src/screens/FlightScreen.tsx +++ b/src/screens/FlightScreen.tsx @@ -463,6 +463,19 @@ function FlightRowComponent({ item, index, activeTab, userShift, pinnedFlightId, {dText} ); + })() : activeTab === 'departures' && ts ? (() => { + const rDep = item.flight?.time?.real?.departure; + const eDep = item.flight?.time?.estimated?.departure; + const bDep = rDep || eDep || ts; + const dMin = Math.round((bDep - ts) / 60); + const hasDeparted = !!rDep; + const dText = hasDeparted ? 'Decollato' : dMin > 0 ? `+${dMin} min` : 'In orario'; + const dColor = delayToToken(dMin, hasDeparted, colors, colors.success); + return ( + + {dText} + + ); })() : ( {statusText}