опросник выводит тарифы опросника

This commit is contained in:
Nastya 2024-01-15 03:08:28 +03:00
parent 0226382d60
commit dccf707f96

@ -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<string, string> = {
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) => {