Skip to content

Commit

Permalink
Merge pull request #297 from shreyas1434shinde/boardEnrollment
Browse files Browse the repository at this point in the history
Task #PS-1656 : UI improvements
  • Loading branch information
itsvick authored Sep 25, 2024
2 parents ee350af + ad140bd commit 36df5ad
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
10 changes: 7 additions & 3 deletions src/components/CohortSelectionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ const CohortSelectionSection: React.FC<CohortSelectionSectionProps> = ({
width: '100%',
marginBottom: '0rem',
'@media (max-width: 700px)': {
width: '50%',
width: isAttendanceOverview ? '100%' : '50%',
},
}}
MenuProps={{
Expand Down Expand Up @@ -486,10 +486,14 @@ const CohortSelectionSection: React.FC<CohortSelectionSectionProps> = ({
marginBottom: '0rem',
marginRight: '10px',
'@media (max-width: 902px)': {
width: '60%',
width: isAttendanceOverview
? '100%'
: '60%',
},
'@media (max-width: 702px)': {
width: '50%',
width: isAttendanceOverview
? '100%'
: '50%',
},
}
}
Expand Down
16 changes: 13 additions & 3 deletions src/components/SessionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ const SessionsCard: React.FC<SessionsCardProps> = ({
sx={{
border: `1px solid ${theme.palette.warning['A100']}`,
borderRadius: '8px',
// marginBottom: '38px',
}}
>
<Box
Expand Down Expand Up @@ -192,7 +191,11 @@ const SessionsCard: React.FC<SessionsCardProps> = ({
textAlign={'left'}
fontSize={'14px'}
display={'flex'}
alignItems={'center'}
sx={{
display: 'flex',
alignItems: 'center',
marginTop: '4px',
}}
gap={'4px'}
className="one-line-text"
>
Expand All @@ -203,7 +206,12 @@ const SessionsCard: React.FC<SessionsCardProps> = ({
)}
{startTime} - {endTime}
</Typography>
<Typography fontWeight={'400'} textAlign={'left'} fontSize={'14px'}>
<Typography
className="one-line-text"
fontWeight={'400'}
textAlign={'left'}
fontSize={'14px'}
>
{showCenterName ? data?.location : data?.metadata?.teacherName}
</Typography>
</Box>
Expand All @@ -220,6 +228,8 @@ const SessionsCard: React.FC<SessionsCardProps> = ({
display: 'flex',
justifyContent: 'space-between',
gap: '30px',
minHeight: '50px',
width: '100%',
}}
onClick={handleCopyUrl}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/centers/[cohortId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ const CohortPage = () => {
className="mySwiper"
>
{sortedSessions?.map((item: any, index: any) => (
<SwiperSlide key={index}>
<SwiperSlide style={{ paddingBottom: '38px' }} key={index}>
<SessionCard
data={item}
isEventDeleted={handleEventDeleted}
Expand Down
9 changes: 6 additions & 3 deletions src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
<Box mt={2} px="18px">
<Grid container spacing={2}>
{sessions?.map((item) => (
<Grid xs={12} sm={6} md={6} key={item.id} item>
<Grid xs={12} sm={6} md={4} key={item.id} item>
<SessionCard
data={item}
showCenterName={true}
Expand Down Expand Up @@ -1386,7 +1386,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
<Box sx={{ mt: 1.5, mb: 2 }}>
<Grid container spacing={2}>
{extraSessions?.map((item) => (
<Grid xs={12} sm={6} md={6} key={item.id} item>
<Grid xs={12} sm={6} md={4} key={item.id} item>
<SessionCard
data={item}
showCenterName={true}
Expand All @@ -1413,7 +1413,10 @@ const Dashboard: React.FC<DashboardProps> = () => {
{extraSessions && extraSessions?.length === 0 && (
<Box
className="fs-12 fw-400 italic"
sx={{ color: theme.palette.warning['300'] }}
sx={{
color: theme.palette.warning['300'],
marginBottom: '12px',
}}
>
{t('COMMON.NO_SESSIONS_SCHEDULED')}
</Box>
Expand Down

0 comments on commit 36df5ad

Please sign in to comment.