Skip to content

Commit 9318453

Browse files
authored
Merge pull request #2142 from AkshataKatwal16/manager-dashboard
Issue feat: new manager dashboard ui changes
2 parents 003c4c2 + f85cce8 commit 9318453

File tree

2 files changed

+28
-13
lines changed

2 files changed

+28
-13
lines changed

mfes/youthNet/src/components/ManagerDashboard/CourseCompletion.tsx

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
6767
const outerRadius = isMobile ? 55 : 68;
6868

6969
return (
70-
<Box sx={{ flex: 1, display: 'flex', flexDirection: 'column' }}>
71-
<Typography variant="body2" fontWeight={500} color="text.secondary" gutterBottom sx={{ mb: { xs: 1, sm: 2 }, fontSize: { xs: '0.875rem', sm: '0.875rem' } }}>
70+
<Box sx={{ flex: 1, display: 'flex', flexDirection: 'column', minWidth: 0, maxWidth: '100%' }}>
71+
<Typography variant="body2" fontWeight={500} color="text.secondary" gutterBottom sx={{ mb: { xs: 1, sm: 2 }, fontSize: { xs: '0.875rem', sm: '0.875rem' }, flexShrink: 0 }}>
7272
{title}
7373
</Typography>
74-
<Box sx={{ display: 'flex', flexDirection: { xs: 'column', sm: 'row', lg: 'row' }, alignItems: 'center', gap: { xs: 1.5, sm: 2, lg: 1.5 } }}>
75-
<Box sx={{ position: 'relative', height: { xs: 120, sm: 150, lg: 130, xl: 150 }, width: { xs: 120, sm: 150, lg: 130, xl: 150 }, flexShrink: 0 }}>
74+
<Box sx={{ display: 'flex', flexDirection: { xs: 'column', sm: 'row', lg: 'row' }, alignItems: 'center', gap: { xs: 1.5, sm: 2, lg: 1.5 }, width: '100%', minWidth: 0, flex: 1 }}>
75+
<Box sx={{ position: 'relative', height: { xs: 120, sm: 150, lg: 130, xl: 140 }, width: { xs: 120, sm: 150, lg: 130, xl: 140 }, flexShrink: 0 }}>
7676
<ResponsiveContainer width="100%" height="100%">
7777
<PieChart>
7878
<Pie
@@ -118,14 +118,14 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
118118
</Typography> */}
119119
</Box>
120120
</Box>
121-
<Stack spacing={1} sx={{ flex: 1 }}>
121+
<Stack spacing={1} sx={{ flex: 1, minWidth: 0 }}>
122122
{data.map((item, index) => (
123123
<Stack
124124
key={index}
125125
direction="row"
126126
alignItems="center"
127127
spacing={1}
128-
// sx={{ cursor: 'pointer' }}
128+
sx={{ minWidth: 0 }}
129129
>
130130
<Box
131131
sx={{
@@ -139,10 +139,10 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
139139
<Typography
140140
variant="body2"
141141
sx={{
142-
// textDecoration: 'underline',
143142
color: theme.palette.primary.main,
144143
fontSize: { xs: '12px', sm: '13px', lg: '12px', xl: '13px' },
145-
// cursor: 'none',
144+
minWidth: 0,
145+
wordBreak: 'break-word'
146146
}}
147147
>
148148
{item.name} : {item.value}
@@ -155,11 +155,26 @@ const CourseCompletion: React.FC<CourseCompletionProps> = ({
155155
);
156156
};
157157
return (
158-
<Paper elevation={0} sx={{ p: { xs: 1.5, sm: 2 }, border: '1px solid #E0E0E0', borderRadius: 2 }}>
159-
<Typography variant="subtitle1" fontWeight={600} gutterBottom sx={{ fontSize: { xs: '1rem', sm: '1.125rem' } }}>
158+
<Paper elevation={0} sx={{ p: { xs: 1.5, sm: 2 }, border: '1px solid #E0E0E0', borderRadius: 2, height: '100%', display: 'flex', flexDirection: 'column', overflowX: 'hidden', overflowY: 'visible' }}>
159+
<Typography variant="subtitle1" fontWeight={600} gutterBottom sx={{ fontSize: { xs: '1rem', sm: '1.125rem' }, flexShrink: 0 }}>
160160
Course Completion
161161
</Typography>
162-
<Stack direction={{ xs: 'column', sm: 'column', lg: 'row', xl: 'row' }} spacing={{ xs: 2, sm: 2, lg: 2.5, xl: 3 }} sx={{ mt: 2 }}>
162+
<Stack
163+
direction={{ xs: 'column', sm: 'column', lg: 'row', xl: 'row' }}
164+
spacing={{ xs: 2, sm: 2, lg: 2, xl: 2.5 }}
165+
sx={{
166+
mt: 2,
167+
flex: 1,
168+
minHeight: 0,
169+
width: '100%',
170+
alignItems: { xs: 'stretch', sm: 'stretch', lg: 'flex-start', xl: 'flex-start' },
171+
'& > *': {
172+
flex: { lg: '1 1 auto', xl: '1 1 auto' },
173+
minWidth: 0,
174+
maxWidth: { lg: 'calc(50% - 4px)', xl: 'calc(50% - 5px)' }
175+
}
176+
}}
177+
>
163178
{renderDonutChart(prepareMandatoryData(), 'Mandatory Courses')}
164179
{renderDonutChart(prepareNonMandatoryData(), 'Non Mandatory Courses')}
165180
</Stack>

mfes/youthNet/src/components/ManagerDashboard/IndividualProgress.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ console.log('filteredData', filteredData);
388388
>
389389
{employee.name}
390390
</Typography>
391-
<Typography
391+
{/* <Typography
392392
variant="caption"
393393
color="text.secondary"
394394
sx={{
@@ -399,7 +399,7 @@ console.log('filteredData', filteredData);
399399
}}
400400
>
401401
{employee.role}
402-
</Typography>
402+
</Typography> */}
403403
</Box>
404404
</Stack>
405405
</TableCell>

0 commit comments

Comments
 (0)