diff --git a/src/assets/images/decorationBg.png b/src/assets/images/decorationBg.png index 4a12fdd8..44373c05 100644 Binary files a/src/assets/images/decorationBg.png and b/src/assets/images/decorationBg.png differ diff --git a/src/components/PlannedSession.tsx b/src/components/PlannedSession.tsx index 6b488353..1aec6cb4 100644 --- a/src/components/PlannedSession.tsx +++ b/src/components/PlannedSession.tsx @@ -20,8 +20,6 @@ import dayjs, { Dayjs } from 'dayjs'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import AddIcon from '@mui/icons-material/Add'; -import CenterSessionModal from './CenterSessionModal'; -import DeleteCenterModal from './center/DeleteCenterModal'; import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline'; import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; import { MobileDatePicker } from '@mui/x-date-pickers/MobileDatePicker'; @@ -35,10 +33,6 @@ type mode = (typeof sessionMode)[keyof typeof sessionMode]; const PlannedSession = () => { const [mode, setMode] = useState(sessionMode.OFFLINE); - const [open, setOpen] = React.useState(false); - - const handleClose = () => setOpen(false); - const handleOpen = () => setOpen(true); const handleSessionModeChange = (event: ChangeEvent) => { setMode(event.target.value as mode); @@ -248,7 +242,6 @@ const PlannedSession = () => { color: theme?.palette?.secondary.main, fontWeight: '500', }} - onClick={handleOpen} > {t('CENTER_SESSION.REMOVE_THIS_SESSION')} @@ -257,20 +250,6 @@ const PlannedSession = () => { /> - - - - diff --git a/src/components/SessionCard.tsx b/src/components/SessionCard.tsx index fac18d37..5f3e25a0 100644 --- a/src/components/SessionCard.tsx +++ b/src/components/SessionCard.tsx @@ -1,12 +1,17 @@ import { Box, Typography } from '@mui/material'; import { Session, SessionsCardProps } from '@/utils/Interfaces'; +import CenterSessionModal from './CenterSessionModal'; import EditOutlined from '@mui/icons-material/EditOutlined'; +import PlannedSession from './PlannedSession'; import React from 'react'; import { useTheme } from '@mui/material/styles'; const SessionsCard: React.FC = ({ data, children }) => { const theme = useTheme(); + const [open, setOpen] = React.useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); return ( = ({ data, children }) => { {data?.teacherName} - + + + + + {children} ); diff --git a/src/components/SessionCardFooter.tsx b/src/components/SessionCardFooter.tsx index cbe6bbe1..c3ed65a6 100644 --- a/src/components/SessionCardFooter.tsx +++ b/src/components/SessionCardFooter.tsx @@ -17,7 +17,7 @@ import { useTheme } from '@mui/material/styles'; import { useTranslation } from 'react-i18next'; const SessionCardFooter: React.FC = ({ item }) => { - const theme = useTheme(); + const theme = useTheme(); const { t } = useTranslation(); const [open, setOpen] = React.useState(false); const handleOpen = () => setOpen(true); @@ -29,7 +29,7 @@ const SessionCardFooter: React.FC = ({ item }) => { @@ -42,11 +42,21 @@ const SessionCardFooter: React.FC = ({ item }) => { }} > } + expandIcon={ + + } aria-controls="panel1-content" id="panel1-header" className="accordion-summary" - sx={{ px: 0, m: 0 }} + sx={{ + px: 0, + m: 0, + '&.Mui-expanded': { + minHeight: '35px', + }, + }} > {t('COMMON.TO_BE_TAUGHT')} @@ -57,7 +67,9 @@ const SessionCardFooter: React.FC = ({ item }) => { onClick={handleOpen} sx={{ display: 'flex', gap: '10px', cursor: 'pointer' }} > - + {item?.topic} @@ -72,7 +84,14 @@ const SessionCardFooter: React.FC = ({ item }) => { }} onClick={handleOpen} > - + {item?.subtopic} @@ -89,11 +108,14 @@ const SessionCardFooter: React.FC = ({ item }) => { padding: '8px 16px', borderRadius: '8px', cursor: 'pointer', + alignItems: 'center', }} onClick={handleOpen} > - + = ({ item }) => { {t('COMMON.SELECT_TOPIC')} - + )} { - - - } - aria-controls="panel1-content" - id="panel1-header" - className="accordion-summary" + + - + } + aria-controls="panel1-content" + id="panel1-header" + className="accordion-summary" + sx={{ + m: 0, + background: theme?.palette?.action?.selected, + px: '16px', + height: '10px !important', + '&.Mui-expanded': { + minHeight: '48px', + }, + }} > - {t('CENTER_SESSION.FACILITATORS')} - - - - - - - - {t('CENTER_SESSION.TITLE')} - - - Video {/* will came from API */} - - - - - - - {t('CENTER_SESSION.TITLE')} + + {t('CENTER_SESSION.FACILITATORS')} + + + + + + + + {t('CENTER_SESSION.TITLE')} + + + Video {/* will came from API */} + - - Game {/* will came from API */} + + + + + {t('CENTER_SESSION.TITLE')} + + + Game {/* will came from API */} + - + - - - + + + ); };