Pull Request branch dev-clone to main #1
|
|
@ -200,7 +200,7 @@ const formattedResult = answersData?.data.reduce((acc, item) => {
|
||||||
// Effect untuk mengatur answers dari data yang diambil
|
// Effect untuk mengatur answers dari data yang diambil
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!assessmentId) {
|
if (!assessmentId) {
|
||||||
console.error("Assessment ID tidak ditemukan");
|
console.error();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -762,8 +762,8 @@ console.log("unanswered questions:", unanswered.length);
|
||||||
{question.options?.length > 0 ? (
|
{question.options?.length > 0 ? (
|
||||||
<div className="mx-11">
|
<div className="mx-11">
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
value={answers[question.questionId] || ""}
|
value={answers[questionId] || ""}
|
||||||
onValueChange={(value) => handleAnswerChange(question.questionId, value)}
|
onValueChange={(value) => handleAnswerChange(questionId, value)}
|
||||||
className="flex flex-col gap-2"
|
className="flex flex-col gap-2"
|
||||||
>
|
>
|
||||||
{question.options.map((option: any) => (
|
{question.options.map((option: any) => (
|
||||||
|
|
@ -773,12 +773,12 @@ console.log("unanswered questions:", unanswered.length);
|
||||||
? "bg-[--primary-color] text-white border-[--primary-color]"
|
? "bg-[--primary-color] text-white border-[--primary-color]"
|
||||||
: "bg-gray-200 text-black border-gray-200"
|
: "bg-gray-200 text-black border-gray-200"
|
||||||
}`}
|
}`}
|
||||||
onClick={() => handleAnswerChange(question.questionId, option.optionId)}
|
onClick={() => handleAnswerChange(questionId, option.optionId)}
|
||||||
>
|
>
|
||||||
<RadioGroupItem
|
<RadioGroupItem
|
||||||
value={option.optionId}
|
value={option.optionId}
|
||||||
id={option.optionId}
|
id={option.optionId}
|
||||||
checked={answers[question.questionId] === option.optionId}
|
checked={answers[questionId] === option.optionId}
|
||||||
className="bg-white checked:bg-white checked:border-[--primary-color] pointer-events-none rounded-full"
|
className="bg-white checked:bg-white checked:border-[--primary-color] pointer-events-none rounded-full"
|
||||||
/>
|
/>
|
||||||
<Label
|
<Label
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user