Skip to content

Commit

Permalink
Merge pull request #105 from shreyas1434shinde/dashboard
Browse files Browse the repository at this point in the history
Task PS-279 style: DashBoard UI fixes
  • Loading branch information
itsvick authored May 10, 2024
2 parents dd3604f + d57cafe commit 025665f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
16 changes: 12 additions & 4 deletions src/components/AttendanceStatusListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ const AttendanceStatusListView: React.FC<AttendanceStatusListViewProps> = ({
};
return (
<Box sx={boxStyling}>
<Typography variant="body1" marginRight="auto" marginY="auto">
<Typography
variant="body1"
marginRight="auto"
marginY="auto"
sx={{ color: theme.palette.warning['300'] }}
>
{isBulkAction ? t('ATTENDANCE.MARK_ALL') : userData?.name}
</Typography>
<Box
display="flex"
flexDirection="column"
alignItems="center"
className="icon_holder"
p={2}
onClick={() =>
handleClickAction(
Expand All @@ -62,9 +68,11 @@ const AttendanceStatusListView: React.FC<AttendanceStatusListViewProps> = ({
{[userData?.attendance, bulkAttendanceStatus].includes(
ATTENDANCE_ENUM.PRESENT
) ? (
<CheckCircleIcon />
<CheckCircleIcon sx={{ color: () => theme.palette.warning[400] }} />
) : (
<CheckCircleOutlineIcon />
<CheckCircleOutlineIcon
sx={{ color: () => theme.palette.warning[400] }}
/>
)}
<Typography
variant="h6"
Expand All @@ -90,7 +98,7 @@ const AttendanceStatusListView: React.FC<AttendanceStatusListViewProps> = ({
{[userData?.attendance, bulkAttendanceStatus].includes(
ATTENDANCE_ENUM.ABSENT
) ? (
<CancelIcon />
<CancelIcon sx={{ color: () => theme.palette.warning[400] }} />
) : (
<HighlightOffIcon />
)}
Expand Down
25 changes: 21 additions & 4 deletions src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
Stack,
Typography,
} from '@mui/material';
import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
import React, { useEffect } from 'react';
import Snackbar, { SnackbarOrigin } from '@mui/material/Snackbar';
import {
Expand Down Expand Up @@ -56,7 +57,7 @@ import { getTeacherAttendanceByDate } from '../services/AttendanceService';
import { useRouter } from 'next/navigation';
import { useTheme } from '@mui/material/styles';
import { useTranslation } from 'react-i18next';
import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';

// import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';

interface State extends SnackbarOrigin {
Expand Down Expand Up @@ -838,19 +839,29 @@ const Dashboard: React.FC<DashboardProps> = () => {
marginBottom={'0px'}
fontWeight={'500'}
fontSize={'16px'}
sx={{ color: theme.palette.warning['A200'] }}
>
{t('COMMON.MARK_STUDENT_ATTENDANCE')}
</Typography>
<Typography
variant="h2"
sx={{ paddingBottom: '10px' }}
sx={{
paddingBottom: '10px',
color: theme.palette.warning['A200'],
fontSize: '14px',
}}
component="h2"
>
{formatDate(currentDate)}
</Typography>
</Box>
<Box onClick={() => handleModalToggle()}>
<CloseIcon sx={{ cursor: 'pointer' }} />
<CloseIcon
sx={{
cursor: 'pointer',
color: theme.palette.warning['A200'],
}}
/>
</Box>
</Box>
<Box sx={{ height: '1px', background: '#D0C5B4' }}></Box>
Expand All @@ -861,7 +872,13 @@ const Dashboard: React.FC<DashboardProps> = () => {
/>
)}

<Typography sx={{ marginTop: '10px', fontSize: '12px' }}>
<Typography
sx={{
marginTop: '10px',
fontSize: '12px',
color: theme.palette.warning['A200'],
}}
>
{t('ATTENDANCE.TOTAL_STUDENTS', {
count: numberOfCohortMembers,
})}
Expand Down
3 changes: 3 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,6 @@ main {
.linerGradient {
background: linear-gradient(180deg, #fffdf7 0%, #f8efda 100%);
}
.icon_holder svg {
color: #1e1b16 !important;
}

0 comments on commit 025665f

Please sign in to comment.