Pull Request branch dev-clone to main #1

Merged
gitea merged 429 commits from dev-clone into main 2024-12-23 09:31:34 +00:00
Showing only changes of commit 0cad4e7ce9 - Show all commits

View File

@ -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