Skip to content

Commit

Permalink
updated the dss full module card component
Browse files Browse the repository at this point in the history
  • Loading branch information
jagankumar-egov authored Nov 16, 2024
1 parent 467cf06 commit 4276a66
Showing 1 changed file with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@


import React from "react";
import { useHistory } from "react-router-dom";
import { Button, LandingPageCard, } from "@egovernments/digit-ui-components";
import React, { Fragment } from "react";
import { ArrowRightInbox } from "./svgindex";
import { useHistory, useLocation, Link } from "react-router-dom";


/**
* EmployeeModuleCard - A New reusable card component to display module information with KPIs, links, and actions.
Expand Down Expand Up @@ -84,4 +86,39 @@ const EmployeeModuleCard = ({
return <LandingPageCard className={className} buttonSize={buttonSize} {...propsForModuleCard} />;
};

export default EmployeeModuleCard;


const ModuleCardFullWidth = ({ moduleName, links = [], isCitizen = false, className, styles, headerStyle, subHeader, subHeaderLink }) => {
return (
<div className={className ? className : "employeeCard card-home customEmployeeCard home-action-cards"} style={styles ? styles : {}}>
<div className="complaint-links-container" style={{ padding: "10px" }}>
<div className="header" style={isCitizen ? { padding: "0px" } : headerStyle}>
<span className="text removeHeight">{moduleName}</span>
<span className="link">
<a href={subHeaderLink}>
<span className={"inbox-total"} style={{ display: "flex", alignItems: "center", color: "#F47738", fontWeight: "bold" }} onClick={()=>history.push(`${link}`)}>
{subHeader || "-"}
<span style={{ marginLeft: "10px" }}>
{" "}
<ArrowRightInbox />
</span>
</span>
</a>
</span>
</div>
<div className="body" style={{ margin: "0px", padding: "0px" }}>
<div className="links-wrapper" style={{ width: "100%", display: "flex", flexWrap: "wrap" }}>
{links.map(({ count, label, link }, index) => (
<span className="link full-employee-card-link" key={index}>
{link ? (link?.includes(`${window?.contextPath}/`)?<Link to={link}>{label}</Link>:<a href={link}>{label}</a>) : null}
</span>
))}
</div>
</div>
</div>
</div>
);
};


export { EmployeeModuleCard, ModuleCardFullWidth };

0 comments on commit 4276a66

Please sign in to comment.