From cb6fc9c03543536d13ce7d9f2de5e53cde191eab Mon Sep 17 00:00:00 2001 From: TTPL-RT-52 Date: Wed, 24 Jul 2024 13:48:33 +0530 Subject: [PATCH] Issue #PS-1517 fix: Center Sessions month view calendar UI implementation --- src/components/PlannedSession.tsx | 3 ++- src/pages/centers/[cohortId].tsx | 1 - src/utils/Interfaces.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/PlannedSession.tsx b/src/components/PlannedSession.tsx index 8c7343a6..289edb28 100644 --- a/src/components/PlannedSession.tsx +++ b/src/components/PlannedSession.tsx @@ -23,6 +23,7 @@ import AddIcon from '@mui/icons-material/Add'; import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline'; import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; import { MobileDatePicker } from '@mui/x-date-pickers/MobileDatePicker'; +import { PlannedModalProps } from '@/utils/Interfaces'; import Stack from '@mui/material/Stack'; import { TimePicker } from '@mui/x-date-pickers/TimePicker'; import { sessionMode } from '@/utils/app.constant'; @@ -31,7 +32,7 @@ import { useTranslation } from 'next-i18next'; type mode = (typeof sessionMode)[keyof typeof sessionMode]; -const PlannedSession = ({ removeModal }) => { +const PlannedSession: React.FC = ({ removeModal }) => { const [mode, setMode] = useState(sessionMode.OFFLINE); const handleSessionModeChange = (event: ChangeEvent) => { diff --git a/src/pages/centers/[cohortId].tsx b/src/pages/centers/[cohortId].tsx index f51ab198..b8a92a28 100644 --- a/src/pages/centers/[cohortId].tsx +++ b/src/pages/centers/[cohortId].tsx @@ -52,7 +52,6 @@ const TeachingCenterDetails = () => { const { t } = useTranslation(); const [open, setOpen] = React.useState(false); const theme = useTheme(); - const currentDate = getTodayDate(); const [selectedDate, setSelectedDate] = React.useState(getTodayDate()); diff --git a/src/utils/Interfaces.ts b/src/utils/Interfaces.ts index eec64923..0153c2a2 100644 --- a/src/utils/Interfaces.ts +++ b/src/utils/Interfaces.ts @@ -140,6 +140,11 @@ export interface SessionsModalProps { handlePrimaryModel?: () => void; secondary?: string; } + +export interface PlannedModalProps { + removeModal?: () => void; +} + export interface AttendanceStatusListProps { limit: number; page: number;