Skip to content

Commit

Permalink
fix: Resolve heigh issues in Approval pages of Lead (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
getwithashish authored Jul 16, 2024
1 parent fb1d8e0 commit 0bf6bd6
Show file tree
Hide file tree
Showing 7 changed files with 1,009 additions and 999 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const AssetCountComponent = () => {
<div className="text-white text-sm sm:text-sm md:text-sm lg:text-sm xl:text-base font-display font-light text-left">
Inventory
</div>
<div className="text-white text-lg sm:text-lg md:text-xl lg:text-xl xl:text-2xl font-display font-semibold text-right m-4">
<div className="text-white text-lg sm:text-lg md:text-xl lg:text-xl xl:text-xl font-display font-semibold text-right m-4">
{assetTypes[currentAssetIndex]}
</div>
</div>
Expand Down
156 changes: 71 additions & 85 deletions exam_frontend/src/components/sidebar/SidebarComponentNew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const SidebarComponentNew = ({ children }: any) => {
try {
const base64Url = token.split(".")[1];
if (!base64Url) {
throw new Error("Invalid Jwt token: Missing base URL segment")
throw new Error("Invalid Jwt token: Missing base URL segment");
}
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
const jsonPayload = decodeURIComponent(
Expand Down Expand Up @@ -127,26 +127,32 @@ const SidebarComponentNew = ({ children }: any) => {
];

return (
<Layout style={{ marginLeft: 0, minHeight: '100vh' }}>
<Layout style={{ marginLeft: 0, minHeight: "100vh" }}>
<Sider
style={{
position: 'fixed',
height: '100%',
position: "fixed",
height: "100%",
zIndex: 110,
backgroundColor: '#161B21'
backgroundColor: "#161B21",
}}
width={265}
breakpoint="lg"
collapsedWidth="0"
>
<div className="bg-custom-400 rounded-lg h-screen m-2">
<div className="justify-center p-2items-center pt-6 mx-8">
<img className="h-8" src="../../public/images/experion technologies.png" alt="Company Logo" />
</div>
<Menu theme="dark" mode="vertical" className="text-base font-display items-center justify-between bg-transparent pt-10 mx-2 ">
<Menu.Item
icon={<PieChartOutlined />}
>
<img
className="h-8"
src="../../public/images/experion technologies.png"
alt="Company Logo"
/>
</div>
<Menu
theme="dark"
mode="vertical"
className="text-base font-display items-center justify-between bg-transparent pt-10 mx-2 "
>
<Menu.Item icon={<PieChartOutlined />}>
<Tooltip title="Dashboard">
<Link to="/exam/dashboard">Dashboard</Link>
</Tooltip>
Expand All @@ -160,23 +166,17 @@ const SidebarComponentNew = ({ children }: any) => {
>
<Tooltip title="To Create an Asset">Create Assets</Tooltip>
</Menu.Item>
<Menu.Item
icon={<EditOutlined />}
>
<Menu.Item icon={<EditOutlined />}>
<Tooltip title="To modify an Asset">
<Link to="/exam/updatable_assets">Modify Assets</Link>
</Tooltip>
</Menu.Item>
<Menu.Item
icon={<UserSwitchOutlined />}
>
<Menu.Item icon={<UserSwitchOutlined />}>
<Tooltip title="To allocate an Asset to an employee">
<Link to="/exam/assignable_asset">Allocate Assets</Link>
</Tooltip>
</Menu.Item>
<Menu.Item
icon={<UserSwitchOutlined />}
>
<Menu.Item icon={<UserSwitchOutlined />}>
<Tooltip title="To deallocate an Asset from an employee">
<Link to="/exam/deallocate">Deallocate Assets</Link>
</Tooltip>
Expand All @@ -185,19 +185,15 @@ const SidebarComponentNew = ({ children }: any) => {
)}

{userRole === "LEAD" && (
<Menu.Item
icon={<EditOutlined />}
>
<Menu.Item icon={<EditOutlined />}>
<Tooltip title="To delete an Asset">
<Link to="/exam/updatable_assets">Delete Assets</Link>
</Tooltip>
</Menu.Item>
)}

{userRole === "MANAGER" && (
<Menu.Item
icon={<EditOutlined />}
>
<Menu.Item icon={<EditOutlined />}>
<Tooltip title="View Deleted Assets">
<Link to="/exam/updatable_assets">Deleted Assets</Link>
</Tooltip>
Expand All @@ -211,34 +207,34 @@ const SidebarComponentNew = ({ children }: any) => {
title="Approve Assets"
className="bg-custom-400"
>
<Menu.Item
icon={<CarryOutOutlined />}
>
<Tooltip title="Approve Assets that are pending to be created">
<Link to="/exam/creation_requests">In Creation</Link>
</Tooltip>
<Menu.Item icon={<CarryOutOutlined />}>
<Link to="/exam/creation_requests">
<Tooltip title="Approve Assets that are pending to be created">
In Creation
</Tooltip>
</Link>
</Menu.Item>
<Menu.Item
icon={<CarryOutOutlined />}
>
<Tooltip title="Approve Assets that are pending to be updated">
<Link to="/exam/updation_requests">In Modification</Link>
</Tooltip>

<Menu.Item icon={<CarryOutOutlined />}>
<Link to="/exam/updation_requests">
<Tooltip title="Approve Assets that are pending to be updated">
In Modification
</Tooltip>
</Link>
</Menu.Item>
<Menu.Item
icon={<CarryOutOutlined />}
>
<Tooltip title="Approve Assets that are pending to be allocated">
<Link to="/exam/assign_requests">In Allocation</Link>
</Tooltip>

<Menu.Item icon={<CarryOutOutlined />}>
<Link to="/exam/assign_requests">
<Tooltip title="Approve Assets that are pending to be allocated">
In Allocation
</Tooltip>
</Link>
</Menu.Item>
</Menu.SubMenu>
)}

{userRole === "LEAD" && (
<Menu.Item
icon={<MailOutlined />}
>
<Menu.Item icon={<MailOutlined />}>
<Tooltip title="Show Assets that I have approved">
<Link to="/exam/my_approvals">My Approval History</Link>
</Tooltip>
Expand All @@ -250,79 +246,67 @@ const SidebarComponentNew = ({ children }: any) => {
key="sub1"
icon={<MailOutlined />}
title="My Requests"
style={{ backgroundColor: '#1D232C' }} // Adjust background color here
style={{ backgroundColor: "#1D232C" }} // Adjust background color here
>
<Menu.Item
icon={<CheckCircleOutlined />}
>
<Menu.Item icon={<CheckCircleOutlined />}>
<Tooltip title="Show my Asset Requests which have been approved">
<Link to="/exam/approved_requests">Approved</Link>
</Tooltip>
</Menu.Item>
<Menu.Item
icon={<CheckCircleOutlined />}
>
<Menu.Item icon={<CheckCircleOutlined />}>
<Tooltip title="Show the requests which are in pending status">
<Link to="/exam/pending_requests">Pending Requests</Link>
</Tooltip>
</Menu.Item>
<Menu.Item
icon={<CloseCircleOutlined />}
>
<Menu.Item icon={<CloseCircleOutlined />}>
<Tooltip title="Show my Asset creation and updation Requests which have been rejected">
<Link to="/exam/rejected_assets">Rejected Asset</Link>
</Tooltip>
</Menu.Item>
<Menu.Item
icon={<CloseCircleOutlined />}
>
<Menu.Item icon={<CloseCircleOutlined />}>
<Tooltip title="Show my Asset allocation Requests which have been rejected">
<Link to="/exam/rejected_allocation">Rejected Allocation</Link>
<Link to="/exam/rejected_allocation">
Rejected Allocation
</Link>
</Tooltip>
</Menu.Item>
</Menu.SubMenu>
)}

<Menu.Item
icon={<UserSwitchOutlined />}
>
<Menu.Item icon={<UserSwitchOutlined />}>
<Tooltip title="To view the expisky assets">
<Link to="/exam/expired_assets">Expired Assets</Link>
</Tooltip>
</Menu.Item>

<Menu.Item
icon={<CarryOutOutlined />}
>
<Menu.Item icon={<CarryOutOutlined />}>
<Tooltip title="Download user agent">
<Link to="#" onClick={handleDownload}>Download</Link>
<Link to="#" onClick={handleDownload}>
Download
</Link>
</Tooltip>
</Menu.Item>

<Menu.Item
icon={<RobotOutlined />}
>
<Menu.Item icon={<RobotOutlined />}>
<Tooltip title="AI Assistant">
<Link to="/exam/chat">AssetSense Ai</Link>
</Tooltip>
</Menu.Item>
</Menu>

</div>

</Sider>
<Layout style={{ marginLeft: 0, minHeight: '100vh' }}>
<Layout style={{ marginLeft: 0, minHeight: "100vh" }}>
<Header
style={{
position: 'fixed',
position: "fixed",
zIndex: 100,
width: '100vw',
backgroundColor: '#161B21',
padding: '0 28px',
height:'97px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
width: "100vw",
backgroundColor: "#161B21",
padding: "0 28px",
height: "97px",
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
<div className="flex w-screen lg:ml-60 sm:px-2 mx-2 bg-custom-400 rounded-lg items-center">
Expand Down Expand Up @@ -358,7 +342,7 @@ const SidebarComponentNew = ({ children }: any) => {
</div>
</div>
</Header>
<Content style={{ overflow: 'initial' }}>
<Content style={{ overflow: "initial" }}>
<Spin spinning={loading}>
{children}
<SideDrawerComponent
Expand Down Expand Up @@ -388,8 +372,10 @@ const SidebarComponentNew = ({ children }: any) => {
Privacy Policy
</FlowbiteFooter.Link>

<FlowbiteFooter.Link href="https://experionglobal.com/"
className="mr-3 mb-3 lg:mb-0 text-gray-400">
<FlowbiteFooter.Link
href="https://experionglobal.com/"
className="mr-3 mb-3 lg:mb-0 text-gray-400"
>
Contact
</FlowbiteFooter.Link>
</FlowbiteFooter.LinkGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ApprovedRequestPage = () => {
const heading = "My Approved Request";

return (
<div className="pt-8">
<div className="pt-8 h-full bg-custom-500" style={{ height: "100vh" }}>
<AssetTableHandler
isRejectedPage={false}
queryParamProp={queryParamProp}
Expand Down
2 changes: 1 addition & 1 deletion exam_frontend/src/pages/MyApprovals/MyApprovalPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const MyApprovalPage = () => {
let heading = "My approved Request";

return (
<div className="pt-8">
<div className="pt-8 h-full bg-custom-500" style={{ height: "100vh" }}>
<AssetTableHandler
isRejectedPage={false}
queryParamProp={queryParamProp}
Expand Down
Loading

0 comments on commit 0bf6bd6

Please sign in to comment.