карточки тарифов, ссылки на оферту и персональные данные кнопочка тестовая публикация
This commit is contained in:
parent
b59112ab35
commit
772c64a33a
@ -122,7 +122,7 @@ export default function Component() {
|
|||||||
<Button
|
<Button
|
||||||
variant="text"
|
variant="text"
|
||||||
sx={{ fontSize: "16px", fontWeight: 500, color: "white" }}
|
sx={{ fontSize: "16px", fontWeight: 500, color: "white" }}
|
||||||
href={"https://docs.pena.digital/docs"}
|
href={"https://shub.pena.digital/docs/oferta"}
|
||||||
>
|
>
|
||||||
Пользовательское соглашение
|
Пользовательское соглашение
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -66,15 +66,15 @@ export default function Component() {
|
|||||||
шаблоны квизов с легкой установкой на любой сайт и социальные сети
|
шаблоны квизов с легкой установкой на любой сайт и социальные сети
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
component={Link}
|
component={Link}
|
||||||
to={"/signin"}
|
to={"/signin"}
|
||||||
state={{ backgroundLocation: location }}
|
state={{ backgroundLocation: location }}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
Попробуйте бесплатно
|
Попробуйте бесплатно
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
component={"img"}
|
component={"img"}
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
import { Tab } from "@mui/material"
|
import { Tab } from "@mui/material";
|
||||||
import { styled } from "@mui/material"
|
import { styled } from "@mui/material";
|
||||||
|
|
||||||
|
|
||||||
export const CustomTab = styled(Tab)(({ theme }) => ({
|
export const CustomTab = styled(Tab)(({ theme }) => ({
|
||||||
...theme.typography.body2,
|
...theme.typography.body2,
|
||||||
color: theme.palette.primary.main,
|
color: theme.palette.primary.main,
|
||||||
padding: "15px",
|
padding: "15px",
|
||||||
minWidth: 0,
|
minWidth: 0,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#7e2aea",
|
color: "#7e2aea",
|
||||||
textUnderlinePosition: "under",
|
textUnderlinePosition: "under",
|
||||||
textDecoration: "underline",
|
textDecoration: "underline",
|
||||||
textUnderlineOffset: "3px",
|
textUnderlineOffset: "3px",
|
||||||
},
|
},
|
||||||
"&:first-of-type": {
|
"&:first-of-type": {
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
}
|
},
|
||||||
}))
|
}));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Tabs as MuiTabs } from "@mui/material"
|
import { Tabs as MuiTabs } from "@mui/material";
|
||||||
import { CustomTab } from "./CustomTab"
|
import { CustomTab } from "./CustomTab";
|
||||||
|
|
||||||
type TabsProps = {
|
type TabsProps = {
|
||||||
names: string[];
|
names: string[];
|
||||||
@ -8,20 +8,25 @@ type TabsProps = {
|
|||||||
setSelectedItem: (num: "count" | "day") => void;
|
setSelectedItem: (num: "count" | "day") => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Tabs = ({ items, names, selectedItem, setSelectedItem }: TabsProps) => (
|
export const Tabs = ({
|
||||||
<MuiTabs
|
items,
|
||||||
sx={{m:"25px"}}
|
names,
|
||||||
TabIndicatorProps={{ sx: { display: "none" } }}
|
selectedItem,
|
||||||
value={selectedItem}
|
setSelectedItem,
|
||||||
onChange={(event, newValue: "count" | "day") => {
|
}: TabsProps) => (
|
||||||
console.log(newValue)
|
<MuiTabs
|
||||||
setSelectedItem(newValue)
|
sx={{ m: "25px" }}
|
||||||
}}
|
TabIndicatorProps={{ sx: { display: "none" } }}
|
||||||
variant="scrollable"
|
value={selectedItem}
|
||||||
scrollButtons={false}
|
onChange={(event, newValue: "count" | "day") => {
|
||||||
>
|
console.log(newValue);
|
||||||
{items.map((item, index) => (
|
setSelectedItem(newValue);
|
||||||
<CustomTab key={item + index} value={item} label={names[index]} />
|
}}
|
||||||
))}
|
variant="scrollable"
|
||||||
</MuiTabs>
|
scrollButtons={false}
|
||||||
)
|
>
|
||||||
|
{items.map((item, index) => (
|
||||||
|
<CustomTab key={item + index} value={item} label={names[index]} />
|
||||||
|
))}
|
||||||
|
</MuiTabs>
|
||||||
|
);
|
||||||
|
@ -67,12 +67,12 @@ function TariffPage() {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: `https://squiz.pena.digital/strator/tariff?page=${page}&limit=100`,
|
url: `https://squiz.pena.digital/strator/tariff?page=${page}&limit=100`,
|
||||||
});
|
});
|
||||||
console.log(page)
|
console.log(page);
|
||||||
|
|
||||||
tariffsList.push(...tariffsResult.tariffs);
|
tariffsList.push(...tariffsResult.tariffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("это то что мы отдаём перед концом",tariffsList)
|
console.log("это то что мы отдаём перед концом", tariffsList);
|
||||||
return tariffsList;
|
return tariffsList;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ function TariffPage() {
|
|||||||
url: "https://squiz.pena.digital/price/discounts",
|
url: "https://squiz.pena.digital/price/discounts",
|
||||||
});
|
});
|
||||||
setUser(user);
|
setUser(user);
|
||||||
console.log("это то что мы получили в самом конце",tariffsList)
|
console.log("это то что мы получили в самом конце", tariffsList);
|
||||||
setTariffs(tariffsList);
|
setTariffs(tariffsList);
|
||||||
setDiscounts(discounts.Discounts);
|
setDiscounts(discounts.Discounts);
|
||||||
let c = currencyFormatter.format(Number(user.wallet.cash) / 100);
|
let c = currencyFormatter.format(Number(user.wallet.cash) / 100);
|
||||||
@ -140,7 +140,7 @@ function TariffPage() {
|
|||||||
|
|
||||||
const purchasesAmount = user?.wallet.purchasesAmount ?? 0;
|
const purchasesAmount = user?.wallet.purchasesAmount ?? 0;
|
||||||
const isUserNko = user?.status === "nko";
|
const isUserNko = user?.status === "nko";
|
||||||
console.log(tariffs)
|
console.log(tariffs);
|
||||||
const filteredTariffs = tariffs.filter((tariff) => {
|
const filteredTariffs = tariffs.filter((tariff) => {
|
||||||
return (
|
return (
|
||||||
tariff.privileges[0].serviceKey === "squiz" &&
|
tariff.privileges[0].serviceKey === "squiz" &&
|
||||||
@ -149,7 +149,7 @@ function TariffPage() {
|
|||||||
tariff.privileges[0]?.type === selectedItem
|
tariff.privileges[0]?.type === selectedItem
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
console.log(filteredTariffs)
|
console.log(filteredTariffs);
|
||||||
|
|
||||||
async function handleLogoutClick() {
|
async function handleLogoutClick() {
|
||||||
const [, logoutError] = await logout();
|
const [, logoutError] = await logout();
|
||||||
@ -209,9 +209,13 @@ function TariffPage() {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Container>
|
</Container>
|
||||||
<Tabs names={Object.values(StepperText)} items={Object.keys(StepperText)} selectedItem={selectedItem} setSelectedItem={setSelectedItem} />
|
<Tabs
|
||||||
|
names={Object.values(StepperText)}
|
||||||
|
items={Object.keys(StepperText)}
|
||||||
|
selectedItem={selectedItem}
|
||||||
|
setSelectedItem={setSelectedItem}
|
||||||
|
/>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
justifyContent: "left",
|
justifyContent: "left",
|
||||||
|
@ -1,33 +1,97 @@
|
|||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import TariffCard from "./TariffCard";
|
import TariffCard from "./TariffCard";
|
||||||
import NumberIcon from "@icons/NumberIcon";
|
import NumberIcon from "@icons/NumberIcon";
|
||||||
import { useTheme } from "@mui/material";
|
import { Box, useTheme } from "@mui/material";
|
||||||
|
|
||||||
export default function FreeTariffCard() {
|
export default function FreeTariffCard() {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TariffCard
|
// <TariffCard
|
||||||
icon={<NumberIcon number={0} color="#7e2aea" backgroundColor="white" />}
|
// icon={<NumberIcon number={0} color="#7e2aea" backgroundColor="white" />}
|
||||||
discount={""}
|
// discount={""}
|
||||||
headerText="бесплатно"
|
// headerText="бесплатно"
|
||||||
text="Первые 14 дней после регистрации, вы можете пользоваться полным функционалом сервиса совершенно бесплатно"
|
// text="Каждому пользователю все наши продукты в первые 14 дней доступны совершенно бесплатно (кроме доп.услуг)"
|
||||||
price={
|
// price={
|
||||||
<Typography variant="price" color="white">
|
// <Typography variant="price" color="white">
|
||||||
0 руб.
|
// 0 руб.
|
||||||
</Typography>
|
// </Typography>
|
||||||
}
|
// }
|
||||||
|
// sx={{
|
||||||
|
// backgroundColor: "#7e2aea",
|
||||||
|
// color: "white",
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
minHeight: "250px",
|
||||||
backgroundColor: "#7e2aea",
|
backgroundColor: "#7e2aea",
|
||||||
color: "white",
|
color: "white",
|
||||||
|
borderRadius: "12px",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "start",
|
||||||
|
p: "20px",
|
||||||
}}
|
}}
|
||||||
buttonProps={{
|
>
|
||||||
text: "Выбрать",
|
<Box
|
||||||
sx: {
|
sx={{
|
||||||
color: "white",
|
position: "relative",
|
||||||
borderColor: "white",
|
width: "100%",
|
||||||
},
|
display: "flex",
|
||||||
}}
|
justifyContent: "space-between",
|
||||||
/>
|
alignItems: "center",
|
||||||
|
gap: "16px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<NumberIcon number={0} color="#7e2aea" backgroundColor="white" />
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "baseline",
|
||||||
|
flexWrap: "wrap",
|
||||||
|
columnGap: "10px",
|
||||||
|
rowGap: 0,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
fontWeight: 500,
|
||||||
|
fontSize: "20px",
|
||||||
|
lineHeight: "24px",
|
||||||
|
}}
|
||||||
|
color="white"
|
||||||
|
>
|
||||||
|
{" "}
|
||||||
|
0 руб{" "}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
<Typography
|
||||||
|
variant="h5"
|
||||||
|
sx={{
|
||||||
|
mt: "14px",
|
||||||
|
mb: "10px",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
overflow: "hidden",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Бесплатно 14 дней
|
||||||
|
</Typography>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
mb: "auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography sx={{ overflow: "hidden", textOverflow: "ellipsis" }}>
|
||||||
|
Каждому пользователю все наши продукты в первые 14 дней доступны
|
||||||
|
совершенно бесплатно (кроме доп.услуг)
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -131,9 +131,22 @@ export default function TariffCard({
|
|||||||
{buttonProps && (
|
{buttonProps && (
|
||||||
<Button
|
<Button
|
||||||
onClick={buttonProps.onClick}
|
onClick={buttonProps.onClick}
|
||||||
variant="pena-outlined-purple"
|
variant="outlined"
|
||||||
sx={{
|
sx={{
|
||||||
mt: "10px",
|
mt: "10px",
|
||||||
|
color: "#7e2aea",
|
||||||
|
minWidth: "180px",
|
||||||
|
background: "transparent",
|
||||||
|
"&:hover": {
|
||||||
|
color: "#7E2AEA",
|
||||||
|
backgroundColor: "#F2F3F7",
|
||||||
|
border: "1px solid #7E2AEA",
|
||||||
|
},
|
||||||
|
"&:active": {
|
||||||
|
color: "#FFFFFF",
|
||||||
|
backgroundColor: " #581CA7",
|
||||||
|
border: "1px solid #581CA7",
|
||||||
|
},
|
||||||
...buttonProps.sx,
|
...buttonProps.sx,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -53,11 +53,25 @@ export const createTariffElements = (
|
|||||||
price={
|
price={
|
||||||
<>
|
<>
|
||||||
{priceBeforeDiscounts !== priceAfterDiscounts && (
|
{priceBeforeDiscounts !== priceAfterDiscounts && (
|
||||||
<Typography variant="oldPrice">
|
<Typography
|
||||||
|
sx={{
|
||||||
|
textDecorationLine: "line-through",
|
||||||
|
color: "#FB5607",
|
||||||
|
fontSize: "15px",
|
||||||
|
lineHeight: "21px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{currencyFormatter.format(priceBeforeDiscounts / 100)}
|
{currencyFormatter.format(priceBeforeDiscounts / 100)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
<Typography variant="price">
|
<Typography
|
||||||
|
sx={{
|
||||||
|
fontWeight: 500,
|
||||||
|
fontSize: "20px",
|
||||||
|
lineHeight: "24px",
|
||||||
|
color: "#4D4D4D",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{currencyFormatter.format(priceAfterDiscounts / 100)}
|
{currencyFormatter.format(priceAfterDiscounts / 100)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
|
@ -222,9 +222,15 @@ export const ContactForm = ({
|
|||||||
/>
|
/>
|
||||||
<Typography sx={{ color: theme.palette.text.primary }}>
|
<Typography sx={{ color: theme.palette.text.primary }}>
|
||||||
С 
|
С 
|
||||||
<Link> Положением об обработке персональных данных </Link>
|
<Link href={"https://shub.pena.digital/ppdd"}>
|
||||||
|
{" "}
|
||||||
|
Положением об обработке персональных данных{" "}
|
||||||
|
</Link>
|
||||||
 и 
|
 и 
|
||||||
<Link> Политикой конфиденциальности </Link>
|
<Link href={"https://shub.pena.digital/docs/privacy"}>
|
||||||
|
{" "}
|
||||||
|
Политикой конфиденциальности{" "}
|
||||||
|
</Link>
|
||||||
 ознакомлен
|
 ознакомлен
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -61,7 +61,7 @@ export default function EditPage({
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const currentStep = useQuizStore((state) => state.currentStep);
|
const currentStep = useQuizStore((state) => state.currentStep);
|
||||||
const isBranchingLogic = useMediaQuery(theme.breakpoints.down(1100));
|
const isBranchingLogic = useMediaQuery(theme.breakpoints.down(1100));
|
||||||
const isMobile = useMediaQuery(theme.breakpoints.down(660));
|
const isMobile = useMediaQuery(theme.breakpoints.down(650));
|
||||||
const quizConfig = quiz?.config;
|
const quizConfig = quiz?.config;
|
||||||
// const [openBranchingPage, setOpenBranchingPage] = useState<boolean>(false);
|
// const [openBranchingPage, setOpenBranchingPage] = useState<boolean>(false);
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import { useEffect, useRef, useState } from "react";
|
|||||||
import arrowLeftIcon from "../../assets/icons/arrow_left.svg";
|
import arrowLeftIcon from "../../assets/icons/arrow_left.svg";
|
||||||
import arrowRightIcon from "../../assets/icons/arrow_right.svg";
|
import arrowRightIcon from "../../assets/icons/arrow_right.svg";
|
||||||
|
|
||||||
|
|
||||||
export default function StepOne() {
|
export default function StepOne() {
|
||||||
const quiz = useCurrentQuiz();
|
const quiz = useCurrentQuiz();
|
||||||
const config = quiz?.config;
|
const config = quiz?.config;
|
||||||
|
@ -55,7 +55,7 @@ export default function Steptwo() {
|
|||||||
sx={{
|
sx={{
|
||||||
paddingBottom: "15px",
|
paddingBottom: "15px",
|
||||||
"&::-webkit-scrollbar": { width: 0 },
|
"&::-webkit-scrollbar": { width: 0 },
|
||||||
position: "relative"
|
position: "relative",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
@ -138,7 +138,7 @@ export default function Steptwo() {
|
|||||||
left: "0",
|
left: "0",
|
||||||
top: "55%",
|
top: "55%",
|
||||||
width: "40px",
|
width: "40px",
|
||||||
top: "calc(50% - 40px)"
|
top: "calc(50% - 40px)",
|
||||||
}}
|
}}
|
||||||
src={arrowLeftIcon}
|
src={arrowLeftIcon}
|
||||||
/>
|
/>
|
||||||
@ -149,7 +149,7 @@ export default function Steptwo() {
|
|||||||
right: "0",
|
right: "0",
|
||||||
top: "55%",
|
top: "55%",
|
||||||
width: "40px",
|
width: "40px",
|
||||||
top: "calc(50% - 40px)"
|
top: "calc(50% - 40px)",
|
||||||
}}
|
}}
|
||||||
src={arrowRightIcon}
|
src={arrowRightIcon}
|
||||||
/>
|
/>
|
||||||
|
@ -37,7 +37,7 @@ export const ButtonTestPublication = () => {
|
|||||||
lineHeight: "18px",
|
lineHeight: "18px",
|
||||||
height: "34px",
|
height: "34px",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
minWidth: "116px",
|
minWidth: "146px",
|
||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
Object.keys(whyCantCreatePublic).length === 0
|
Object.keys(whyCantCreatePublic).length === 0
|
||||||
|
Loading…
Reference in New Issue
Block a user