+ [...selectedUnits].some((t) => !FACILITY_ONLY_UNIT_TYPES.has(t));
+
+ // Если для блока фильтров нет — все лейблы и счётчики оранжевые (в т.ч. на мобилке при только Hypermarket на мастерплане).
const isUnitHighlighted = (unitType: UnitType): boolean => {
- if (!hasActiveFilters()) return true; // Если фильтры не активны, все юниты оранжевые
- return selectedUnits.has(unitType); // Иначе только выбранные
+ if (!hasActiveBlockUnitFilters()) return true;
+ return selectedUnits.has(unitType);
};
return (
diff --git a/src/components/popups/FacilitiesPopup.tsx b/src/components/popups/FacilitiesPopup.tsx
index 51dfc71..5632442 100644
--- a/src/components/popups/FacilitiesPopup.tsx
+++ b/src/components/popups/FacilitiesPopup.tsx
@@ -7,7 +7,7 @@ import { isMobile } from "react-device-detect";
export interface FacilitiesPopupProps {
title: string;
- caption: string;
+ caption?: string;
description: string;
className?: string;
showVideoButton?: boolean;
@@ -37,17 +37,19 @@ function FacilityPopup({
setPopup(null);
setHasBackdrop(false);
}}
- className="absolute top-1 right-1 max-md:hidden"
+ className="max-md:hidden absolute top-1 right-1"
>
)}
-
+
{title}
-
{caption}
+ {caption && (
+
{caption}
+ )}
diff --git a/src/components/popups/FiltersPopup.tsx b/src/components/popups/FiltersPopup.tsx
index cf9aad0..a154b87 100644
--- a/src/components/popups/FiltersPopup.tsx
+++ b/src/components/popups/FiltersPopup.tsx
@@ -10,9 +10,15 @@ import { useClickAway } from "@uidotdev/usehooks";
interface FiltersPopupProps {
onUpdateURL: () => void;
onResetURL: () => void;
+ /** Только на MasterplanPage — фильтр точки Hypermarket на карте */
+ showHypermarketFilter?: boolean;
}
-function FiltersPopup({ onUpdateURL, onResetURL }: FiltersPopupProps) {
+function FiltersPopup({
+ onUpdateURL,
+ onResetURL,
+ showHypermarketFilter = false,
+}: FiltersPopupProps) {
const { parentBoundingClientRect, setPopup, setHasBackdrop } =
usePopupStore();
@@ -134,8 +140,20 @@ function FiltersPopup({ onUpdateURL, onResetURL }: FiltersPopupProps) {
isFilterActive("Healthcare") && "!bg-[#F47F52] !text-white"
)}
>
- Healthcare
+ Health & Wellness
+ {showHypermarketFilter && (
+
+ )}