Skip to content

Commit

Permalink
Merge pull request #642 from sonaliTekdi/webapp_changes
Browse files Browse the repository at this point in the history
Bug #226562 -  On the portal its not showing learning report data , Bug #227344 - [webapp => poll] allignment are not proper on poll card
  • Loading branch information
paritshivani authored Sep 23, 2024
2 parents bd1c79c + c6089bc commit 05bfd5e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 33 deletions.
4 changes: 2 additions & 2 deletions packages/nulp_elite/src/components/VotingCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function VotingCard({ items, index, onClick }) {
>
<CardContent>
<Box>
<Box className="d-flex jc-bw">
<Box className="d-flex">
<Grid item xs={12} md={8} lg={8}>
{items.title && (
<Typography
Expand Down Expand Up @@ -193,7 +193,7 @@ export default function VotingCard({ items, index, onClick }) {
</Grid>
</Box>
<Box className="d-flex h6-title mt-10" style={{ color: "#484848" }}>
<Box className="d-flex jc-bw alignItems-center">
<Box className="d-flex alignItems-center">
<TodayOutlinedIcon className="fs-12 pr-5" />
{moment(items?.start_date).format(
"dddd, MMMM Do YYYY, h:mm:ss a"
Expand Down
54 changes: 23 additions & 31 deletions packages/nulp_elite/src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { Collapse, List } from "@mui/material";
import NotificationPopup from "./Notification";

function Header({ globalSearchQuery }) {
const navigate = useNavigate();
const { t } = useTranslation();
const [language, setLanguage] = useState(
localStorage.getItem("lang") ? localStorage.getItem("lang") : "en"
Expand All @@ -50,10 +51,8 @@ function Header({ globalSearchQuery }) {
const [anchorElNav, setAnchorElNav] = React.useState(null);
const [anchorElUser, setAnchorElUser] = React.useState(null);
const [anchorElNotify, setAnchorElNotify] = React.useState(null);
const [anchorElPoll, setAnchorElPoll] = React.useState(null);

const [searchQuery, setSearchQuery] = useState(globalSearchQuery || "");
const navigate = useNavigate();
const _userId = util.userId();
const [userData, setUserData] = useState(null);
const [roles, setRoles] = useState([]);
Expand All @@ -65,18 +64,6 @@ function Header({ globalSearchQuery }) {
const [openNotification, setOpenNotification] = useState(false);
const [notificationCount, setNotificationCount] = useState(0);


const handleTooltipClose = () => {
setOpen(false);
};

const handleTooltipOpen = () => {
setOpen(true);
};

const handleSelectClick = () => {
setOpen(false);
};
const handleSubmenuToggle = () => {
setOpenSubmenu(!openSubmenu);

Expand Down Expand Up @@ -202,7 +189,6 @@ function Header({ globalSearchQuery }) {
}
};
const [scrolled, setScrolled] = useState(false);
// const navigate = useNavigate();

const handleResize = () => {
setIsMobile(window.innerWidth <= 767);
Expand All @@ -224,12 +210,13 @@ function Header({ globalSearchQuery }) {
const roleNames =
userData?.result?.response?.roles.map((role) => role.role) || [];

const textFieldStyle = {
fontSize: '12px',
backgroundColor: searchQuery ? '#065872' : 'transparent',
boxShadow: searchQuery ? '0 2px 4px rgba(0, 0, 0, 0.2)' : 'none',
color:searchQuery? '#fff' :"#000"
};
const textFieldStyle = {
fontSize: '12px',
backgroundColor: searchQuery ? '#065872' : 'transparent',
boxShadow: searchQuery ? '0 2px 4px rgba(0, 0, 0, 0.2)' : 'none',
color: searchQuery ? '#fff' : "#000"
};

return (
<>
<Box
Expand Down Expand Up @@ -280,11 +267,11 @@ function Header({ globalSearchQuery }) {
aria-label="search"
onClick={onGlobalSearch}
>
<SearchIcon style={{ color: searchQuery ? '#fff' : '#000' }} />
<SearchIcon style={{ color: searchQuery ? '#fff' : '#000' }} />
</IconButton>
),
style: {
color: searchQuery ? '#fff' : '#000',
color: searchQuery ? '#fff' : '#000',
},
}}
/>
Expand Down Expand Up @@ -882,15 +869,17 @@ function Header({ globalSearchQuery }) {
href={routeConfig.ROUTES.LEARNING_REPORT}
underline="none"
textAlign="center"
target="_blank"
>
<MenuItem className="ml-10">

<MenuItem
className="ml-10"
onClick={() => {
sessionStorage.setItem("urlPath", "learningreport");
window.open(routeConfig.ROUTES.LEARNING_REPORT, "_blank");
}}
>
{t("LEARNING_REPORT")}

</MenuItem>
</Link>

</List>
</Collapse>
<MenuItem
Expand Down Expand Up @@ -952,10 +941,13 @@ function Header({ globalSearchQuery }) {
href={routeConfig.ROUTES.LEARNING_REPORT}
underline="none"
textAlign="center"
target="_blank"
>
<MenuItem className="ml-10">

<MenuItem className="ml-10"
onClick={() => {
sessionStorage.setItem("urlPath", "learningreport");
window.open(routeConfig.ROUTES.LEARNING_REPORT, "_blank");
}}>

{t("LEARNING_REPORT")}

</MenuItem>
Expand Down

0 comments on commit 05bfd5e

Please sign in to comment.