Skip to content

Commit

Permalink
Merge pull request #606 from sonaliTekdi/webapp_changes
Browse files Browse the repository at this point in the history
Bug #225513,Bug #225930 - Mobile - Link in Other Details Section Appearing Outside the Section Boundaries,Inconsistent Button Positions on Poll Cards for Polls With and Without Keywords
  • Loading branch information
paritshivani authored Sep 12, 2024
2 parents 9972f36 + e0eaa29 commit 10d192a
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 105 deletions.
8 changes: 5 additions & 3 deletions packages/nulp_elite/src/pages/connections/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,11 @@ const Chat = ({
{receiverData[0].designation}
</Box>
</Box>
<IconButton onClick={onClose}>
<CloseIcon />
</IconButton>
<Box>
<IconButton onClick={onClose}>
<CloseIcon />
</IconButton>
</Box>
</Box>
)}
{!showCloseIcon && (
Expand Down
1 change: 1 addition & 0 deletions packages/nulp_elite/src/pages/content/joinCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1971,6 +1971,7 @@ className="lg-hide accordionBoxShadow"
href={courseData?.result?.content?.licenseDetails?.url}
target="_blank"
rel="noopener noreferrer"
style={{wordWrap: 'break-word'}}
>
{courseData?.result?.content?.licenseDetails?.url}
</a>
Expand Down
43 changes: 21 additions & 22 deletions packages/nulp_elite/src/pages/voting/pollsDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const pollsDetailes = () => {
{type === "live" ? (
<Box display="flex">
<DashboardOutlinedIcon style={{ paddingRight: "10px" }} />{" "}
{t("LIVE_POLLS")}
{t("LIVE_POLLS")}
</Box>
) : type === "closed" ? (
<Box display="flex">
Expand Down Expand Up @@ -298,42 +298,41 @@ const pollsDetailes = () => {
</Box>

<Box className="fs-14">
{items?.poll_keywords && (
{items?.poll_keywords && items.poll_keywords.length > 0 ? (
<>
{items.poll_keywords
.slice(0, 2)
.map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
{items.poll_keywords.slice(0, 2).map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
? keyword
: `${keyword} + ${items.poll_keywords.length - 2
}`}
</Button>
</Tooltip>
))}
</Button>
</Tooltip>
))}
{items.poll_keywords.length > 3 && (
<Tooltip
title={items.poll_keywords
.slice(3)
.join(", ")}
title={items.poll_keywords.slice(3).join(", ")}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{items.poll_keywords[2]} +{" "}
{items.poll_keywords.length - 3}
{items.poll_keywords[2]} + {items.poll_keywords.length - 3}
</Button>
</Tooltip>
)}
</>
) : (
<Box style={{ height: "60px" }}>
</Box>
)}
</Box>

</Box>
{/* <Box
className="card-img-container"
Expand Down Expand Up @@ -382,7 +381,7 @@ const pollsDetailes = () => {
handleOpenModal(items.poll_id, event)
}
>
{t("VIEW_STATUS")}{" "}
{t("VIEW_STATUS")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
<Button
Expand Down
144 changes: 64 additions & 80 deletions packages/nulp_elite/src/pages/voting/votingDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ const votingDashboard = () => {
</IconButton>
</InputAdornment>
}
label= {t("SEARCH_FOR_POLL")}
label={t("SEARCH_FOR_POLL")}
/>
</FormControl>
</Grid>
Expand Down Expand Up @@ -460,44 +460,43 @@ const votingDashboard = () => {
)}
</Box>
</Box>
<Box className={`fs-14 ${items?.poll_keywords && items.poll_keywords.length <= 0 ? 'visibility-hidden' : ''}`}>
{items?.poll_keywords && (
<Box className="fs-14">
{items?.poll_keywords && items.poll_keywords.length > 0 ? (
<>
{items.poll_keywords
.slice(0, 2)
.map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
{items.poll_keywords.slice(0, 2).map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
? keyword
: `${keyword} + ${
items.poll_keywords.length - 2
}`}
</Button>
</Tooltip>
))}
</Button>
</Tooltip>
))}
{items.poll_keywords.length > 3 && (
<Tooltip
title={items.poll_keywords
.slice(3)
.join(", ")}
title={items.poll_keywords.slice(3).join(", ")}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{items.poll_keywords[2]} +{" "}
{items.poll_keywords.length - 3}
{items.poll_keywords[2]} + {items.poll_keywords.length - 3}
</Button>
</Tooltip>
)}
</>
) : (
<Box style={{ height: "60px" }}>
</Box>
)}
</Box>

</Box>
</Grid>
<Grid
Expand Down Expand Up @@ -658,7 +657,7 @@ const votingDashboard = () => {
className="h2-title mt-30"
>
<Alert severity="info" style={{ margin: "10px 0" }}>
{t("NO_POLL_AVAILABLE_NOW")}
{t("NO_POLL_AVAILABLE_NOW")}
</Alert>
</Grid>
)}
Expand All @@ -672,7 +671,7 @@ const votingDashboard = () => {
>
<Box display="flex" alignItems="center" className="h3-title">
<DashboardOutlinedIcon style={{ paddingRight: "10px" }} />
{t("DRAFT_POLLS")}
{t("DRAFT_POLLS")}
</Box>
{!showAllDraft && visibleDraftPolls.length >= 3 && (
<Box>
Expand Down Expand Up @@ -788,43 +787,42 @@ const votingDashboard = () => {
</Box>
</Box>
<Box className="fs-14">
{items?.poll_keywords && (
{items?.poll_keywords && items.poll_keywords.length > 0 ? (
<>
{items.poll_keywords
.slice(0, 2)
.map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
{items.poll_keywords.slice(0, 2).map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
? keyword
: `${keyword} + ${
items.poll_keywords.length - 2
}`}
</Button>
</Tooltip>
))}
</Button>
</Tooltip>
))}
{items.poll_keywords.length > 3 && (
<Tooltip
title={items.poll_keywords
.slice(3)
.join(", ")}
title={items.poll_keywords.slice(3).join(", ")}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{items.poll_keywords[2]} +{" "}
{items.poll_keywords.length - 3}
{items.poll_keywords[2]} + {items.poll_keywords.length - 3}
</Button>
</Tooltip>
)}
</>
) : (
<Box style={{ height: "60px" }}>
</Box>
)}
</Box>

</Box>
{/* <Box
className="card-img-container"
Expand Down Expand Up @@ -947,7 +945,7 @@ const votingDashboard = () => {
className="custom-btn-primary ml-20"
onClick={() => handleViewAll(closedPolls, "closed")}
>
{t("VIEW_ALL")}
{t("VIEW_ALL")}
</Button>
</Box>
)}
Expand Down Expand Up @@ -1054,58 +1052,44 @@ const votingDashboard = () => {
</Box>
</Box>
<Box className="fs-14">
{items?.poll_keywords && (
<>
{items.poll_keywords
.slice(0, 2)
.map((keyword, index) => (
<Box className="fs-14">
{items?.poll_keywords && items.poll_keywords.length > 0 ? (
<>
{items.poll_keywords.slice(0, 2).map((keyword, index) => (
<Tooltip
key={index}
title={keyword}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{index < 2
{index < 2
? keyword
: `${keyword} + ${
items.poll_keywords.length - 2
}`}
</Button>
</Tooltip>
))}
{items.poll_keywords.length > 3 && (
<Tooltip
title={items.poll_keywords
.slice(3)
.join(", ")}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{items.poll_keywords.length > 3 && (
<Tooltip
title={items.poll_keywords.slice(3).join(", ")}
placement="right"
className="customlabeltwo cardLabelEllips"
>
<Button className="d-inline-block">
{items.poll_keywords[2]} +{" "}
{items.poll_keywords.length - 3}
</Button>
</Tooltip>
)}
</>
)}
</Button>
</Tooltip>
)}
</>
) : (
<Box className="d-inline-block" style={{ height: "60px" }} />
)}
</Box>
</Box>
</Box>
{/* <Box
className="card-img-container"
style={{ position: "inherit" }}
>
<img
src={
items.image
? items.image
: require("assets/default.png")
}
className="event-card-img"
alt="App Icon"
/>
</Box> */}
</CardContent>
<Box className="voting-text">
<Box>
Expand Down Expand Up @@ -1293,7 +1277,7 @@ const votingDashboard = () => {
)}
</Box>
<Box className="mt-9 h5-title">
{t("ENDED_ON")}:
{t("ENDED_ON")}:
<TodayOutlinedIcon
className="fs-14 pr-5"
style={{ verticalAlign: "middle" }}
Expand Down

0 comments on commit 10d192a

Please sign in to comment.