2023-05-03 23:25:35 +00:00
|
|
|
|
import IconPlus from "@icons/IconPlus";
|
2023-11-20 17:22:13 +00:00
|
|
|
|
import Info from "@icons/Info";
|
|
|
|
|
import Plus from "@icons/Plus";
|
2023-05-07 14:01:03 +00:00
|
|
|
|
import ArrowLeft from "@icons/questionsPage/arrowLeft";
|
2023-12-07 22:56:31 +00:00
|
|
|
|
import { Box, Button, Typography, Paper, FormControl, TextField } from "@mui/material";
|
2023-11-20 17:22:13 +00:00
|
|
|
|
import { incrementCurrentStep } from "@root/quizes/actions";
|
|
|
|
|
import CustomWrapper from "@ui_kit/CustomWrapper";
|
|
|
|
|
import { DescriptionForm } from "./DescriptionForm/DescriptionForm";
|
|
|
|
|
import { ResultListForm } from "./ResultListForm";
|
|
|
|
|
import { SettingForm } from "./SettingForm";
|
2023-12-07 22:56:31 +00:00
|
|
|
|
import { useState } from "react";
|
|
|
|
|
import { WhenCard } from "./cards/WhenCard";
|
|
|
|
|
import { ResultCard } from "./cards/ResultCard";
|
|
|
|
|
import { EmailSettingsCard } from "./cards/EmailSettingsCard";
|
|
|
|
|
import { useCurrentQuiz } from "@root/quizes/hooks"
|
|
|
|
|
|
|
|
|
|
export const ResultSettings = () => {
|
|
|
|
|
const quiz = useCurrentQuiz()
|
2023-12-09 14:52:03 +00:00
|
|
|
|
console.log("опросник ", quiz)
|
2023-12-07 22:56:31 +00:00
|
|
|
|
const [quizExpand, setQuizExpand] = useState(true)
|
|
|
|
|
const [resultContract, setResultContract] = useState(true)
|
2023-04-15 09:10:59 +00:00
|
|
|
|
|
|
|
|
|
return (
|
2023-10-16 14:23:44 +00:00
|
|
|
|
<Box sx={{ maxWidth: "796px" }}>
|
2023-12-07 22:56:31 +00:00
|
|
|
|
<Box sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
margin: "60px 0 40px 0",
|
|
|
|
|
}}>
|
|
|
|
|
<Typography variant="h5">
|
2023-04-15 09:10:59 +00:00
|
|
|
|
Настройки результатов
|
|
|
|
|
</Typography>
|
|
|
|
|
<Info />
|
|
|
|
|
<Button
|
|
|
|
|
disableRipple
|
|
|
|
|
sx={{
|
|
|
|
|
ml: "auto",
|
|
|
|
|
width: "73px",
|
|
|
|
|
height: "19px",
|
|
|
|
|
color: "#7E2AEA",
|
|
|
|
|
textDecoration: "underline",
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
"&:hover": {
|
|
|
|
|
background: "none",
|
|
|
|
|
textDecoration: "underline",
|
|
|
|
|
},
|
|
|
|
|
}}
|
|
|
|
|
variant="text"
|
2023-12-07 22:56:31 +00:00
|
|
|
|
onClick={() => setQuizExpand(!quizExpand)}
|
2023-04-15 09:10:59 +00:00
|
|
|
|
>
|
|
|
|
|
Свернуть
|
|
|
|
|
</Button>
|
|
|
|
|
</Box>
|
2023-12-07 22:56:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<WhenCard quizExpand={quizExpand} />
|
|
|
|
|
{quiz.config.resultInfo.when === "email" && <EmailSettingsCard quizExpand={quizExpand} />}
|
|
|
|
|
|
|
|
|
|
|
2023-10-16 14:23:44 +00:00
|
|
|
|
<Box
|
|
|
|
|
sx={{ display: "flex", alignItems: "center", mb: "15px", mt: "15px" }}
|
|
|
|
|
>
|
2023-04-15 09:10:59 +00:00
|
|
|
|
<Typography variant="p1" sx={{ color: "#4D4D4D", fontSize: "14px" }}>
|
|
|
|
|
Создайте результат
|
|
|
|
|
</Typography>
|
|
|
|
|
<Button
|
|
|
|
|
disableRipple
|
|
|
|
|
sx={{
|
|
|
|
|
ml: "auto",
|
|
|
|
|
height: "19px",
|
|
|
|
|
color: "#7E2AEA",
|
|
|
|
|
textDecoration: "underline",
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
|
|
|
|
|
"&:hover": {
|
|
|
|
|
background: "none",
|
|
|
|
|
textDecoration: "underline",
|
|
|
|
|
},
|
|
|
|
|
}}
|
|
|
|
|
variant="text"
|
2023-12-07 22:56:31 +00:00
|
|
|
|
onClick={() => setResultContract(!resultContract)}
|
2023-04-15 09:10:59 +00:00
|
|
|
|
>
|
|
|
|
|
Развернуть все
|
|
|
|
|
</Button>
|
|
|
|
|
</Box>
|
|
|
|
|
|
2023-12-07 22:56:31 +00:00
|
|
|
|
|
|
|
|
|
<ResultCard resultContract={resultContract} />
|
2023-04-15 09:10:59 +00:00
|
|
|
|
</Box>
|
|
|
|
|
);
|
2023-04-23 08:39:34 +00:00
|
|
|
|
};
|