fix: conflicts resolved
This commit is contained in:
commit
30006f4f4f
@ -5,6 +5,7 @@ import { enqueueSnackbar } from "notistack";
|
|||||||
import CustomCheckbox from "@ui_kit/CustomCheckbox";
|
import CustomCheckbox from "@ui_kit/CustomCheckbox";
|
||||||
|
|
||||||
import { Inputs } from "@/components/ViewPublicationPage/ContactForm/Inputs/Inputs";
|
import { Inputs } from "@/components/ViewPublicationPage/ContactForm/Inputs/Inputs";
|
||||||
|
import { ContactTextBlock } from "./ContactTextBlock";
|
||||||
|
|
||||||
import { useRootContainerSize } from "@contexts/RootContainerWidthContext";
|
import { useRootContainerSize } from "@contexts/RootContainerWidthContext";
|
||||||
import { useQuizData } from "@contexts/QuizDataContext";
|
import { useQuizData } from "@contexts/QuizDataContext";
|
||||||
@ -208,130 +209,90 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
: theme.palette.background.default,
|
: theme.palette.background.default,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<ContactTextBlock settings={settings} />
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: isMobile ? undefined : "100%",
|
flexGrow: 0,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "space-between",
|
||||||
borderRight: isMobile ? undefined : "1px solid #9A9AAF80",
|
flexDirection: "column",
|
||||||
margin: isMobile ? 0 : "40px 0",
|
backgroundColor: theme.palette.background.default,
|
||||||
padding: isMobile ? "0" : "0 40px",
|
height: "auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
maxWidth: "630px",
|
|
||||||
width: "100%",
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
alignItems: isMobile ? undefined : "center",
|
||||||
alignItems: "flex-start",
|
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
padding: isMobile ? "40px 20px 0 20px" : "0",
|
flexDirection: "column",
|
||||||
mt: isMobile ? 0 : isTablet ? "-180px" : "-47px",
|
p: isMobile
|
||||||
|
? "0 20px"
|
||||||
|
: isTablet
|
||||||
|
? "0px 40px 30px 60px"
|
||||||
|
: "125px 60px 30px 60px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
textAlign: isTablet ? undefined : "center",
|
display: "flex",
|
||||||
fontSize: "24px",
|
flexDirection: "column",
|
||||||
lineHeight: "normal",
|
mt: isMobile ? "10px" : "20px",
|
||||||
fontWeight: 501,
|
mb: "20px",
|
||||||
color: theme.palette.text.primary,
|
|
||||||
wordBreak: "break-word",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{settings.cfg.formContact.title ||
|
<Inputs
|
||||||
"Заполните форму, чтобы получить результаты теста"}
|
name={name}
|
||||||
</Typography>
|
setName={setName}
|
||||||
{settings.cfg.formContact.desc && (
|
email={email}
|
||||||
|
setEmail={setEmail}
|
||||||
|
phone={phone}
|
||||||
|
setPhone={setPhone}
|
||||||
|
text={text}
|
||||||
|
setText={setText}
|
||||||
|
adress={adress}
|
||||||
|
setAdress={setAdress}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
width: isMobile ? "300px" : "390px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CustomCheckbox
|
||||||
|
label=""
|
||||||
|
handleChange={({ target }) => {
|
||||||
|
setReady(target.checked);
|
||||||
|
}}
|
||||||
|
checked={ready}
|
||||||
|
colorIcon={theme.palette.primary.main}
|
||||||
|
sx={{ marginRight: "0" }}
|
||||||
|
/>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
m: "20px 0",
|
lineHeight: "18.96px",
|
||||||
fontSize: "18px",
|
|
||||||
wordBreak: "break-word",
|
|
||||||
}}
|
}}
|
||||||
|
fontSize={"16px"}
|
||||||
>
|
>
|
||||||
{settings.cfg.formContact.desc}
|
С 
|
||||||
|
<Link href={"https://shub.pena.digital/ppdd"} target="_blank">
|
||||||
|
Положением об обработке персональных данных{" "}
|
||||||
|
</Link>
|
||||||
|
 и 
|
||||||
|
<Link
|
||||||
|
href={"https://shub.pena.digital/docs/privacy"}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{" "}
|
||||||
|
Политикой конфиденциальности{" "}
|
||||||
|
</Link>
|
||||||
|
 ознакомлен
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
</Box>
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: isMobile ? undefined : "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
flexDirection: "column",
|
|
||||||
backgroundColor: theme.palette.background.default,
|
|
||||||
p: isMobile
|
|
||||||
? "0 20px"
|
|
||||||
: isTablet
|
|
||||||
? "0px 40px 30px 60px"
|
|
||||||
: "125px 60px 30px 60px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
mt: isMobile ? "10px" : "20px",
|
|
||||||
mb: "20px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Inputs
|
|
||||||
name={name}
|
|
||||||
setName={setName}
|
|
||||||
email={email}
|
|
||||||
setEmail={setEmail}
|
|
||||||
phone={phone}
|
|
||||||
setPhone={setPhone}
|
|
||||||
text={text}
|
|
||||||
setText={setText}
|
|
||||||
adress={adress}
|
|
||||||
setAdress={setAdress}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
width: isMobile ? "300px" : "390px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CustomCheckbox
|
|
||||||
label=""
|
|
||||||
handleChange={({ target }) => {
|
|
||||||
setReady(target.checked);
|
|
||||||
}}
|
|
||||||
checked={ready}
|
|
||||||
colorIcon={theme.palette.primary.main}
|
|
||||||
sx={{ marginRight: "0" }}
|
|
||||||
/>
|
|
||||||
<Typography
|
|
||||||
sx={{ color: theme.palette.text.primary, lineHeight: "18.96px" }}
|
|
||||||
fontSize={"16px"}
|
|
||||||
>
|
|
||||||
С 
|
|
||||||
<Link href={"https://shub.pena.digital/ppdd"} target="_blank">
|
|
||||||
Положением об обработке персональных данных{" "}
|
|
||||||
</Link>
|
|
||||||
 и 
|
|
||||||
<Link
|
|
||||||
href={"https://shub.pena.digital/docs/privacy"}
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{" "}
|
|
||||||
Политикой конфиденциальности{" "}
|
|
||||||
</Link>
|
|
||||||
 ознакомлен
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
{
|
|
||||||
// resultQuestion &&
|
|
||||||
// settings.cfg.resultInfo.when === "after" &&
|
|
||||||
<Button
|
<Button
|
||||||
disabled={!(ready && !fire)}
|
disabled={!(ready && !fire)}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@ -349,7 +310,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
>
|
>
|
||||||
{settings.cfg.formContact?.button || "Получить результаты"}
|
{settings.cfg.formContact?.button || "Получить результаты"}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
</Box>
|
||||||
{show_badge && (
|
{show_badge && (
|
||||||
<Box
|
<Box
|
||||||
component={Link}
|
component={Link}
|
||||||
@ -361,12 +322,9 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
mt: "55px",
|
mt: "55px",
|
||||||
mb: "40px",
|
mb: isMobile ? "30px" : isTablet ? "40px" : "50px",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
position: "absolute",
|
|
||||||
bottom: 0,
|
|
||||||
left: isMobile ? "28%" : undefined,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NameplateLogo
|
<NameplateLogo
|
||||||
@ -377,17 +335,6 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
: "#FFFFFF",
|
: "#FFFFFF",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/*<Typography*/}
|
|
||||||
{/* sx={{*/}
|
|
||||||
{/* fontSize: "14px",*/}
|
|
||||||
{/* color: quizThemes[settings.cfg.theme].isLight*/}
|
|
||||||
{/* ? "#4D4D4D"*/}
|
|
||||||
{/* : "#F5F7FF",*/}
|
|
||||||
{/* whiteSpace: "nowrap",*/}
|
|
||||||
{/* }}*/}
|
|
||||||
{/*>*/}
|
|
||||||
{/* Сделано на PenaQuiz*/}
|
|
||||||
{/*</Typography>*/}
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
import {Box, Typography, useTheme} from "@mui/material";
|
||||||
|
import {useRootContainerSize} from "@contexts/RootContainerWidthContext.ts";
|
||||||
|
import {QuizSettingsConfig} from "@model/settingsData.ts";
|
||||||
|
import {FC} from "react";
|
||||||
|
|
||||||
|
type ContactTextBlockProps = {
|
||||||
|
settings: QuizSettingsConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ContactTextBlock: FC<ContactTextBlockProps> = ({settings}) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
const isMobile = useRootContainerSize() < 850;
|
||||||
|
const isTablet = useRootContainerSize() < 1000;
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
flexGrow: 1,
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
borderRight: isMobile ? undefined : "1px solid #9A9AAF80",
|
||||||
|
margin: isMobile ? 0 : "40px 0",
|
||||||
|
padding: isMobile ? "0" : "0 40px"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
maxWidth: isMobile? "100%" : isTablet? "410px" : "630px",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "flex-start",
|
||||||
|
justifyContent: "center",
|
||||||
|
padding: isMobile ? "40px 20px 0 20px" : "0",
|
||||||
|
mt: isMobile ? 0 : isTablet ? "-180px" : "-47px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
textAlign: isTablet ? undefined : "center",
|
||||||
|
fontSize: "24px",
|
||||||
|
lineHeight: "normal",
|
||||||
|
fontWeight: 501,
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
wordBreak: "break-word",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{settings.cfg.formContact.title ||
|
||||||
|
"Заполните форму, чтобы получить результаты теста"}
|
||||||
|
</Typography>
|
||||||
|
{settings.cfg.formContact.desc && (
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
m: "20px 0",
|
||||||
|
fontSize: "18px",
|
||||||
|
wordBreak: "break-word",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{settings.cfg.formContact.desc}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
}
|
@ -20,6 +20,13 @@ export const CountrySelector:FC<CountrySelectorProps> = ({setMask}) => {
|
|||||||
value={country}
|
value={country}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
renderValue={(value) => value}
|
renderValue={(value) => value}
|
||||||
|
MenuProps={{
|
||||||
|
PaperProps: {
|
||||||
|
style: {
|
||||||
|
backgroundColor: theme.palette.background.default,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
minWidth: 50,
|
minWidth: 50,
|
||||||
backgroundColor: theme.palette.background.default,
|
backgroundColor: theme.palette.background.default,
|
||||||
|
@ -407,7 +407,19 @@ export const StartPageViewPublication = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{settings.cfg.info.site && (
|
{settings.cfg.info.site && (
|
||||||
<ButtonBase onClick={onSiteClick}>
|
<ButtonBase
|
||||||
|
onClick={onSiteClick}
|
||||||
|
sx={{
|
||||||
|
display: "block",
|
||||||
|
marginTop: "10px",
|
||||||
|
marginLeft:
|
||||||
|
settings.cfg.startpageType === "expanded" &&
|
||||||
|
settings.cfg.startpage.position === "center" &&
|
||||||
|
!isMobile
|
||||||
|
? "auto"
|
||||||
|
: undefined,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
lineHeight: "19px",
|
lineHeight: "19px",
|
||||||
@ -450,7 +462,19 @@ export const StartPageViewPublication = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<ButtonBase onClick={handleCopyNumber}>
|
<ButtonBase
|
||||||
|
onClick={handleCopyNumber}
|
||||||
|
sx={{
|
||||||
|
display: "block",
|
||||||
|
marginTop: "10px",
|
||||||
|
marginLeft:
|
||||||
|
settings.cfg.startpageType === "expanded" &&
|
||||||
|
settings.cfg.startpage.position === "center" &&
|
||||||
|
!isMobile
|
||||||
|
? "auto"
|
||||||
|
: undefined,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
textAlign:
|
textAlign:
|
||||||
@ -490,6 +514,7 @@ export const StartPageViewPublication = () => {
|
|||||||
{settings.cfg.info.phonenumber}
|
{settings.cfg.info.phonenumber}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
lineHeight: "14px",
|
lineHeight: "14px",
|
||||||
@ -498,8 +523,15 @@ export const StartPageViewPublication = () => {
|
|||||||
fontSize: "12px",
|
fontSize: "12px",
|
||||||
textAlign:
|
textAlign:
|
||||||
settings.cfg.startpageType === "expanded" &&
|
settings.cfg.startpageType === "expanded" &&
|
||||||
settings.cfg.startpage.position === "center"
|
settings.cfg.startpage.position === "center" &&
|
||||||
|
!isMobile
|
||||||
? "end"
|
? "end"
|
||||||
|
: (settings.cfg.startpageType === "expanded" &&
|
||||||
|
settings.cfg.startpage.position === "center" &&
|
||||||
|
isMobile) ||
|
||||||
|
(settings.cfg.startpageType === "centered" &&
|
||||||
|
isMobile)
|
||||||
|
? "center"
|
||||||
: "none",
|
: "none",
|
||||||
maxHeight: "120px",
|
maxHeight: "120px",
|
||||||
overflow: "auto",
|
overflow: "auto",
|
||||||
|
@ -87,6 +87,7 @@ export default function ViewPublicationPage() {
|
|||||||
|
|
||||||
quizStepElement = (
|
quizStepElement = (
|
||||||
<Question
|
<Question
|
||||||
|
key={currentQuestion.id}
|
||||||
currentQuestion={currentQuestion}
|
currentQuestion={currentQuestion}
|
||||||
currentQuestionStepNumber={currentQuestionStepNumber}
|
currentQuestionStepNumber={currentQuestionStepNumber}
|
||||||
prevButton={
|
prevButton={
|
||||||
|
@ -100,7 +100,8 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => {
|
|||||||
{answer ? (
|
{answer ? (
|
||||||
variant?.extendedText ? (
|
variant?.extendedText ? (
|
||||||
<img
|
<img
|
||||||
src={variant?.extendedText}
|
key={variant.extendedText}
|
||||||
|
src={variant.extendedText}
|
||||||
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AnyTypedQuizQuestion } from "./questionTypes/shared";
|
import {AnyTypedQuizQuestion} from "./questionTypes/shared";
|
||||||
|
|
||||||
export type QuizStartpageType = "standard" | "expanded" | "centered" | null;
|
export type QuizStartpageType = "standard" | "expanded" | "centered" | null;
|
||||||
|
|
||||||
@ -41,18 +41,20 @@ export type FCField = {
|
|||||||
used: boolean;
|
used: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type QuizSettingsConfig = {
|
||||||
|
fp: boolean;
|
||||||
|
rep: boolean;
|
||||||
|
name: string;
|
||||||
|
lim: number;
|
||||||
|
due: number;
|
||||||
|
delay: number;
|
||||||
|
pausable: boolean;
|
||||||
|
cfg: QuizConfig;
|
||||||
|
}
|
||||||
|
|
||||||
export type QuizSettings = {
|
export type QuizSettings = {
|
||||||
questions: AnyTypedQuizQuestion[];
|
questions: AnyTypedQuizQuestion[];
|
||||||
settings: {
|
settings: QuizSettingsConfig;
|
||||||
fp: boolean;
|
|
||||||
rep: boolean;
|
|
||||||
name: string;
|
|
||||||
lim: number;
|
|
||||||
due: number;
|
|
||||||
delay: number;
|
|
||||||
pausable: boolean;
|
|
||||||
cfg: QuizConfig;
|
|
||||||
};
|
|
||||||
cnt: number;
|
cnt: number;
|
||||||
recentlyCompleted: boolean;
|
recentlyCompleted: boolean;
|
||||||
show_badge: boolean;
|
show_badge: boolean;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@frontend/squzanswerer",
|
"name": "@frontend/squzanswerer",
|
||||||
"version": "1.0.36",
|
"version": "1.0.38",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist-package/index.js",
|
"main": "./dist-package/index.js",
|
||||||
"module": "./dist-package/index.js",
|
"module": "./dist-package/index.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user