Skip to content

Commit

Permalink
Merge pull request #406 from Rushikesh-Sonawane99/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-2586 bug: Resolved Pie chart need be hide when there no data in the cohort issue
  • Loading branch information
itsvick authored Nov 22, 2024
2 parents 59244e1 + 25c2713 commit 37b32b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/board-enrollment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ const BoardEnrollment = () => {
console.log('centerDetails', formattedMembers);
// setDisplayStudentList(formattedMembers);
setTotalLearners(formattedMembers.length);
if (formattedMembers.length === 0){
setDisplayStudentList([])
}

if (formattedMembers.length > 0) {
const formData = await fetchFormData();
Expand Down Expand Up @@ -544,7 +547,7 @@ const BoardEnrollment = () => {
</Grid>
</Box>

<PieChartGraph stagesCount={stagesCount} />
{totalLearners !== 0 ? <PieChartGraph stagesCount={stagesCount} /> : null}

<Box
color={theme.colorSchemes.dark.palette.warning.A400}
Expand All @@ -556,6 +559,7 @@ const BoardEnrollment = () => {
{t('BOARD_ENROLMENT.TOTAL_LEARNERS')}: {totalLearners}
</Box>
<Grid container sx={{ my: 4, px: '16px' }} spacing={2}>

{displayStudentList.length >= 1 ? (
<>
{displayStudentList?.map((item: any, index: any) => {
Expand Down

0 comments on commit 37b32b9

Please sign in to comment.