CLASSROOMIO-T-99: Download Lesson PDF

Merge branch 'CLASSROOMIO-T-99' of https://gitlab.com/thenextgreat/classroomio into CLASSROOMIO-T-99

CLASSROOMIO-T-99: Badge Value Fix

CLASSROOMIO-T-99: Minor UI improvements.

CLASSROOMIO-T-99: Frontend Fixes


Co-authored-by: Rotimi Best <[email protected]>
Co-authored-by: Tunji Adeyemi <[email protected]>


Merge-request: CLASSROOMIO-MR-47
Merged-by: Best Admin <[email protected]>
This commit is contained in:
tunny17
2023-08-16 20:42:58 +00:00
committed by Space Cloud
co-authored by Rotimi Best
parent 580abf320f
commit df1b5f6cae
3 changed files with 97 additions and 18 deletions
@@ -17,6 +17,7 @@
import Box from '$lib/components/Box/index.svelte';
import EditContent from '$lib/components/EditContent/index.svelte';
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
import TextField from '$lib/components/Form/TextField.svelte';
import {
lesson,
@@ -75,15 +76,18 @@
const { slide_url, videos, note } = materials;
tabs = tabs.map((tab) => {
let badgeValue;
if (tab.value === 1) {
badgeValue = !!slide_url ? 1 : 0;
} else if (tab.value === 2) {
badgeValue = !!note ? 1 : 0;
} else {
badgeValue = Array.isArray(videos) ? videos.length : 0;
}
const badgeValue =
tab.value === 1
? !!note
? 1
: 0
: tab.value === 2
? !!slide_url
? 1
: 0
: Array.isArray(videos)
? videos.length
: 0;
tab.badgeValue = badgeValue;
return tab;
@@ -173,6 +177,7 @@
}}
isLoading={$isLoading}
isDisabled={$isLoading}
variant={VARIANTS.OUTLINED}
>
<MachineLearningModel size={20} class="carbon-icon mr-3" />
AI Assistant