Skip to content

Commit

Permalink
Merge pull request #52 from vaibhavsTekdi/vs-updatecohortsearchlist
Browse files Browse the repository at this point in the history
Issue #000 fix: ui issues
  • Loading branch information
vaivk369 authored Feb 23, 2024
2 parents 2ac21c3 + 28b17b0 commit 4f8070e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions packages/cohort/src/pages/CohortDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,14 @@ const CohortDetails = ({ footerLinks, setAlert, appName }) => {
];

let getInitials = function (string) {
let names = string.split(' '), initials = names[0].substring(0, 1).toUpperCase();

let names = string.split(" "),
initials = names[0].substring(0, 1).toUpperCase();

if (names.length > 1) {
initials += names[names.length - 1].substring(0, 1).toUpperCase();
initials += names[names.length - 1].substring(0, 1).toUpperCase();
}
return initials;
};
};

const getFieldValues = (cohortsFields) => {
let fieldVals = [];
Expand Down Expand Up @@ -246,7 +247,11 @@ const CohortDetails = ({ footerLinks, setAlert, appName }) => {
>
<Layout
_header={{
title: cohortParentDetails?.name + ", " + " Level " + cohortDetails?.name,
title:
cohortParentDetails?.name +
", " +
" Level " +
cohortDetails?.name,
subHeading: moment().format("hh:mm A"),
iconComponent: (
<Pressable>
Expand Down Expand Up @@ -312,7 +317,10 @@ const CohortDetails = ({ footerLinks, setAlert, appName }) => {

// Modify the title based on the attendance status
let modifiedTitle = item?.data[0]?.title;
if (isMarkMyAttendance && attendanceStatusData?.data[0]?.attendance) {
if (
isMarkMyAttendance &&
attendanceStatusData?.data[0]?.attendance
) {
modifiedTitle += ` - ${attendanceStatusData?.data[0]?.attendance}`;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/common-lib/src/components/layout/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default function AppBar({
)
}}
>
{languages?.map((e, index) => (
{/* {languages?.map((e, index) => (
<Menu.Item
key={index}
label={e.title}
Expand All @@ -179,7 +179,7 @@ export default function AppBar({
>
{e.title}
</Menu.Item>
))}
))} */}
<Menu.Item onPress={(item) => setLang('logout')}>
Logout
</Menu.Item>
Expand Down

0 comments on commit 4f8070e

Please sign in to comment.