From a41c767dd17ef57952376461a0bcf05de8870b49 Mon Sep 17 00:00:00 2001 From: gnezim Date: Sun, 19 Apr 2026 21:23:46 +0300 Subject: [PATCH] =?UTF-8?q?Schedule=20per-leg=20operator=20logos=20+=20?= =?UTF-8?q?=D0=9A=D1=83=D0=BF=D0=B8=D1=82=D1=8C=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - FlightCard: when the flight is multi-leg, render one OperatorLogo per leg in the header so code-share / multi-carrier journeys show both airline brands (Angular's `operator-logo-and-model x N` row). Direct flights keep the single logo. - FlightCard: add an orange "Купить" (buy ticket) link rendered next to "Детали рейса" when the card is in the schedule context. Links to aeroflot.ru's booking flow per Angular's flight-actions wiring. - Reverted earlier per-leg flight-number stack — IFlightLeg in React doesn't carry a per-leg flightId, so the parent SU number is the authoritative label. The Angular dual-number stack belongs to the ConnectingFlight shape (separate from MultiLeg) which the React code already renders flat. --- src/ui/flights/FlightCard.scss | 15 +++++++++++++++ src/ui/flights/FlightCard.tsx | 23 ++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/ui/flights/FlightCard.scss b/src/ui/flights/FlightCard.scss index 33508136..a7a0f27a 100644 --- a/src/ui/flights/FlightCard.scss +++ b/src/ui/flights/FlightCard.scss @@ -199,6 +199,21 @@ } } + &__buy-btn { + background: #ff9000; + color: #fff; + border: none; + border-radius: 4px; + padding: 10px 24px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + text-decoration: none; + transition: background-color 150ms ease; + + &:hover { background: #e68200; } + } + &__details-btn { background: colors.$blue; color: #fff; diff --git a/src/ui/flights/FlightCard.tsx b/src/ui/flights/FlightCard.tsx index 6b41b5be..9251f85e 100644 --- a/src/ui/flights/FlightCard.tsx +++ b/src/ui/flights/FlightCard.tsx @@ -96,6 +96,7 @@ export const FlightCard: FC = ({ const flightNumber = `${flight.flightId.carrier} ${flight.flightId.flightNumber}`; const carrier = operatingCarrier(flight.operatingBy) ?? flight.flightId.carrier; + const isMultiLeg = flight.routeType === "MultiLeg"; const aircraftName = departureLeg.equipment?.aircraft?.actual?.title ?? departureLeg.equipment?.aircraft?.scheduled?.title ?? @@ -171,7 +172,15 @@ export const FlightCard: FC = ({
- + {isMultiLeg + ? flight.legs.map((leg, i) => ( + + )) + : }
@@ -335,6 +344,18 @@ export const FlightCard: FC = ({ > + {direction === "schedule" && ( + e.stopPropagation()} + > + {t("SHARED.BUY-TICKET") || "Купить"} + + )}