From 5dda9b16e3eefc9ff0303eb7ef05fd98dbb452e5 Mon Sep 17 00:00:00 2001 From: Arif Date: Thu, 8 Aug 2024 17:17:44 +0530 Subject: [PATCH] Issue #PS-1676 feat: Dashboard Page Inconsistencies --- public/locales/en/common.json | 8 +-- public/locales/hi/common.json | 4 +- public/locales/mr/common.json | 2 +- public/locales/or/common.json | 1 + src/components/CohortSelectionSection.tsx | 12 ++++ src/components/MarkBulkAttendance.tsx | 75 ++++++++++++----------- 6 files changed, 60 insertions(+), 42 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 98aa7457..702c7640 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -72,7 +72,7 @@ "SURE_UPDATE": "Are you sure you want to update this attendance?", "SURE_REMOVE": "Are you sure you want to remove this learner?", "SURE_REASSIGN_CENTER": "Are you sure you want to re-assign Center to this user?", - "SURE_CLOSE": "Are you sure you want to close?", + "SURE_CLOSE": "Are you sure you want to close without saving?", "LEARNER_LIST": "Learners List", "FACILITATOR_LIST": "Facilitators List", "FILTERS": "Filters", @@ -168,11 +168,11 @@ "ATTENDANCE": "Attendance (%)" }, "ATTENDANCE": { - "TOTAL_STUDENTS": "Total Number of Learners: {{count}}", + "TOTAL_STUDENTS": "Total Learners: {{count}}", "ACTIVE_STUDENTS": "Active Learners: {{count}}", "DROPOUT_STUDENTS": "Dropout Learners: {{count}}", - "PRESENT_STUDENTS": "Present Learners: {{count}}", - "ABSENT_STUDENTS": "Absent Learners: {{count}}", + "PRESENT_STUDENTS": "Present: {{count}}", + "ABSENT_STUDENTS": "Absent: {{count}}", "PRESENT": "Present", "ABSENT": "Absent", "HALF_DAY": "Half Day", diff --git a/public/locales/hi/common.json b/public/locales/hi/common.json index 9f0bbfd1..42d4620d 100644 --- a/public/locales/hi/common.json +++ b/public/locales/hi/common.json @@ -70,7 +70,7 @@ "SURE_LOGOUT": "क्या आप वाकई लोगआउट करना चाहते हैं?", "SURE_UPDATE": "क्या आप इस उपस्थिति को अपडेट करना चाहते हैं?", "SURE_REMOVE": "क्या आप वाकई इस शिक्षार्थी को हटाना चाहते हैं?", - "SURE_CLOSE": "क्या आप वाकई बंद करना चाहते हैं?", + "SURE_CLOSE": "क्या आप वाकई बिना सहेजे बंद करना चाहते हैं?", "LEARNER_LIST": "अभियांत्रिकी सूची", "FACILITATOR_LIST": "प्रशिक्षकों की सूची", "FILTERS": "फिल्टर्स", @@ -134,7 +134,7 @@ "BLOCK_AVERAGE_ATTENDANCE": "ब्लॉक औसत उपस्थिति" }, "ATTENDANCE": { - "TOTAL_STUDENTS": "कुल छात्रों की संख्या: {{count}}", + "TOTAL_STUDENTS": "कुल संख्या: {{count}}", "ACTIVE_STUDENTS": "सक्रिय शिक्षार्थी: {{count}}", "DROPOUT_STUDENTS": "छोड़े हुए छात्र: {{count}}", "PRESENT_STUDENTS": "उपस्थित छात्र: {{count}}", diff --git a/public/locales/mr/common.json b/public/locales/mr/common.json index c931b20d..ba0c84ae 100644 --- a/public/locales/mr/common.json +++ b/public/locales/mr/common.json @@ -70,7 +70,7 @@ "SURE_LOGOUT": "तुम्हाला खाते बंद करायचं आहे का?", "SURE_UPDATE": "तुम्हाला ही उपस्थिती अपडेट करायची आहे का?", "SURE_REMOVE": "आपण खरोखरच या विद्यार्थ्याला काढून टाकू इच्छिता का?", - "SURE_CLOSE": "तुम्हाला हे बंद करायचं आहे का?", + "SURE_CLOSE": "तुमची खात्री आहे की तुम्ही सेव्ह न करता बंद करू इच्छिता?", "LEARNER_LIST": "शिक्षार्थ्यांची यादी", "FACILITATOR_LIST": "सुविधादारांची यादी", "FILTERS": "फिल्टर्स", diff --git a/public/locales/or/common.json b/public/locales/or/common.json index 0078534b..449dceb9 100644 --- a/public/locales/or/common.json +++ b/public/locales/or/common.json @@ -60,6 +60,7 @@ "UNMARK_DROP_OUT": " ଡ୍ରପ୍ ଆଉଟ୍ ଭାବରେ ଅପସାରଣ କରନ୍ତୁ", "SOMETHING_WENT_WRONG": "କିଛି ଭୁଲ ହେଇଗଲା।", "SURE_REMOVE": "ଆପଣ ନିଶ୍ଚିତ ଏହି ଶିକ୍ଷାର୍ଥୀକୁ ହଟାଇବାକୁ ଚାହୁଁଛନ୍ତି କି?", + "SURE_CLOSE": "ଆପଣ ସ saving ୍ଚୟ ନକରି ବନ୍ଦ କରିବାକୁ ଚାହୁଁଛନ୍ତି କି?", "LEARNER_MARKED_DROPOUT": "ଶିକ୍ଷାର୍ଥୀକୁ ଡ୍ରପ୍ ଆଉଟ୍ ଭାବେ ଚିହ୍ନିତ କରାଯାଇଛି", "LEARNER_UNMARKED_DROPOUT": "ଶିକ୍ଷାର୍ଥୀକୁ ଡ୍ରପ୍ ଆଉଟ୍ ଭାବେ ଅଚିହ୍ନିତ କରାଯାଇଛି", "LEARNER_REMOVED": "ଶିକ୍ଷାର୍ଥୀ କୁ ହଟାଇ ଦିଆଯାଇଛି", diff --git a/src/components/CohortSelectionSection.tsx b/src/components/CohortSelectionSection.tsx index 8397dd30..47c3ab9a 100644 --- a/src/components/CohortSelectionSection.tsx +++ b/src/components/CohortSelectionSection.tsx @@ -20,6 +20,7 @@ import ReactGA from 'react-ga4'; import Loader from './Loader'; import { showToastMessage } from './Toastify'; import manageUserStore from '@/store/manageUserStore'; +import { ArrowDropDownIcon } from '@mui/x-date-pickers/icons'; interface CohortSelectionSectionProps { classId: string; @@ -324,6 +325,16 @@ const CohortSelectionSection: React.FC = ({ width: '100%', marginBottom: '0rem', }} + MenuProps={{ + PaperProps: { + style: { + maxHeight: 250, + }, + }, + }} + IconComponent={(props) => ( + + )} > {cohortsData?.length !== 0 ? ( manipulatedCohortData?.map((cohort) => ( @@ -335,6 +346,7 @@ const CohortSelectionSection: React.FC = ({ fontSize: '14px', color: '#4D4639', textTransform: 'capitalize', + }} > {cohort.name} diff --git a/src/components/MarkBulkAttendance.tsx b/src/components/MarkBulkAttendance.tsx index 728f48ce..c34e16f4 100644 --- a/src/components/MarkBulkAttendance.tsx +++ b/src/components/MarkBulkAttendance.tsx @@ -461,20 +461,40 @@ const MarkBulkAttendance: React.FC = ({ )} - {dropoutCount > 0 ? ( - - - {t('ATTENDANCE.ACTIVE_STUDENTS', { - count: numberOfCohortMembers - dropoutCount, - })} - + + {dropoutCount > 0 ? ( + <> + + {t('ATTENDANCE.ACTIVE_STUDENTS', { + count: numberOfCohortMembers - dropoutCount, + })} + + + {t('ATTENDANCE.DROPOUT_STUDENTS', { + count: dropoutCount, + })} + + + ) : ( = ({ padding: '0 10px', }} > - {t('ATTENDANCE.DROPOUT_STUDENTS', { - count: dropoutCount, + {t('ATTENDANCE.TOTAL_STUDENTS', { + count: numberOfCohortMembers, })} - - ) : ( - - {t('ATTENDANCE.TOTAL_STUDENTS', { - count: numberOfCohortMembers, - })} - - )} + )} - = ({ = ({ })} + {cohortMemberList && cohortMemberList?.length != 0 ? (