|
|
@@ -23,26 +23,15 @@ const QuestionItemDescription = (props) => (
|
|
|
<div key={key}>
|
|
|
<div>{item.question_info.question}</div>
|
|
|
<div className="d-flex justify-content-between">
|
|
|
- <p>
|
|
|
- { item.question_info.answer_index === 1 && <HiBadgeCheck size="1.5em" color="green" /> }
|
|
|
- گزینه 1) {item.question_info.ans1}
|
|
|
- { item.chosen_index === 1 && <FaCheck /> }
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- { item.question_info.answer_index === 2 && <HiBadgeCheck size="1.5em" color="green" /> }
|
|
|
- گزینه 2) {item.question_info.ans2}
|
|
|
- { item.chosen_index === 2 && <FaCheck /> }
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- { item.question_info.answer_index === 3 && <HiBadgeCheck size="1.5em" color="green" /> }
|
|
|
- گزینه 3) {item.question_info.ans3}
|
|
|
- { item.chosen_index === 3 && <FaCheck /> }
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- { item.question_info.answer_index === 4 && <HiBadgeCheck size="1.5em" color="green" /> }
|
|
|
- گزینه 4) {item.question_info.ans4}
|
|
|
- { item.chosen_index === 4 && <FaCheck /> }
|
|
|
- </p>
|
|
|
+ {
|
|
|
+ item.question_info.data.cases.map( (answer, index) => (
|
|
|
+ <p>
|
|
|
+ { item.question_info.answer_index === index && <HiBadgeCheck size="1.5em" color="green" /> }
|
|
|
+ گزینه {index+1}) {answer.value}
|
|
|
+ { item.chosen_index === index && <FaCheck /> }
|
|
|
+ </p>
|
|
|
+ ))
|
|
|
+ }
|
|
|
</div>
|
|
|
</div>
|
|
|
))}
|