From b7ae11bc98580a206a18bc1784b56b1a7276c05c Mon Sep 17 00:00:00 2001 From: AbhilashKD <124042593+AbhilashKD@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:45:38 +0530 Subject: [PATCH 1/2] Create sample.txt --- sample.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 sample.txt diff --git a/sample.txt b/sample.txt new file mode 100644 index 00000000..d64a3d96 --- /dev/null +++ b/sample.txt @@ -0,0 +1 @@ +sample From 0959c400a02447e3980b8d1c59a9ed49cf3e5f48 Mon Sep 17 00:00:00 2001 From: TTPL-RT-52 Date: Mon, 15 Jul 2024 15:14:32 +0530 Subject: [PATCH 2/2] Issue #PS-1316 fix: Planned Session modal UI Implementation --- public/locales/en/common.json | 25 ++- public/locales/hi/common.json | 25 ++- public/locales/mr/common.json | 25 ++- src/assets/images/decorationBg.png | Bin 0 -> 9892 bytes src/components/CenterSessionModal.tsx | 97 ++++++++++ src/components/DeleteSession.tsx | 47 +++++ src/components/PlannedSession.tsx | 252 ++++++++++++++++++++++++++ src/components/Schedule.tsx | 55 ++++++ src/components/SessionCardFooter.tsx | 6 +- src/components/TopicDetails.tsx | 114 ++++++++++++ src/pages/centers/[cohortId].tsx | 54 ++++-- src/utils/Interfaces.ts | 7 + src/utils/app.constant.ts | 5 + 13 files changed, 688 insertions(+), 24 deletions(-) create mode 100644 src/assets/images/decorationBg.png create mode 100644 src/components/CenterSessionModal.tsx create mode 100644 src/components/DeleteSession.tsx create mode 100644 src/components/PlannedSession.tsx create mode 100644 src/components/Schedule.tsx create mode 100644 src/components/TopicDetails.tsx diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 5293f591..f4c083b9 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -289,10 +289,33 @@ "REQUEST_TO_DELETE": "Request to Delete", "RENAME": "Rename", "CENTER_RENAMED": "Center Renamed Successfully!", - "SEND_REQUEST":"Send Request", + "SEND_REQUEST": "Send Request", "REQUEST_TO_DELETE_HAS_BEEN_SENT": "Request to Delete has been sent", "YOU_ARE_SENDING_REQUEST_TO_THE_STATE_ADMIN": "You are sending a request to the State Admin to delete this Center" }, + "CENTER_SESSION": { + "THIS_SESSION": "This session", + "FOLLOWING_SESSIONS": "This and following sessions", + "MODE_OF_SESSION": "Mode of Session", + "OFFLINE": "Offline", + "ONLINE": "Online", + "SUBJECT": "Subject", + "MEETING_LINK": "Meeting Link", + "MEETING_PASSCODE": "Meeting Passcode (if applicable)", + "START_TIME": "Start Time", + "END_TIME": "End Time", + "START_DATE": "Start Date", + "END_DATE": "End Date", + "REMOVE_THIS_SESSION": "Remove this session", + "PLANNED_SESSION": "Planned Session", + "FIXES_SUBJECTS": "For fixed subjects in the timetable", + "EXTRA_SESSION": "Extra Session", + "DOUBT_CLEARING": "For doubt clearing, webinars, etc", + "TOPIC": "Topic", + "SUBTOPIC": "Sub Topic", + "FACILITATORS": " Facilitators Pre-requisites", + "TITLE": "Title" + }, "MANAGE_USERS": { "CENTERS_REQUESTED_SUCCESSFULLY": "Center Requested Successfully" } diff --git a/public/locales/hi/common.json b/public/locales/hi/common.json index 11216f45..865862cf 100644 --- a/public/locales/hi/common.json +++ b/public/locales/hi/common.json @@ -268,8 +268,31 @@ "REQUEST_TO_DELETE": "हटाने का अनुरोध", "RENAME": "नाम बदलें", "CENTER_RENAMED": "केंद्र का नाम सफलतापूर्वक बदल दिया गया!", - "SEND_REQUEST":"अनुरोध भेजें", + "SEND_REQUEST": "अनुरोध भेजें", "REQUEST_TO_DELETE_HAS_BEEN_SENT": " हटाने का अनुरोध भेजा गया है", "YOU_ARE_SENDING_REQUEST_TO_THE_STATE_ADMIN": "आप राज्य प्रशासन को इस केंद्र को हटाने का अनुरोध भेज रहे हैं" + }, + "CENTER_SESSION": { + "THIS_SESSION": "यह सत्र", + "FOLLOWING_SESSIONS": "यह और आने वाले सत्र", + "MODE_OF_SESSION": "सत्र का मोड", + "OFFLINE": "ऑफलाइन", + "ONLINE": "ऑनलाइन", + "SUBJECT": "विषय", + "MEETING_LINK": "बैठक लिंक", + "MEETING_PASSCODE": "बैठक पासकोड (यदि लागू हो)", + "START_TIME": "प्रारंभ समय", + "END_TIME": "समाप्ति समय", + "START_DATE": "प्रारंभ तिथि", + "END_DATE": "समाप्ति तिथि", + "REMOVE_THIS_SESSION": "इस सत्र को हटाएं", + "PLANNED_SESSION": "नियोजित सत्र", + "FIXES_SUBJECTS": "समय सारिणी में निश्चित विषयों के लिए", + "EXTRA_SESSION": "अतिरिक्त सत्र", + "DOUBT_CLEARING": "शंका समाधान, वेबिनार आदि के लिए", + "TOPIC": "विषय", + "SUBTOPIC": "उप विषय", + "FACILITATORS": "सुविधादाताओं की पूर्व आवश्यकताएँ", + "TITLE": "शीर्षक" } } diff --git a/public/locales/mr/common.json b/public/locales/mr/common.json index 176870db..908dbf09 100644 --- a/public/locales/mr/common.json +++ b/public/locales/mr/common.json @@ -269,8 +269,31 @@ "REQUEST_TO_DELETE": "हटवण्याची विनंती", "RENAME": "नाव बदला", "CENTER_RENAMED": "केंद्राचे नाव यशस्वीरित्या बदलले गेले!", - "SEND_REQUEST":"विनंती पाठवा", + "SEND_REQUEST": "विनंती पाठवा", "REQUEST_TO_DELETE_HAS_BEEN_SENT": "हटवण्याची विनंती पाठवली आहे", "YOU_ARE_SENDING_REQUEST_TO_THE_STATE_ADMIN": "आपण या केंद्राला हटविण्याचे विनंती राज्य प्रशासनाला पाठवत आहात" + }, + "CENTER_SESSION": { + "THIS_SESSION": "हे सत्र", + "FOLLOWING_SESSIONS": "हे आणि पुढील सत्र", + "MODE_OF_SESSION": "सत्राचा प्रकार", + "OFFLINE": "ऑफलाइन", + "ONLINE": "ऑनलाइन", + "SUBJECT": "विषय", + "MEETING_LINK": "बैठक लिंक", + "MEETING_PASSCODE": "बैठक पासकोड (जर लागू असेल तर)", + "START_TIME": "सुरवातीचा वेळ", + "END_TIME": "समाप्तीचा वेळ", + "START_DATE": "सुरवात तारीख", + "END_DATE": "समाप्ती तारीख", + "REMOVE_THIS_SESSION": "हे सत्र काढून टाका", + "PLANNED_SESSION": "नियोजित सत्र", + "FIXES_SUBJECTS": "वेळापत्रकात निश्चित विषयांसाठी", + "EXTRA_SESSION": "अतिरिक्त सत्र", + "DOUBT_CLEARING": "शंका निरसन, वेबिनार इत्यादीसाठी", + "TOPIC": "विषय", + "SUBTOPIC": "उपविषय", + "FACILITATORS": "सुविधादात्यांची पूर्व आवश्यकताएं", + "TITLE": "शीर्षक" } } diff --git a/src/assets/images/decorationBg.png b/src/assets/images/decorationBg.png new file mode 100644 index 0000000000000000000000000000000000000000..4a12fdd8f271c979aa03d18c2de91f6a77fe1f06 GIT binary patch literal 9892 zcmeHt^;4An*FPnqE*%mgEhV{2BOo0D(%lWxB@L2GO2d+ign)p`Qql(9upkX0EG#A6 z@V&U_nfcs){($eyGxPkw>~MDHI`8v(pLm^fF6c`&1^oNe_c1Uq@Rby0H8C(SA;2FD z4;PSxWwv8tV9;YI$v)S9jk%q-;XSK3BTxG^f|tPyk5t-@H?Mb!%IhZIr6#3r_rlUS z!)Ck4CpL~+6NdoacF=*VI$kWLi2?O@_f8~WdxM2JQDx*>^?L8?w*qN~Q@y4~mzvyn z+tWEZcULdEr&iJ5bj#0))*C!-{*)L8xm|h?niq;-_c8TxuJ*}1_fzmw^eflCAFQ*m z|MJ0g?!Hjim2O+e<%$s&J!b?ywgZ@`Z)dL#E83Fpv_Z0~XDM5kqceo#Bs$^-wmg}?eZ4c^ZUKoJ8Lxu$)uo0&gRLKN4=vPVxgWnx z!GvD)1Pzd2`w`RVs8D}q|L*a<<4VT-bHcWf)eT)oE>l)58J`<>P@*}VSq`xgWx7V| z7WidM+E>Id=+qRSg<}&eCCfs_XkcBqe;Pfvq|+VtwVz*uii#tSD%KM%nJH0Mr4!zL z!=IV59?$U@^quz)%YoI@*K*~w&?_EHCG4>dQrzG1FLWh2VZuATs=vjdkIm`DK-OxG ztB#FfK2cNoia(PGCP(s5*)c81b@ z_H7-M_1?4t17sZ$W~cLP136%?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y*!)A0429pLgY%>P*%F|VpKr|TL5LHDm^Qm$_Ku=^GC5;*z4_eLrEtSQQzRewv> zDko5l*RsJtJp5}%MXGd0s#KD$dn+AJ61|6kfopdAF2H}bSYHm$R5I2ju^ZD zmvjxG9F(}J{`JpYbS@gcR4jFd7u75kYbI=fPka&K#JZ17sZ!tok8%)#sI%#e_7z4M(Zs~gOC=OVm&tE)% zGjDk-^_+AXuTj43H%;sBbj3>;qrx@s@Wpje>8v4{;b}9&L#f+FU{W@+-)(Qfd$VK) zER}&hbsP8(<9Yd zhN|i@;%e|B$ifX>5b?JkhNP~`vXQ-{pnCloTsUO2tfI>F@il4V z6MiAkPxGbdaWol zGZ>-qFGLM33M<#2l2AX(x5nY53fuhH>9N&Vt7uwP|Mc1(8;2jVu`Y@29Vc8*qC0m1 zdnR=kGrRL16_Oo7)gdOhCd`NKf4qgoNWMc_>Lz2w;)!2vvZhmg) z0$YX8O(|N*_75M}Z7A5YvceWlbXjSl?tLhNwBS4;Gz8B(TnHgx3UY(4r0Q84R6 zE;abHj!g|ac=2$0Wkn@FugoVj+_tkwUhku7<)5F5rnnn&e9*NwuSkyj`A6tXzh+L( z^n)gc3bIkd`a;Ik)W@y1^znVbJ4^n{xfAV7AKvieWjazL5yt#WLE4jjZxL0*REMJc zOBd&Ta~TxT&a2qqT`l}=PV1(45+bABEUlx@cAPfWy|FP>zHgJ^O;hFImws$)>UO<+ zK_Z#1gaQl7S5f0pGG4gY4!m!ZfT5O;HcbvS(FQpStkA7r5Zj{eGs)%75mCI_oul00 zN5k^qoIQ;Fui@ ot!(n1bKGrbcRl0ycym`O*w%);MqUqi`wT-#PEEF2+WgJ`1Fj*jasU7T literal 0 HcmV?d00001 diff --git a/src/components/CenterSessionModal.tsx b/src/components/CenterSessionModal.tsx new file mode 100644 index 00000000..185da134 --- /dev/null +++ b/src/components/CenterSessionModal.tsx @@ -0,0 +1,97 @@ +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; +import CloseIcon from '@mui/icons-material/Close'; +import { Divider } from '@mui/material'; +import Modal from '@mui/material/Modal'; +import React from 'react'; +import { SessionsModalProps } from '@/utils/Interfaces'; +import Typography from '@mui/material/Typography'; +import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'react-i18next'; + +const CenterSessionModal: React.FC = ({ + children, + open, + handleClose, + title, + primary, +}) => { + const theme = useTheme(); + const { t } = useTranslation(); + const style = { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + width: '75%', + bgcolor: theme?.palette?.warning['A400'], + boxShadow: 24, + borderRadius: '16px', + '@media (min-width: 600px)': { + width: '450px', + }, + }; + return ( + <> +
+ + + + + + {title} + + + + + + {children} + + + + + + +
+ + ); +}; + +export default CenterSessionModal; diff --git a/src/components/DeleteSession.tsx b/src/components/DeleteSession.tsx new file mode 100644 index 00000000..8d3973c7 --- /dev/null +++ b/src/components/DeleteSession.tsx @@ -0,0 +1,47 @@ +import { + Box, + FormControl, + FormControlLabel, + FormLabel, + Radio, + RadioGroup, +} from '@mui/material'; + +import React from 'react'; +import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'react-i18next'; + +const DeleteSession = () => { + const theme = useTheme(); + const { t } = useTranslation(); + return ( + <> + + + {t('CENTER_SESSION.THIS_SESSION')} + + + + {t('CENTER_SESSION.FOLLOWING_SESSIONS')} + + + + + ); +}; + +export default DeleteSession; diff --git a/src/components/PlannedSession.tsx b/src/components/PlannedSession.tsx new file mode 100644 index 00000000..d58fd42d --- /dev/null +++ b/src/components/PlannedSession.tsx @@ -0,0 +1,252 @@ +import { + Box, + Button, + Divider, + FormControl, + FormControlLabel, + FormLabel, + Grid, + InputLabel, + MenuItem, + Radio, + RadioGroup, + Select, +} from '@mui/material'; +import { ChangeEvent, useState } from 'react'; + +import AddIcon from '@mui/icons-material/Add'; +import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline'; +import { sessionModeConstant } from '@/utils/app.constant'; +import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'next-i18next'; + +type SessionMode = + (typeof sessionModeConstant)[keyof typeof sessionModeConstant]; + +const PlannedSession = () => { + const [sessionMode, setSessionMode] = useState( + sessionModeConstant.OFFLINE + ); + + const handleSessionModeChange = (event: ChangeEvent) => { + setSessionMode(event.target.value as SessionMode); + }; + + const { t } = useTranslation(); + const theme = useTheme(); + + return ( + <> + + + + + {t('CENTER_SESSION.MODE_OF_SESSION')} + + + + } + label={ + + {t('CENTER_SESSION.OFFLINE')} + + } + /> + + } + label={ + + {t('CENTER_SESSION.ONLINE')} + + } + /> + + + + + + + + {t('CENTER_SESSION.SUBJECT')} + + + + + + {sessionMode === sessionModeConstant.ONLINE && ( + <> + + + + {t('CENTER_SESSION.MEETING_LINK')} + + + + + + + + {t('CENTER_SESSION.MEETING_PASSCODE')} + + + + + + )} + + + + + + + + {t('CENTER_SESSION.START_TIME')} + + + + + + + + + + {t('CENTER_SESSION.END_TIME')} + + + + + + + + + + + + + + + {t('CENTER_SESSION.START_DATE')} + + + + + + + + + + {t('CENTER_SESSION.END_DATE')} + + + + + + + + + + + {t('CENTER_SESSION.REMOVE_THIS_SESSION')} + + + + + + + + + + + + + + + + ); +}; + +export default PlannedSession; diff --git a/src/components/Schedule.tsx b/src/components/Schedule.tsx new file mode 100644 index 00000000..7a0f92bc --- /dev/null +++ b/src/components/Schedule.tsx @@ -0,0 +1,55 @@ +import { Box } from '@mui/material'; +import React from 'react'; +import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'react-i18next'; + +const Schedule = () => { + const theme = useTheme(); + const { t } = useTranslation(); + return ( + <> + + + + {t('CENTER_SESSION.PLANNED_SESSION')} + + {t('CENTER_SESSION.FIXES_SUBJECTS')} + + + + {t('CENTER_SESSION.EXTRA_SESSION')} + + {t('CENTER_SESSION.DOUBT_CLEARING')} + + + + ); +}; + +export default Schedule; diff --git a/src/components/SessionCardFooter.tsx b/src/components/SessionCardFooter.tsx index 05cf3a54..53f3eeda 100644 --- a/src/components/SessionCardFooter.tsx +++ b/src/components/SessionCardFooter.tsx @@ -26,7 +26,7 @@ const SessionCardFooter: React.FC = ({ item }) => { }} > = ({ item }) => { - + {item?.topic} @@ -88,7 +88,7 @@ const SessionCardFooter: React.FC = ({ item }) => { {t('COMMON.SELECT_TOPIC')} - + ); }; diff --git a/src/components/TopicDetails.tsx b/src/components/TopicDetails.tsx new file mode 100644 index 00000000..a18ceb14 --- /dev/null +++ b/src/components/TopicDetails.tsx @@ -0,0 +1,114 @@ +import { + Accordion, + AccordionDetails, + AccordionSummary, + Box, + Grid, + Typography, +} from '@mui/material'; + +import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; +import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline'; +import EditIcon from '@mui/icons-material/Edit'; +import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'next-i18next'; + +const TopicDetails = () => { + const { t } = useTranslation(); + const theme = useTheme(); + return ( + <> + + + + + {t('CENTER_SESSION.TOPIC')} + {/* Real Numbers */} + + + + + {t('CENTER_SESSION.SUBTOPIC')} + {/* Revisiting Irrational Numbers */} + + + + + {t('CENTER_SESSION.REMOVE_THIS_SESSION')} + + + + + + + + } + aria-controls="panel1-content" + id="panel1-header" + className="accordion-summary" + sx={{ + m: 0, + background: theme?.palette?.background.paper, + px: '16px', + }} + > + + {t('CENTER_SESSION.FACILITATORS')} + + + + + + + {t('CENTER_SESSION.TITLE')} + + + + + {t('CENTER_SESSION.TITLE')} + + + + + + + ); +}; + +export default TopicDetails; diff --git a/src/pages/centers/[cohortId].tsx b/src/pages/centers/[cohortId].tsx index 7d68146c..df4785c6 100644 --- a/src/pages/centers/[cohortId].tsx +++ b/src/pages/centers/[cohortId].tsx @@ -9,25 +9,25 @@ import { import React, { useEffect, useState } from 'react'; import { formatSelectedDate, getTodayDate, toPascalCase } from '@/utils/Helper'; -import Accordion from '@mui/material/Accordion'; -import AccordionDetails from '@mui/material/AccordionDetails'; -import AccordionSummary from '@mui/material/AccordionSummary'; import AddIcon from '@mui/icons-material/Add'; import AddLeanerModal from '@/components/AddLeanerModal'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import Box from '@mui/material/Box'; +import CenterSessionModal from '@/components/CenterSessionModal'; import CohortLearnerList from '@/components/CohortLearnerList'; import { CustomField } from '@/utils/Interfaces'; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import DeleteCenterModal from '@/components/center/DeleteCenterModal'; +import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined'; import { GetStaticPaths } from 'next'; import Header from '@/components/Header'; import KeyboardBackspaceOutlinedIcon from '@mui/icons-material/KeyboardBackspaceOutlined'; -import MenuBookIcon from '@mui/icons-material/MenuBook'; -import PriorityHighIcon from '@mui/icons-material/PriorityHigh'; +import ModeEditOutlineOutlinedIcon from '@mui/icons-material/ModeEditOutlineOutlined'; +import MoreVertIcon from '@mui/icons-material/MoreVert'; +import RenameCenterModal from '@/components/center/RenameCenterModal'; +import Schedule from './../../components/Schedule'; import { Session } from '../../utils/Interfaces'; import SessionCard from '@/components/SessionCard'; import SessionCardFooter from '@/components/SessionCardFooter'; -import SubdirectoryArrowRightIcon from '@mui/icons-material/SubdirectoryArrowRight'; import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; import WeekCalender from '@/components/WeekCalender'; @@ -37,11 +37,6 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import { useRouter } from 'next/router'; import { useTheme } from '@mui/material/styles'; import { useTranslation } from 'next-i18next'; -import MoreVertIcon from '@mui/icons-material/MoreVert'; -import ModeEditOutlineOutlinedIcon from '@mui/icons-material/ModeEditOutlineOutlined'; -import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined'; -import RenameCenterModal from '@/components/center/RenameCenterModal'; -import DeleteCenterModal from '@/components/center/DeleteCenterModal'; const TeachingCenterDetails = () => { const [value, setValue] = React.useState(1); @@ -50,6 +45,7 @@ const TeachingCenterDetails = () => { const router = useRouter(); const { cohortId }: any = router.query; const { t } = useTranslation(); + const [open, setOpen] = React.useState(false); const theme = useTheme(); const [selectedDate, setSelectedDate] = React.useState(getTodayDate()); @@ -61,9 +57,12 @@ const TeachingCenterDetails = () => { React.useState(null); const [openRenameCenterModal, setOpenRenameCenterModal] = React.useState(false); - const [openDeleteCenterModal, setOpenDeleteCenterModal] = + const [openDeleteCenterModal, setOpenDeleteCenterModal] = React.useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + useEffect(() => { const getCohortData = async () => { const response = await getCohortDetails(cohortId); @@ -193,13 +192,23 @@ const TeachingCenterDetails = () => { open={Boolean(anchorEl)} onClose={handleMenuClose} > - { setOpenRenameCenterModal(true); handleMenuClose(); }}> - + { + setOpenRenameCenterModal(true); + handleMenuClose(); + }} + > + {t('CENTERS.RENAME_CENTER')} - {setOpenDeleteCenterModal(true); handleMenuClose(); }}> + { + setOpenDeleteCenterModal(true); + handleMenuClose(); + }} + > @@ -210,7 +219,7 @@ const TeachingCenterDetails = () => { open={openRenameCenterModal} handleClose={handleRenameCenterClose} /> - @@ -261,12 +270,21 @@ const TeachingCenterDetails = () => { width: '163px', color: theme.palette.error.contrastText, }} + onClick={handleOpen} className="text-1E" endIcon={} > {t('COMMON.SCHEDULE_NEW')} + + + { {t('COMMON.NO_SESSIONS_SCHEDULED')} - + void; + title: string; + primary: string; +} export interface AttendanceStatusListProps { limit: number; page: number; diff --git a/src/utils/app.constant.ts b/src/utils/app.constant.ts index f450d756..147174ee 100644 --- a/src/utils/app.constant.ts +++ b/src/utils/app.constant.ts @@ -27,3 +27,8 @@ export enum cohortHierarchy { BLOCK = 'BLOCK', COHORT = 'COHORT', } + +export enum sessionModeConstant { + ONLINE = 'online', + OFFLINE = 'offline', +}