Merge branch 'fixes' into dev
This commit is contained in:
commit
e5c8dc2976
@ -50,6 +50,7 @@ export interface Quiz {
|
||||
question_cnt: number;
|
||||
/** count passings */
|
||||
passed_count: number;
|
||||
sessions_count: number;
|
||||
/** average time of passing */
|
||||
average_time: number;
|
||||
/** set true if squiz realize group functionality */
|
||||
@ -108,6 +109,7 @@ export interface RawQuiz {
|
||||
question_cnt: number;
|
||||
/** count passings */
|
||||
passed_count: number;
|
||||
sessions_count: number;
|
||||
/** average time of passing */
|
||||
average_time: number;
|
||||
/** set true if squiz realize group functionality */
|
||||
|
||||
@ -116,6 +116,7 @@ export const Footer = ({
|
||||
}
|
||||
|
||||
const isEmpty = checkEmptyData({ resultData: nextQuestion });
|
||||
console.log("isEmpty", isEmpty)
|
||||
if (nextQuestion) {
|
||||
if (nextQuestion && quiz?.config.resultInfo.when === "before") {
|
||||
if (isEmpty) {
|
||||
|
||||
@ -117,11 +117,11 @@ export const Variant = ({ currentQuestion }: VariantProps) => {
|
||||
)}
|
||||
</Box>
|
||||
</Group>
|
||||
{currentQuestion.content.back && (
|
||||
{currentQuestion.content.back && currentQuestion.content.back !== " " && (
|
||||
<Box sx={{ maxWidth: "400px", width: "100%", height: "300px" }}>
|
||||
<img
|
||||
src={currentQuestion.content.back}
|
||||
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
||||
style={{ width: "100%", height: "100%", objectFit: "cover", margin: "10px" }}
|
||||
alt=""
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@ -138,7 +138,7 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => {
|
||||
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
||||
alt=""
|
||||
/>
|
||||
) : variant?.extendedText || isMobile ? (
|
||||
) : (currentQuestion.content.replText !== " " && currentQuestion.content.replText.length > 0) ? currentQuestion.content.replText : variant?.extendedText || isMobile ? (
|
||||
"Выберите вариант ответа ниже"
|
||||
) : (
|
||||
"Выберите вариант ответа слева"
|
||||
|
||||
@ -75,15 +75,15 @@ export default function MyQuizzesFull({
|
||||
mb: "60px",
|
||||
}}
|
||||
>
|
||||
{quizes.map((quiz) => (
|
||||
<QuizCard
|
||||
{quizes.map((quiz) => {
|
||||
return <QuizCard
|
||||
key={quiz.id}
|
||||
quiz={quiz}
|
||||
openCount={0}
|
||||
applicationCount={0}
|
||||
conversionPercent={0}
|
||||
openCount={quiz.sessions_count}
|
||||
applicationCount={quiz.passed_count}
|
||||
conversionPercent={quiz.sessions_count ? (quiz.passed_count/quiz.sessions_count * 100).toFixed(1) : 0}
|
||||
/>
|
||||
))}
|
||||
})}
|
||||
</Box>
|
||||
{children}
|
||||
</SectionWrapper>
|
||||
|
||||
@ -98,8 +98,8 @@ export default function QuizCard({
|
||||
>
|
||||
{quiz.name.length === 0 || quiz.name === " "
|
||||
? quiz.config.type === "form"
|
||||
? "Анкета " + questionCount.current
|
||||
: "Квиз " + questionCount.current
|
||||
? "Form " + quiz.backendId
|
||||
: "Quiz " + quiz.backendId
|
||||
: quiz.name}
|
||||
</Typography>
|
||||
<Box
|
||||
|
||||
@ -107,6 +107,7 @@ export default function EditPage({
|
||||
const isConditionMet =
|
||||
[1].includes(currentStep) && quizConfig.type !== "form";
|
||||
|
||||
console.log(quiz)
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
|
||||
Loading…
Reference in New Issue
Block a user