Skip to content

Commit

Permalink
Merge pull request #668 from paritshivani/main
Browse files Browse the repository at this point in the history
card changes
  • Loading branch information
paritshivani authored Oct 4, 2024
2 parents a4dcd0a + 668d25b commit 845bf4f
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 52 deletions.
48 changes: 25 additions & 23 deletions packages/nulp_elite/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,30 +295,32 @@
"VIEW_STATUS": "View Status",
"SEARCH_FOR_POLL": "Search for a Poll",
"NO_POLL_AVAILABLE_NOW": " It looks like there are no polls at the moment.",
"ADMIN":"Admin",
"LEARNING_REPORT":"Learning Report",
"POPULAR_COURSES" : "Popular Courses",
"RECENTLY_ADDED":"Recently Added",
"THIS_CONTENT_IS_DERIVED_FROM":"This content is derived from",
"PUBLISHED_ON_NULP_BY":"PUBLISHED ON NULP BY",
"ACCEPT_THE_NULP_TERMS_OF_USE" : "I am 18+ years old and understand and accept the NULP Terms of Use",
"ADMIN": "Admin",
"LEARNING_REPORT": "Learning Report",
"POPULAR_COURSES": "Popular Courses",
"RECENTLY_ADDED": "Recently Added",
"THIS_CONTENT_IS_DERIVED_FROM": "This content is derived from",
"PUBLISHED_ON_NULP_BY": "PUBLISHED ON NULP BY",
"ACCEPT_THE_NULP_TERMS_OF_USE": "I am 18+ years old and understand and accept the NULP Terms of Use",
"As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE": "As a parent/guardian I understand & accept the NULP Terms of Use agree my child to register on NULP with the given information.",
"CONTENT_DERIVED_FROM": "This content is derived from",
"FILTERS":"Filters",
"EXPLORE_CONTENT":"Explore Content",
"FILTERS": "Filters",
"EXPLORE_CONTENT": "Explore Content",
"COURSE_SUCCESSFULLY_COMPLETED": "Course completed Successfully",
"ID":"ID",
"ORGANIZATION_NAME":"Organization Name",
"ROLE":"Role",
"NO_CERTIFICATES_FOUND":"No certificates found",
"NOT_ENROLL_MESSAGE":"You are not enrolled in any course. Enroll now!",
"FIRST_NAME":"First Name",
"LAST_NAME":"Last Name",
"NO_CHAT_REQUEST" : "No Chat Request",
"PHONE":"Phone",
"PHONE_NUMBER":"(+91 11) 24617517, 24617543, 24617595",
"LERN_title":"Learnathon 2.0",
"LERN_MESSAGE":"Learnathon 2.0 has started from 20/09/2024 to 20/10/2024. You can now create and share your submissions!",
"CREATE_CONTENT":"Create Content",
"REQUEST_TO_CREATE":"Request to Create"

"ID": "ID",
"ORGANIZATION_NAME": "Organization Name",
"ROLE": "Role",
"NO_CERTIFICATES_FOUND": "No certificates found",
"NOT_ENROLL_MESSAGE": "You are not enrolled in any course. Enroll now!",
"FIRST_NAME": "First Name",
"LAST_NAME": "Last Name",
"NO_CHAT_REQUEST": "No Chat Request",
"PHONE": "Phone",
"PHONE_NUMBER": "(+91 11) 24617517, 24617543, 24617595",
"SESSION_TIMEOUT_MESSAGE": "Failed to fetch data.please try again.",
"LERN_title": "Learnathon 2.0",
"LERN_MESSAGE": "Learnathon 2.0 has started from 20/09/2024 to 20/10/2024. You can now create and share your submissions!",
"CREATE_CONTENT": "Create Content",
"REQUEST_TO_CREATE": "Request to Create"
}
126 changes: 103 additions & 23 deletions packages/nulp_elite/src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
const { t } = useTranslation();

useEffect(() => {
console.log("items-------", items);
if (items.se_gradeLevels) {
setSubdomain(processString(items.se_gradeLevels[0]));
} else if (items.gradeLevel) {
Expand Down Expand Up @@ -196,29 +197,108 @@ export default function BoxCard({ items, index, onClick, continueLearning }) {
{items.name}
</Typography>
)}
{items.organisation && items.organisation.length > 0 && (
<Tooltip
title={
items.organisation.length > 1
? items.organisation.join(', ')
: items.organisation[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{ fontSize: "11px", padding: "10px 0", textAlign: "left" }}
>
<Box className="cardLabelEllips">
{items.organisation.length === 1
? items.organisation[0]
: `${items.organisation[0]} + ${items.organisation.length - 1}`}
</Box>
</Typography>
</Tooltip>
)}
<Box
style={{
alignItems: "center",
justifyContent: "space-between",
display: "flex",
}}
>
<Box>
{" "}
{items.organisation && items.organisation.length > 0 && (
<Tooltip
title={
items.organisation.length > 1
? items.organisation.join(", ")
: items.organisation[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
textAlign: "left",
}}
>
<Box className="cardLabelEllips">
{items.organisation.length === 1
? items.organisation[0]
: `${items.organisation[0]} + ${
items.organisation.length - 1
}`}
</Box>
</Typography>
</Tooltip>
)}
</Box>
<Box>
{items?.medium ||
(items?.se_mediums && (
<>
{items?.medium && items.medium.length > 0 ? (
<Tooltip
title={
items.medium.length > 1
? items.medium.join(", ")
: items.medium[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
textAlign: "right",
}}
>
<Box className="cardLabelEllips">
{items.medium.length === 1
? items.medium[0]
: `${items.medium[0]} + ${items.medium.length - 1}`}
</Box>
</Typography>
</Tooltip>
) : (
<Tooltip
title={
items.se_mediums.length > 1
? items.se_mediums.join(", ")
: items.se_mediums[0]
}
arrow
placement="top"
>
<Typography
variant="body2"
color="#5B5B5B"
style={{
fontSize: "11px",
padding: "10px 0",
textAlign: "right",
}}
>
<Box className="cardLabelEllips">
{items.se_mediums.length === 1
? items.se_mediums[0]
: `${items.se_mediums[0]} + ${
items.se_mediums.length - 1
}`}
</Box>
</Typography>
</Tooltip>
)}
</>
))}
</Box>
</Box>
</CardContent>
{(items?.board ||
items?.gradeLevel ||
Expand Down
8 changes: 2 additions & 6 deletions packages/nulp_elite/src/pages/registration/Otp.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,9 @@ const Otp = () => {
const age = new Date().getFullYear() - birthYear;
const tncText =
age < 18 ? (
<span>
{t("As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE")}
</span>
<span>{t("As_A_PATENT_GUARDIAN_ACCEPT_THE_NULP_TERMS_OF_USE")}</span>
) : (
<span>
{t("ACCEPT_THE_NULP_TERMS_OF_USE")}
</span>
<span>{t("ACCEPT_THE_NULP_TERMS_OF_USE")}</span>
);
const handleCheckboxChange = (event) => {
setIsChecked(event.target.checked);
Expand Down

0 comments on commit 845bf4f

Please sign in to comment.