Skip to content

Commit

Permalink
Merge pull request #645 from sonaliTekdi/webapp_changes
Browse files Browse the repository at this point in the history
Bug #227342 - [Desktop => course detail page] Back button is missing on course detail page
  • Loading branch information
paritshivani authored Sep 24, 2024
2 parents 120f486 + 71d2da9 commit a55cf1a
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 71 deletions.
4 changes: 3 additions & 1 deletion packages/nulp_elite/src/components/EventCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export default function EventCard({ items, index, onClick }) {
>
{/* <CardMedia className="card-media" title="green iguana" /> */}
{/* <div onClick={onClick} className="card-div"></div> */}
<CardContent className="d-flex">
<CardContent className="d-flex" style={{
justifyContent: "space-between",
}}>
<Box>
{items.name && (
<Typography gutterBottom className="mt-10 event-title" >
Expand Down
153 changes: 86 additions & 67 deletions packages/nulp_elite/src/pages/content/joinCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,19 +598,29 @@ const JoinCourse = () => {
if (isNotStarted) {
return (
<Box>
<Button
onClick={() => handleLinkClick(childnode)}
className="custom-btn-primary mr-5"
>
{t("START_LEARNING")}
</Button>
{!isCompleted &&
<Button
onClick={handleLeaveCourseClick} // Open confirmation dialog
className="custom-btn-danger"
> {t("LEAVE_COURSE")}
<div style={{ display: "flex", justifyContent: "space-between" }}>
<Box> <Button
onClick={() => handleGoBack()}
className="custom-btn-primary mr-5"
>
{t("BACK")}
</Button>
}
</Box>
<Box> <Button
onClick={() => handleLinkClick(childnode)}
className="custom-btn-primary mr-5"
>
{t("START_LEARNING")}
</Button>
{!isCompleted &&
<Button
onClick={handleLeaveCourseClick} // Open confirmation dialog
className="custom-btn-danger"
> {t("LEAVE_COURSE")}
</Button>
}</Box>
</div>


{showConfirmation && (
<Dialog open={showConfirmation} onClose={handleConfirmationClose}>
Expand Down Expand Up @@ -642,65 +652,74 @@ const JoinCourse = () => {
</Box>
);
} else {
return (
return (
<>
<Box>
<Button
<Box>
<div style={{ display: "flex", justifyContent: "space-between" }}>
<Box> <Button
onClick={() => handleGoBack()}
className="custom-btn-primary mr-5"
>
{t("BACK")}
</Button>
</Box>
<Box>
<Button disabled={isCompleted}

disabled={ isCompleted}
onClick={() =>
handleLinkClick(
ContinueLearning ?? NotConsumedContent ?? childnode
)
}
className="custom-btn-primary mr-5"
>
{t("CONTINUE_LEARNNG")}
</Button>
{!isCompleted &&
<Button
onClick={handleLeaveCourseClick} // Open confirmation dialog
className="custom-btn-danger"
> {t("LEAVE_COURSE")}
</Button>
} </Box>
</div>

onClick={() =>
handleLinkClick(
ContinueLearning ?? NotConsumedContent ?? childnode
)
}
className="custom-btn-primary mr-5"
>
{t("CONTINUE_LEARNNG")}
</Button>
{!isCompleted &&
<Button
onClick={handleLeaveCourseClick} // Open confirmation dialog
className="custom-btn-danger"
> {t("LEAVE_COURSE")}
</Button>
}

{showConfirmation && (
<Dialog open={showConfirmation} onClose={handleConfirmationClose}>
<DialogTitle>
{t("LEAVE_COURSE_CONFIRMATION_TITLE")}
</DialogTitle>
<DialogContent>
<DialogContentText>
{t("LEAVE_COURSE_CONFIRMATION_MESSAGE")}
</DialogContentText>
</DialogContent>
<DialogActions>
<Button
onClick={handleConfirmationClose}
className="custom-btn-default"
>
{t("CANCEL")}
</Button>
<Button
onClick={handleLeaveConfirmed}
className="custom-btn-primary"
autoFocus
>
{t("LEAVE_COURSE")}
</Button>

</DialogActions>
</Dialog>
)}
</Box>
{isCompleted &&
<Box>
{t("COURSE_SUCCESSFULLY_COMPLETED")}

{showConfirmation && (
<Dialog open={showConfirmation} onClose={handleConfirmationClose}>
<DialogTitle>
{t("LEAVE_COURSE_CONFIRMATION_TITLE")}
</DialogTitle>
<DialogContent>
<DialogContentText>
{t("LEAVE_COURSE_CONFIRMATION_MESSAGE")}
</DialogContentText>
</DialogContent>
<DialogActions>
<Button
onClick={handleConfirmationClose}
className="custom-btn-default"
>
{t("CANCEL")}
</Button>
<Button
onClick={handleLeaveConfirmed}
className="custom-btn-primary"
autoFocus
>
{t("LEAVE_COURSE")}
</Button>

</DialogActions>
</Dialog>
)}
</Box>
}

{isCompleted &&
<Box>
{t("COURSE_SUCCESSFULLY_COMPLETED")}
</Box>
}

</>
);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/nulp_elite/src/pages/voting/votingDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ const votingDashboard = () => {
className="d-flex h6-title mt-30"
style={{ color: "#484848" }}
>
<Box className="d-flex alignItems-center fs-13">
<Box className="d-flex alignItems-center">
<TodayOutlinedIcon className="fs-14 pr-5" />
{moment(items.start_date).format(
"dddd, MMMM Do YYYY, h:mm:ss a"
Expand Down Expand Up @@ -759,7 +759,7 @@ const votingDashboard = () => {
className="d-flex h6-title mt-30"
style={{ color: "#484848" }}
>
<Box className="d-flex alignItems-center fs-13">
<Box className="d-flex alignItems-center">
<TodayOutlinedIcon className="fs-14 pr-5" />
{moment(items?.start_date).format(
"dddd, MMMM Do YYYY, h:mm:ss a"
Expand Down Expand Up @@ -1011,7 +1011,7 @@ const votingDashboard = () => {
className="d-flex h6-title mt-30"
style={{ color: "#484848" }}
>
<Box className="d-flex alignItems-center fs-13">
<Box className="d-flex alignItems-center">
<TodayOutlinedIcon className="fs-14 pr-5" />
{moment(items?.start_date).format(
"dddd, MMMM Do YYYY, h:mm:ss a"
Expand Down

0 comments on commit a55cf1a

Please sign in to comment.