result __из__

This commit is contained in:
Nastya 2024-10-23 22:15:05 +03:00
parent 0dfa011cb1
commit aab37f2a1d

@ -27,8 +27,10 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
const theme = useTheme(); const theme = useTheme();
const isMobile = useRootContainerSize() < 650; const isMobile = useRootContainerSize() < 650;
const isTablet = useRootContainerSize() < 1000; const isTablet = useRootContainerSize() < 1000;
const { settings, show_badge, quizId, preview } = useQuizSettings(); const { settings, show_badge, quizId, questions, preview } = useQuizSettings();
const setCurrentQuizStep = useQuizViewStore((state) => state.setCurrentQuizStep); const setCurrentQuizStep = useQuizViewStore((state) => state.setCurrentQuizStep);
//Список засчитанных баллов для балловых квизов
const pointsSum = useQuizViewStore((state) => state.pointsSum);
const spec = settings.cfg.spec; const spec = settings.cfg.spec;
const vkMetrics = useVkMetricsGoals(settings.cfg.vkMetricsNumber); const vkMetrics = useVkMetricsGoals(settings.cfg.vkMetricsNumber);
const yandexMetrics = useYandexMetricsGoals(settings.cfg.yandexMetricsNumber); const yandexMetrics = useYandexMetricsGoals(settings.cfg.yandexMetricsNumber);
@ -209,32 +211,55 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
{resultQuestion.content.text} {resultQuestion.content.text}
</Typography> </Typography>
)} )}
<TextAccordion {settings.cfg?.score && (
headerText={ <>
<Typography <Typography
sx={{ sx={{
color: theme.palette.primary.main, color: theme.palette.primary.main,
"&:hover": { fontSize: "30px",
color: theme.palette.primary.dark, m: "30px 0",
}, fontWeight: 600,
}} }}
> >
Посмотреть ответы Ваши баллы
</Typography> </Typography>
} <Typography
sx={{ sx={{
mt: "60px", color: theme.palette.primary.main,
width: "100%", fontSize: "30px",
}} fontWeight: 600,
> }}
<Box >
sx={{ {pointsSum} из {questions.filter((e) => e.type != "result").length}
mt: "25px", </Typography>
}} <TextAccordion
> headerText={
<PointSystemResultList /> <Typography
</Box> sx={{
</TextAccordion> color: theme.palette.primary.main,
"&:hover": {
color: theme.palette.primary.dark,
},
}}
>
Посмотреть ответы
</Typography>
}
sx={{
mt: "60px",
width: "100%",
}}
>
<Box
sx={{
mt: "25px",
}}
>
<PointSystemResultList />
</Box>
</TextAccordion>
</>
)}
</Box> </Box>
</Box> </Box>
{show_badge && ( {show_badge && (