diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 634e86e4..18cf0a1c 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -439,7 +439,8 @@ "START_TIME_ERROR": "Start time cannot be later than end time.", "END_TIME_ERROR": "End time cannot be earlier than start time.", "START_DATE_ERROR": "Start date cannot be later than end date.", - "END_DATE_ERROR": "End date cannot be earlier than start date." + "END_DATE_ERROR": "End date cannot be earlier than start date.", + "IDENTIFIER_NOT_FOUND": "Identifier not found! Cannot Open Content!" }, "MANAGE_USERS": { "CENTERS_REQUESTED_SUCCESSFULLY": "Center requested successfully", @@ -596,35 +597,32 @@ "BOARD": "Board", "CHOOSE_BOARD": "Choose which Board the Learner is going to be enrolled in", "CHOOSE_SUBJECT": "Choose which subjects the learner is enrolling for", - "SUBJECTS_ENROLLED":"Subjects Enrolled", - "EXAM_REGISTRATION_FEES_PAID":"Exam Registration Fees Paid?", + "SUBJECTS_ENROLLED": "Subjects Enrolled", + "EXAM_REGISTRATION_FEES_PAID": "Exam Registration Fees Paid?", "EDIT": "Edit", "SURE_GO_BACK": "Are you sure you want to go back? Your progress might be lost." }, "OBSERVATION": { "OBSERVATION_START": "Start Observation", - "OBSERVATION_DETAILS":"Observation Details", - "ADD_ENTITY":"Add {{entityType}} in observation list", - "SEARCH_ENTITY":"Search {{entityType}} name", - "OBSERVATIONS":"{{name}} Observations", - "SEARCH_OBSERVATIONS":"Search Observations", - "CONTINUE":"Continue", - "SUBMITTED":"Submitted", - "FORM_SAVED_SUCCESSFULLY":"Form changes saved successfully", - "FORM_SUBMIT_SUCCESSFULLY":"Form submitted successfully", - "NOT_STARTED":"Not Started", - "COMPLETED":"Completed", - "INPROGRESS":"In-Progress", - "NO_DATA_FOUND":"No {{entity}} found", - "NO_RESULT_FOUND":"No Observations found for {{entity}}", - "NO_OBSERVATION_EXPIRED":"No observation expired for {{entity}}", - "DAYS_LEFT":"Days left", - "THIS_OBSERVATION_EXPIRED":"This observation is expired", - "DUE_DATE":"Due date", - "SURVEY_FORMS":"Survey Forms", - "OBSERVATION_STATUS":"Observation Status" - - -} - + "OBSERVATION_DETAILS": "Observation Details", + "ADD_ENTITY": "Add {{entityType}} in observation list", + "SEARCH_ENTITY": "Search {{entityType}} name", + "OBSERVATIONS": "{{name}} Observations", + "SEARCH_OBSERVATIONS": "Search Observations", + "CONTINUE": "Continue", + "SUBMITTED": "Submitted", + "FORM_SAVED_SUCCESSFULLY": "Form changes saved successfully", + "FORM_SUBMIT_SUCCESSFULLY": "Form submitted successfully", + "NOT_STARTED": "Not Started", + "COMPLETED": "Completed", + "INPROGRESS": "In-Progress", + "NO_DATA_FOUND": "No {{entity}} found", + "NO_RESULT_FOUND": "No Observations found for {{entity}}", + "NO_OBSERVATION_EXPIRED": "No observation expired for {{entity}}", + "DAYS_LEFT": "Days left", + "THIS_OBSERVATION_EXPIRED": "This observation is expired", + "DUE_DATE": "Due date", + "SURVEY_FORMS": "Survey Forms", + "OBSERVATION_STATUS": "Observation Status" + } } diff --git a/src/components/PieChartGraph.tsx b/src/components/PieChartGraph.tsx index 2cda35ec..bb7f0edd 100644 --- a/src/components/PieChartGraph.tsx +++ b/src/components/PieChartGraph.tsx @@ -62,81 +62,84 @@ const PieChartGraph: React.FC = ({ stagesCount }) => { }; return ( + - - Stages and Number of Students - - - - - - - {data.map((entry, index) => ( - - ))} - + Stages and Number of Students + - {isMobile ? ( - - ) : ( - + + + + {data.map((entry, index) => ( + - )} - - - + ))} + + + {isMobile ? ( + + ) : ( + + )} + + + + ); }; diff --git a/src/components/SessionCardFooter.tsx b/src/components/SessionCardFooter.tsx index 4c1a1af2..4667ded5 100644 --- a/src/components/SessionCardFooter.tsx +++ b/src/components/SessionCardFooter.tsx @@ -125,6 +125,11 @@ const SessionCardFooter: React.FC = ({ fetchTopicSubtopic(); }, [item]); + const handleComponentOpen = () => { + setSelectedTopic(''); + setSelectedSubtopics([]); + }; + const handleTopicSelection = (topic: string) => { setSelectedTopic(topic); console.log(topic); @@ -223,6 +228,15 @@ const SessionCardFooter: React.FC = ({ updateTopicSubtopic(); }; + const handleClick = () => { + handleComponentOpen(); + if (topicList && transformedTasks && eventStatus === EventStatus.UPCOMING) { + handleOpen(); + } else { + handleError(); + } + }; + useEffect(() => { const startDateTime = convertUTCToIST(item?.startDateTime); const startDate = startDateTime.date; @@ -336,13 +350,7 @@ const SessionCardFooter: React.FC = ({ cursor: 'pointer', alignItems: 'center', }} - onClick={ - topicList && - transformedTasks && - eventStatus === EventStatus.UPCOMING - ? handleOpen - : handleError - } + onClick={handleClick} > = ({ const handlePlayers = (identifier: string) => { sessionStorage.setItem('previousPage', window.location.href); - router.push(`/play/content/${identifier}`); + if (identifier !== undefined && identifier !== '') { + router.push(`/play/content/${identifier}`); + } else { + showToastMessage(t('CENTER_SESSION.IDENTIFIER_NOT_FOUND'), 'error'); + } }; return ( @@ -198,6 +203,10 @@ const TopicDetails: React.FC = ({ handlePlayers(item?.identifier)} > = ({ handlePlayers(item?.identifier)} > = ({ handlePlayers(item?.identifier)} > { : null; return ( + {loading && ( @@ -373,9 +379,13 @@ const LoginPage = () => { alignItems={'center'} justifyContent={'center'} zIndex={99} - sx={{ margin: '32px 0 65px' }} + sx={{ margin: '5px 10px 25px', }} > - App Logo{' '} + + App Logo + @@ -406,18 +416,19 @@ const LoginPage = () => { /> +
{ darkMode === 'dark' ? 'rgba(0, 0, 0, 0.9) 0px 2px 8px 0px' : 'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px', + marginTop: '50px', }, + '@media (max-width: 900px)': { + marginTop: '-25px', + } + }} > + + + {loading && ( + + )} + + + App Logo + + + {loading ? ( diff --git a/src/styles/globals.css b/src/styles/globals.css index acc61f73..e09d728f 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -1014,7 +1014,7 @@ legend.Mui-focused { .login-img { /* height: 500px !important; */ - width: 90% !important; + width: 100% !important; } .capitalize { @@ -1195,6 +1195,17 @@ mat-radio-group.mat-mdc-radio-group { .btn-outline-secondary{ + background: transparent !important; + border-radius: 100px !important; + box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), + 0px 2px 2px 0px rgba(0, 0, 0, 0.14), + 0px 1px 5px 0px rgba(0, 0, 0, 0.12) !important; + color: #1E1B16 !important; + font-size: 14px !important; + font-weight: 600 !important; +} + +.btn-primary{ background: #FDBE16 !important; border-radius: 100px !important; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),