Skip to content

Commit

Permalink
#PS-1317 fixPS-1527 UI Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas1434shinde committed Aug 9, 2024
2 parents 6979441 + 1dbba18 commit 394e32a
Show file tree
Hide file tree
Showing 9 changed files with 655 additions and 557 deletions.
27 changes: 14 additions & 13 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"SEARCH_STUDENT": "Search Learner",
"SORT_BY": "Sort by",
"APPLY": "Apply",
"A_TO_Z": "A TO Z",
"Z_TO_A": "Z TO A",
"A_TO_Z": "A to Z",
"Z_TO_A": "Z to A",
"HIGH_TO_LOW": "High to Low",
"LOW_TO_HIGH": "Low to High",
"NAMES": "Names",
Expand Down Expand Up @@ -123,7 +123,8 @@
"FACILITATOR_UPDATED_SUCCESSFULLY": "Facilitator profile updated successfully!",
"PLEASE_SELECT_THE_CENTER": "Please select the center.",
"CREATE": "Create",
"OKAY": "Okay"
"OKAY": "Okay",
"HELD_EVERY_WEEK_ON": "Held every week on {{days}}"
},
"LOGIN_PAGE": {
"USERNAME": "Username",
Expand Down Expand Up @@ -191,7 +192,7 @@
"ATTENDANCE_OVERVIEW": "Attendance Overview",
"CENTER_ATTENDANCE": "Center Attendance",
"LOW_ATTENDANCE_STUDENTS": "Low Attendance Learners",
"N/A": "N/A",
"N/A": "No Centers Assigned",
"CENTER_NAME": "Center Name",
"ALL_CENTERS": "All Centers",
"NO_LEARNER_WITH_LOW_ATTENDANCE": "No Learner with low attendance",
Expand Down Expand Up @@ -457,14 +458,14 @@
"EXPAND_ALL": "Expand All",
"RESOURCES": "Resources"
},
"ASSESSMENTS":{
"ASSESSMENTS":"Assessments",
"CENTER":"Center",
"ASSESSMENT_TYPE":"Assessment Type",
"COMPLETED_THE_ASSESSMENT":"completed the assessment",
"SUBMITTED_ON":"Submitted On",
"CORRECT_ANSWER":"correct answers",
"NO_DATA_FOUND":"No data found",
"SEARCH_STUDENT":"search student"
"ASSESSMENTS": {
"ASSESSMENTS": "Assessments",
"CENTER": "Center",
"ASSESSMENT_TYPE": "Assessment Type",
"COMPLETED_THE_ASSESSMENT": "completed the assessment",
"SUBMITTED_ON": "Submitted On",
"CORRECT_ANSWER": "correct answers",
"NO_DATA_FOUND": "No data found",
"SEARCH_STUDENT": "search student"
}
}
4 changes: 2 additions & 2 deletions public/locales/hi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"SEARCH_STUDENT": "छात्र खोजें",
"SORT_BY": "इसके अनुसार क्रमबद्ध करें",
"APPLY": "आवेदन करना",
"A_TO_Z": "A TO Z",
"Z_TO_A": "Z TO A",
"A_TO_Z": "A to Z",
"Z_TO_A": "Z tO A",
"HIGH_TO_LOW": "उच्चे से नीचा",
"LOW_TO_HIGH": "नीचा से उच्चे",
"NAMES": "नाम",
Expand Down
4 changes: 2 additions & 2 deletions public/locales/mr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"SEARCH_STUDENT": "विद्यार्थी शोधा",
"SORT_BY": "क्रमवारी लावा",
"APPLY": "लागू करा",
"A_TO_Z": "A TO Z",
"Z_TO_A": "Z TO A",
"A_TO_Z": "A to Z",
"Z_TO_A": "Z to A",
"HIGH_TO_LOW": "उच्च ते कमी",
"LOW_TO_HIGH": "कमी ते उच्च",
"NAMES": "नावे",
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const FormButtons: React.FC<FormButtons> = ({
height: '2.5rem',
padding: theme.spacing(1),
fontWeight: '500',
width: isSingleButton ? '100%' : '48%',
width: '100%',
}}
type="submit"
onClick={() => onClick(formData)}
Expand Down
118 changes: 59 additions & 59 deletions src/components/ManageUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const ManageUser: React.FC<ManageUsersProps> = ({
return;
}
const userIds = facilitatorList?.map((user: any) => user.userId);


const cohortDetailsPromises = userIds?.map((userId: string) =>
getCohortList(userId, { filter: 'true' })
Expand All @@ -175,7 +174,6 @@ const ManageUser: React.FC<ManageUsersProps> = ({
}
});


const extractedData = facilitatorList?.map(
(user: any, index: number) => {
const cohorts = cohortDetails[index] || [];
Expand Down Expand Up @@ -631,70 +629,72 @@ const ManageUser: React.FC<ManageUsersProps> = ({
>
{users &&
users.length !== 0 &&
users.map((user) => (
<Box
key={user.userId}
display={'flex'}
borderBottom={`1px solid ${theme.palette.warning['A100']}`}
width={'100%'}
justifyContent={'space-between'}
sx={{ cursor: 'pointer' }}
>
<Box display="flex" alignItems="center" gap="5px">
<Image src={profileALT} alt="img" />
<Box>
<CustomLink
className="word-break"
href="#"
onClick={(e) => e.preventDefault()}
>
<Typography
onClick={() => {
handleTeacherFullProfile(user.userId!);
// ReactGA.event('teacher-details-link-clicked', {
// userId: userId,
// });
}}
[...users]
.sort((a, b) => a.name.localeCompare(b.name))
.map((user) => (
<Box
key={user.userId}
display={'flex'}
borderBottom={`1px solid ${theme.palette.warning['A100']}`}
width={'100%'}
justifyContent={'space-between'}
sx={{ cursor: 'pointer' }}
>
<Box display="flex" alignItems="center" gap="5px">
<Box>
<CustomLink
className="word-break"
href="#"
onClick={(e) => e.preventDefault()}
>
<Typography
onClick={() => {
handleTeacherFullProfile(user.userId!);
// ReactGA.event('teacher-details-link-clicked', {
// userId: userId,
// });
}}
sx={{
textAlign: 'left',
fontSize: '16px',
fontWeight: '400',
marginTop: '5px',
color: theme.palette.secondary.main,
}}
>
{user.name}
</Typography>
</CustomLink>
<Box
sx={{
textAlign: 'left',
fontSize: '16px',
fontWeight: '400',
marginTop: '5px',
color: theme.palette.secondary.main,
backgroundColor: '#FFF8F2',
padding: '5px',
borderRadius: '5px',
fontSize: '12px',
fontWeight: '600',
color: 'black',
marginBottom: '10px',
}}
>
{user.name}
</Typography>
</CustomLink>
<Box
{user?.cohortNames
? `${user.cohortNames}`
: t('ATTENDANCE.N/A')}
</Box>
</Box>
</Box>
<Box>
<MoreVertIcon
onClick={toggleDrawer('bottom', true, user)}
sx={{
backgroundColor: '#FFF8F2',
padding: '5px',
borderRadius: '5px',
fontSize: '12px',
fontWeight: '600',
color: 'black',
marginBottom: '10px',
fontSize: '24px',
marginTop: '1rem',
color: theme.palette.warning['300'],
}}
>
{user?.cohortNames
? `${user.cohortNames}`
: t('ATTENDANCE.N/A')}
</Box>
/>
</Box>
</Box>
<Box>
<MoreVertIcon
onClick={toggleDrawer('bottom', true, user)}
sx={{
fontSize: '24px',
marginTop: '1rem',
color: theme.palette.warning['300'],
}}
/>
</Box>
</Box>
))}
))}

{!users?.length && (
<Box
sx={{
Expand Down
Loading

0 comments on commit 394e32a

Please sign in to comment.