Skip to content

Commit

Permalink
Merge pull request #662 from mahajanmahesh935/category
Browse files Browse the repository at this point in the history
Bug #228125 : course detail page] Content under the module is not vis…
  • Loading branch information
paritshivani authored Oct 3, 2024
2 parents 9defc3b + 78e952d commit ed28a51
Showing 1 changed file with 45 additions and 21 deletions.
66 changes: 45 additions & 21 deletions packages/nulp_elite/src/pages/content/joinCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1605,16 +1605,31 @@ const JoinCourse = () => {
>
{faqIndex.name}
</AccordionSummary>
{faqIndex?.children?.map((faqIndexname) => (
<Link
href="#"
underline="none"
style={{ verticalAlign: "super" }}
onClick={() =>
handleLinkClick(faqIndexname.identifier)
}
className="h6-title"
>

<AccordionDetails style={{ paddingLeft: "35px" }} className="border-bottom">
{/* If it's not a content collection, render it like a clickable child */}
{faqIndex.mimeType !== "application/vnd.ekstep.content-collection" ? (
<Link
href="#"
underline="none"
style={{ verticalAlign: "super" }}
onClick={() => handleLinkClick(faqIndex.identifier)}
className="h6-title"
>
{faqIndex.name}
{completedContents.includes(faqIndex.identifier) && (
<CheckCircleIcon
style={{
color: "green",
fontSize: "24px",
paddingLeft: "10px",
float: "right",
}}
/>
)}
</Link>
) : (
faqIndex?.children?.map((faqIndexname) => (
<AccordionDetails
key={faqIndexname.identifier || faqIndexname.name}
className="border-bottom"
Expand All @@ -1629,10 +1644,15 @@ const JoinCourse = () => {
{faqIndexname.name}
</span>
) : (
<Box> {faqIndexname.name}
{completedContents.includes(
faqIndexname.identifier
) && (
<Link
href="#"
underline="none"
style={{ verticalAlign: "super" }}
onClick={() => handleLinkClick(faqIndexname.identifier)}
className="h6-title"
>
{faqIndexname.name}
{completedContents.includes(faqIndexname.identifier) && (
<CheckCircleIcon
style={{
color: "green",
Expand All @@ -1641,10 +1661,10 @@ const JoinCourse = () => {
float: "right",
}}
/>
)}</Box>


)}
</Link>
)}

{faqIndexname.children &&
faqIndexname.children.length > 0 && (
<div style={{ paddingLeft: "20px" }}>
Expand Down Expand Up @@ -1747,10 +1767,14 @@ const JoinCourse = () => {
</div>
)}
</AccordionDetails>
</Link>
))}
</Accordion>
))}
))
)}
</AccordionDetails>
</Accordion>
))}



</AccordionDetails>
</Accordion>
<Box
Expand Down

0 comments on commit ed28a51

Please sign in to comment.