feat(scorm): show completion in frontend

This commit is contained in:
raizasafeel
2026-03-24 12:58:44 +05:30
parent 847719ab77
commit 99397ad1f4

View File

@@ -75,6 +75,12 @@
/>
</Tooltip>
</div>
<Check
v-if="
chapter.is_scorm_package && isScormChapterComplete(chapter)
"
class="h-4 w-4 text-green-700"
/>
</DisclosureButton>
<DisclosurePanel v-if="!chapter.is_scorm_package">
<Draggable
@@ -401,6 +407,10 @@ const redirectToChapter = (chapter) => {
})
}
const isScormChapterComplete = (chapter) => {
return chapter.lessons?.length && chapter.lessons.every((l) => l.is_complete)
}
const isActiveLesson = (lessonNumber) => {
return (
route.params.chapterNumber == lessonNumber.split('-')[0] &&