From dccf707f968d8679d85ce0f9f00e4533a7fda75d Mon Sep 17 00:00:00 2001 From: Nastya Date: Mon, 15 Jan 2024 03:08:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=BF=D1=80=D0=BE=D1=81=D0=BD=D0=B8?= =?UTF-8?q?=D0=BA=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=20=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D1=84=D1=8B=20=D0=BE=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Tariffs/TariffsPage.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/pages/Tariffs/TariffsPage.tsx b/src/pages/Tariffs/TariffsPage.tsx index 6260670..8ef94f7 100644 --- a/src/pages/Tariffs/TariffsPage.tsx +++ b/src/pages/Tariffs/TariffsPage.tsx @@ -23,7 +23,7 @@ import { handleComponentError } from "@root/utils/handleComponentError"; import { useHistoryStore } from "@root/stores/history"; import { useRecentlyPurchasedTariffs } from "@utils/hooks/useRecentlyPurchasedTariffs"; -const subPages = [/*"Шаблонизатор",*/ "Опросник"/* , "Сокращатель ссылок" */]; +const subPages = ["Опросник", /*"Шаблонизатор",*/ /*"Сокращатель ссылок"*/]; const StepperText: Record = { volume: "Тарифы на объём", @@ -62,15 +62,16 @@ function TariffPage() { } const filteredTariffs = tariffs.filter((tariff) => { - if (tariff.privileges[0] === undefined || - selectedItem === 1 && tariff.privileges[0].serviceKey === "templategen" || - selectedItem === 0 && tariff.privileges[0].serviceKey === "squiz" - ) return false - return ( + if (tariff.privileges[0] === undefined) return false + if ( tariff.privileges[0].type === "day" === (unit === "time") && !tariff.isDeleted && !tariff.isCustom - ); + ) { + if (selectedItem === 0 && tariff.privileges[0].serviceKey === "squiz") return true + if (selectedItem === 1 && tariff.privileges[0].serviceKey === "templategen") return true + } + return false }); const isCustomTariffs = tariffs.filter((tariff) => {