diff --git a/src/components/AssessmentReportCard.tsx b/src/components/AssessmentReportCard.tsx index f160dc80..5c5cea7b 100644 --- a/src/components/AssessmentReportCard.tsx +++ b/src/components/AssessmentReportCard.tsx @@ -95,7 +95,7 @@ const AssessmentReportCard: React.FC = ({ }; return ( - + = ({ localStorage.setItem('cohortId', cohort_id); }; + const teacher: string | null = + typeof window !== 'undefined' && window.localStorage + ? localStorage.getItem('role') + : null; + const isAttendanceOverview = pathname === '/attendance-overview'; - const teacher = localStorage.getItem('role'); const isAssessment = pathname === '/assessments'; const dashboard = pathname === '/dashboard'; diff --git a/src/pages/assessments/user/[userId]/index.tsx b/src/pages/assessments/user/[userId]/index.tsx index acc1f531..64e7ebba 100644 --- a/src/pages/assessments/user/[userId]/index.tsx +++ b/src/pages/assessments/user/[userId]/index.tsx @@ -30,7 +30,11 @@ import { useParams, useSearchParams } from 'next/navigation'; import { useRouter } from 'next/router'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { accessControl, AssessmentType, Program } from '../../../../../app.config'; +import { + accessControl, + AssessmentType, + Program, +} from '../../../../../app.config'; import { useQueryClient } from '@tanstack/react-query'; import withAccessControl from '@/utils/hoc/withAccessControl'; import NoDataFound from '@/components/common/NoDataFound'; @@ -377,7 +381,14 @@ function AssessmentsDetails() { > {subject?.map((assessment: any) => ( - + {assessment?.subject} @@ -448,9 +460,7 @@ function AssessmentsDetails() { )} - {!isLoading && !assessmentList?.length && ( - - )} + {!isLoading && !assessmentList?.length && } {isLoading && ( { {boardEnrollmentList.map((item: any, index: any) => { return ( - + { item.isDropout @@ -300,6 +295,7 @@ const BoardEnrollment = () => { gap: '5px', mb: '12px', mx: '16px', + mt: 4, }} > {t('COMMON.DROPPED_OUT')}{' '} diff --git a/src/pages/course-planner.tsx b/src/pages/course-planner.tsx index a20254bc..f839ca00 100644 --- a/src/pages/course-planner.tsx +++ b/src/pages/course-planner.tsx @@ -131,7 +131,6 @@ const CoursePlanner = () => { useEffect(() => { const fetchCohortSearchResults = async () => { - setLoading(true); setState(''); setBoard(''); @@ -174,8 +173,6 @@ const CoursePlanner = () => { // } // }); - - stringFields.forEach(({ label, setter }) => { const field = cohortDetails.customFields.find( (field: any) => field.label === label @@ -187,8 +184,6 @@ const CoursePlanner = () => { }); } - - setLoading(false); } catch (error) { console.error('Failed to fetch cohort search results:', error); @@ -198,7 +193,6 @@ const CoursePlanner = () => { fetchCohortSearchResults(); }, [selectedValue]); - useEffect(() => { const fetchTaxonomyResults = async () => { try { @@ -477,7 +471,7 @@ const CoursePlanner = () => { const overallCommonSubjects = await findOverallCommonSubjects(arrays); - + localStorage.setItem( 'overallCommonSubjects', JSON.stringify(overallCommonSubjects) @@ -597,29 +591,33 @@ const CoursePlanner = () => { - - - Course Type - - - - - + + + Course Type + + + + @@ -632,55 +630,54 @@ const CoursePlanner = () => { marginBottom: '20px', }} > - - {anyFieldsEmpty ? ( - - - {`No assigned ${emptyFields.join(', ')}`} - - - ) : ( - subjects?.length > 0 ? ( - subjects.map((item:any) => ( - - { - setTaxonomySubject(item.name); - router.push({ - pathname: '/course-planner-detail', - }); - }} - > - - + + {anyFieldsEmpty ? ( + + + {`No assigned ${emptyFields.join(', ')}`} + + + ) : subjects?.length > 0 ? ( + subjects.map((item: any) => ( + { + setTaxonomySubject(item.name); + router.push({ + pathname: '/course-planner-detail', + }); }} > - {/* + + + + {/* { */} - - {item.name} + + {item.name} + + + + + + - - - - + + )) + ) : ( + + + {t('ASSESSMENTS.NO_SUBJECT_FOUND')} + - + )} - )) - ) : ( - - - {t('ASSESSMENTS.NO_SUBJECT_FOUND')} - - - ) - )} - diff --git a/src/pages/user-profile/[userId].tsx b/src/pages/user-profile/[userId].tsx index 1c3b8b57..e1b7a9dc 100644 --- a/src/pages/user-profile/[userId].tsx +++ b/src/pages/user-profile/[userId].tsx @@ -443,7 +443,6 @@ const TeacherProfile: React.FC = ({ > {userRole === Role.TEAM_LEADER && userId !== selfUserId ? (