From f5dfa14eab04e000b8cd32ecada96f9455a3b28a Mon Sep 17 00:00:00 2001 From: gnezim Date: Wed, 22 Apr 2026 02:08:43 +0300 Subject: [PATCH] =?UTF-8?q?=C2=A74.1.24.1/.2:=20filter=20label=20hidden=20?= =?UTF-8?q?on=20mobile;=20date=20locked=20until=20departure=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Hide `.flights-map-filter-header` on mobile via `@include screen.mobile` so the "Найдите свой маршрут" label is absent on phone (R7). - Disable the PrimeReact Calendar and DayQuickPick when `Город вылета` is empty; date picker must not be selectable without a departure city (R16). - Add `disabled?` prop to DayQuickPick so callers can block the quick-day buttons on mobile (R16 mobile quick-day parity). --- src/features/flights-map/components/FlightsMapFilter.tsx | 5 +++++ .../flights-map/components/FlightsMapStartPage.scss | 6 ++++++ src/ui/calendar/DayQuickPick.tsx | 9 ++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/features/flights-map/components/FlightsMapFilter.tsx b/src/features/flights-map/components/FlightsMapFilter.tsx index 0eb631e7..570934ee 100644 --- a/src/features/flights-map/components/FlightsMapFilter.tsx +++ b/src/features/flights-map/components/FlightsMapFilter.tsx @@ -289,10 +289,14 @@ export const FlightsMapFilter: FC = ({
+ {/* TZ §4.1.24.2 Table 69 R16: calendar days must not be selectable + until Город вылета is filled. Pass `disabled` to both the quick- + pick shortcuts and the full calendar picker. */} = ({ dateFormat="dd.mm.yy" placeholder={t("SHARED.DATE_FORMAT")} showIcon + disabled={!value.departure} className="input--filter" inputId="fm-date" data-testid="fm-date-input" diff --git a/src/features/flights-map/components/FlightsMapStartPage.scss b/src/features/flights-map/components/FlightsMapStartPage.scss index 67225194..d7aaf35d 100644 --- a/src/features/flights-map/components/FlightsMapStartPage.scss +++ b/src/features/flights-map/components/FlightsMapStartPage.scss @@ -177,6 +177,12 @@ h3 { margin: 0; } + + // TZ §4.1.24.2 R7: mobile version must not show the filter label + // "Найдите свой маршрут". Desktop/tablet retain it. + @include screen.mobile { + display: none; + } } &__field { diff --git a/src/ui/calendar/DayQuickPick.tsx b/src/ui/calendar/DayQuickPick.tsx index 0d3b8edc..dd0faf17 100644 --- a/src/ui/calendar/DayQuickPick.tsx +++ b/src/ui/calendar/DayQuickPick.tsx @@ -10,6 +10,11 @@ export interface DayQuickPickProps { count?: number; /** Called with the chosen Date on click. */ onChange: (date: Date) => void; + /** + * When true, all quick-pick buttons are disabled and non-interactive. + * TZ §4.1.24.2 R16: days must not be selectable until Город вылета is set. + */ + disabled?: boolean; } function addDays(base: Date, n: number): Date { @@ -40,6 +45,7 @@ export const DayQuickPick: FC = ({ locale, count = 3, onChange, + disabled = false, }) => { const today = new Date(); today.setHours(0, 0, 0, 0); @@ -69,8 +75,9 @@ export const DayQuickPick: FC = ({