длинные ответы не помещались в окошке для ответов
This commit is contained in:
parent
b013b254fe
commit
33754ed4a7
@ -116,7 +116,7 @@ export const Footer = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isEmpty = checkEmptyData({ resultData: nextQuestion });
|
const isEmpty = checkEmptyData({ resultData: nextQuestion });
|
||||||
console.log("isEmpty", isEmpty)
|
console.log("isEmpty", isEmpty);
|
||||||
if (nextQuestion) {
|
if (nextQuestion) {
|
||||||
if (nextQuestion && quiz?.config.resultInfo.when === "before") {
|
if (nextQuestion && quiz?.config.resultInfo.when === "before") {
|
||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
|
|||||||
@ -126,7 +126,9 @@ export const Emoji = ({ currentQuestion }: EmojiProps) => {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<Box sx={{ display: "flex", gap: "10px" }}>
|
<Box sx={{ display: "flex", gap: "10px" }}>
|
||||||
<Typography>{variant.answer}</Typography>
|
<Typography sx={{ wordBreak: "break-word" }}>
|
||||||
|
{variant.answer}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -81,10 +81,19 @@ export const File = ({ currentQuestion }: FileProps) => {
|
|||||||
color: "#FFFFFF",
|
color: "#FFFFFF",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
overflow: "hidden",
|
||||||
gap: "15px",
|
gap: "15px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography>{answer?.split("|")[0]}</Typography>
|
<Typography
|
||||||
|
sx={{
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{answer?.split("|")[0]}
|
||||||
|
</Typography>
|
||||||
<IconButton
|
<IconButton
|
||||||
sx={{ p: 0 }}
|
sx={{ p: 0 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@ -102,10 +102,14 @@ export const Images = ({ currentQuestion }: ImagesProps) => {
|
|||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
key={variant.id}
|
key={variant.id}
|
||||||
sx={{
|
sx={{
|
||||||
display: "block",
|
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
marginTop: "10px",
|
marginTop: "10px",
|
||||||
|
marginLeft: 0,
|
||||||
|
padding: "10px",
|
||||||
|
"& .MuiFormControlLabel-label": {
|
||||||
|
wordBreak: "break-word",
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
value={index}
|
value={index}
|
||||||
control={
|
control={
|
||||||
|
|||||||
@ -117,11 +117,17 @@ export const Variant = ({ currentQuestion }: VariantProps) => {
|
|||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Group>
|
</Group>
|
||||||
{currentQuestion.content.back && currentQuestion.content.back !== " " && (
|
{currentQuestion.content.back &&
|
||||||
|
currentQuestion.content.back !== " " && (
|
||||||
<Box sx={{ maxWidth: "400px", width: "100%", height: "300px" }}>
|
<Box sx={{ maxWidth: "400px", width: "100%", height: "300px" }}>
|
||||||
<img
|
<img
|
||||||
src={currentQuestion.content.back}
|
src={currentQuestion.content.back}
|
||||||
style={{ width: "100%", height: "100%", objectFit: "cover", margin: "10px" }}
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
objectFit: "cover",
|
||||||
|
margin: "10px",
|
||||||
|
}}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
@ -163,6 +169,9 @@ const VariantItem = ({
|
|||||||
"&.MuiFormControl-root": {
|
"&.MuiFormControl-root": {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
},
|
},
|
||||||
|
"& .MuiFormControlLabel-label": {
|
||||||
|
wordBreak: "break-word",
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
value={index}
|
value={index}
|
||||||
labelPlacement="start"
|
labelPlacement="start"
|
||||||
|
|||||||
@ -89,6 +89,9 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => {
|
|||||||
: "#9A9AAF",
|
: "#9A9AAF",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
margin: isMobile ? 0 : undefined,
|
margin: isMobile ? 0 : undefined,
|
||||||
|
"& .MuiFormControlLabel-label": {
|
||||||
|
wordBreak: "break-word",
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
value={index}
|
value={index}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
@ -138,7 +141,10 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => {
|
|||||||
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
) : (currentQuestion.content.replText !== " " && currentQuestion.content.replText.length > 0) ? currentQuestion.content.replText : variant?.extendedText || isMobile ? (
|
) : currentQuestion.content.replText !== " " &&
|
||||||
|
currentQuestion.content.replText.length > 0 ? (
|
||||||
|
currentQuestion.content.replText
|
||||||
|
) : variant?.extendedText || isMobile ? (
|
||||||
"Выберите вариант ответа ниже"
|
"Выберите вариант ответа ниже"
|
||||||
) : (
|
) : (
|
||||||
"Выберите вариант ответа слева"
|
"Выберите вариант ответа слева"
|
||||||
|
|||||||
@ -76,13 +76,22 @@ export default function MyQuizzesFull({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{quizes.map((quiz) => {
|
{quizes.map((quiz) => {
|
||||||
return <QuizCard
|
return (
|
||||||
|
<QuizCard
|
||||||
key={quiz.id}
|
key={quiz.id}
|
||||||
quiz={quiz}
|
quiz={quiz}
|
||||||
openCount={quiz.sessions_count}
|
openCount={quiz.sessions_count}
|
||||||
applicationCount={quiz.passed_count}
|
applicationCount={quiz.passed_count}
|
||||||
conversionPercent={quiz.sessions_count ? (quiz.passed_count/quiz.sessions_count * 100).toFixed(1) : 0}
|
conversionPercent={
|
||||||
|
quiz.sessions_count
|
||||||
|
? (
|
||||||
|
(quiz.passed_count / quiz.sessions_count) *
|
||||||
|
100
|
||||||
|
).toFixed(1)
|
||||||
|
: 0
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ export default function EditPage({
|
|||||||
const isConditionMet =
|
const isConditionMet =
|
||||||
[1].includes(currentStep) && quizConfig.type !== "form";
|
[1].includes(currentStep) && quizConfig.type !== "form";
|
||||||
|
|
||||||
console.log(quiz)
|
console.log(quiz);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
@ -219,7 +219,7 @@ export const MediaSelectionAndDisplay: FC<Iprops> = ({ resultData }) => {
|
|||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
{resultData.content.video ? (
|
{resultData.content.video ? (
|
||||||
<video src={resultData.content.video} width="400" controls />
|
<video src={resultData.content.video} width="300" controls />
|
||||||
) : null}
|
) : null}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -58,7 +58,6 @@ export default function Emoji({ question }: Props) {
|
|||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
maxWidth: "317px",
|
maxWidth: "317px",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "255px",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
@ -110,7 +109,9 @@ export default function Emoji({ question }: Props) {
|
|||||||
sx={{ display: "flex", alignItems: "center", gap: 2 }}
|
sx={{ display: "flex", alignItems: "center", gap: 2 }}
|
||||||
data-cy="variant-answer"
|
data-cy="variant-answer"
|
||||||
>
|
>
|
||||||
<Typography>{`${variant.answer}`}</Typography>
|
<Typography
|
||||||
|
sx={{ wordBreak: "break-word" }}
|
||||||
|
>{`${variant.answer}`}</Typography>
|
||||||
{variant.hints && (
|
{variant.hints && (
|
||||||
<Tooltip title="Подсказка" placement="right">
|
<Tooltip title="Подсказка" placement="right">
|
||||||
<Box>
|
<Box>
|
||||||
|
|||||||
@ -104,7 +104,9 @@ export default function Images({ question, widthPreview }: Props) {
|
|||||||
p: 1,
|
p: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography>{variant.answer}</Typography>
|
<Typography sx={{ wordBreak: "break-word" }}>
|
||||||
|
{variant.answer}
|
||||||
|
</Typography>
|
||||||
{variant.hints && (
|
{variant.hints && (
|
||||||
<Tooltip title={variant.hints} placement="right">
|
<Tooltip title={variant.hints} placement="right">
|
||||||
<Box>
|
<Box>
|
||||||
|
|||||||
@ -81,6 +81,9 @@ export default function Variant({ question }: Props) {
|
|||||||
: theme.palette.background.default,
|
: theme.palette.background.default,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
margin: 0,
|
margin: 0,
|
||||||
|
// "& .MuiFormControlLabel-label": {
|
||||||
|
// overflow: "hidden",
|
||||||
|
// }
|
||||||
}}
|
}}
|
||||||
control={
|
control={
|
||||||
question.content.multi ? (
|
question.content.multi ? (
|
||||||
@ -107,7 +110,12 @@ export default function Variant({ question }: Props) {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<Box sx={{ display: "flex", alignItems: "center", gap: 2 }}>
|
<Box sx={{ display: "flex", alignItems: "center", gap: 2 }}>
|
||||||
<Typography color={theme.palette.text.primary}>
|
<Typography
|
||||||
|
color={theme.palette.text.primary}
|
||||||
|
sx={{
|
||||||
|
wordBreak: "break-word",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{variant.answer}
|
{variant.answer}
|
||||||
</Typography>
|
</Typography>
|
||||||
{variant.hints && (
|
{variant.hints && (
|
||||||
|
|||||||
@ -122,7 +122,9 @@ export default function Varimg({ question, widthPreview }: Props) {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<Box sx={{ display: "flex", alignItems: "center", gap: 2 }}>
|
<Box sx={{ display: "flex", alignItems: "center", gap: 2 }}>
|
||||||
<Typography>{variant.answer}</Typography>
|
<Typography sx={{ wordBreak: "break-word" }}>
|
||||||
|
{variant.answer}
|
||||||
|
</Typography>
|
||||||
{variant.hints && (
|
{variant.hints && (
|
||||||
<Tooltip title={variant.hints} placement="right">
|
<Tooltip title={variant.hints} placement="right">
|
||||||
<Box>
|
<Box>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user