Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #943 from egovernments/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pradeepkumarcm-egov authored Sep 11, 2024
2 parents abab04e + e5eec50 commit 7c80d63
Show file tree
Hide file tree
Showing 29 changed files with 1,067 additions and 212 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class _HouseholdListState extends State<HouseholdList> {
leftColumnWidth: width,
rightColumnWidth:
width * (householdProvider.collectionHeaderList.length - 1),
height: 58 + (52.0 * tableData.length + 1),
scrollPhysics: NeverScrollableScrollPhysics(),
height: 58 + (52.0 * (tableData.length < 10 ? tableData.length : 10 ) + 1),
scrollPhysics: BouncingScrollPhysics(),
);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class _HouseholdRegister extends State<HouseholdRegister>
color: Color.fromRGBO(238, 238, 238, 1),
padding: EdgeInsets.only(left: 8, right: 8),
height: constraints.maxHeight - 50,
child: CustomScrollView(slivers: [
child: CustomScrollView(
primary: false,
slivers: [
SliverList(
delegate: SliverChildListDelegate([
SizedBox(
Expand All @@ -99,6 +101,7 @@ class _HouseholdRegister extends State<HouseholdRegister>
),
Container(key: key, child: HouseholdCard()),
])),

SliverToBoxAdapter(child: HouseholdSearch())
])),
Align(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ class _HouseholdSearchState extends State<HouseholdSearch>
Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: SingleChildScrollView(
primary: false,
scrollDirection: Axis.horizontal,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(

tabList.length,
(index) => Padding(
padding: EdgeInsets.only(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,12 @@ export const UICustomizations = {
config: {
enabled: true,
select: (data) => {
const result = data?.MdmsRes?.tenant?.tenants?.filter(row => row?.divisionCode && row?.divisionName)?.map(row => {
return {
...row,
updatedCode:`${row.divisionName} - ${row?.name}`
}
});
const result = data?.MdmsRes?.tenant?.tenants?.filter(
(row) => row?.divisionCode && row?.divisionName
)?.map((row) => ({
...row,
updatedCode: `${row.divisionName} - ${row?.name}`,
}));
return result;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ body {
}

.app-iframe-wrapper{
left: 64px;
border-width: 0;
position: fixed;
top: 80px;

left: 3.8em;
border-width: 0;
position: fixed;
top: 5.5em;
}
.app-iframe{
width: 97%;
height: calc(100vh - 90px);

width: calc(100vw-4.1em);
height: calc(100vh - 5.7em);
border-width: 0;
position: fixed;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
}
}



.links-wrapper {
@apply pl-md py-sm text-text-btn;
.link {
Expand All @@ -51,6 +53,16 @@
}
}
}

.category-header{
font-weight: 500 !important;
margin-top: 0.5rem !important;
}

.category-item{
margin-left: 1rem !important;
margin-top: 0.25rem !important;
}
}

.MobilePopupHeadingWrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ img, video {
margin-bottom: 24px;
margin-left: 0; }
.employee .card-home {
width: 270px;
width: 300px;
margin-right: 10px;
margin-bottom: 10px; }
.employee .card-home-hrms {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const useDssMDMS = (tenantId, moduleCode, type, config) => {
const useDssDashboard = () => {
return useQuery("DSS_DASHBOARD", () => MdmsService.getDssDashboard(tenantId, moduleCode), config);
};

const _default = () => {
return useQuery([tenantId, moduleCode, type], () => MdmsService.getMultipleTypes(tenantId, moduleCode, type), config);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const EmployeeModuleCard = ({
<path d="M13 0L11.59 1.41L16.17 6H0V8H16.17L11.58 12.59L13 14L20 7L13 0Z" fill="#F47738" />
</svg>
);

return (
<div className={className ? className : "employeeCard customEmployeeCardWarning card-home home-action-cards"} style={styles ? styles : {}}>
<div className="complaint-links-container">
Expand All @@ -44,10 +44,72 @@ const EmployeeModuleCard = ({
))}
</div>
)}
<div className="links-wrapper" style={{ width: "80%" }}>
{links.map(({ count, label, link }, index) => (


<div className="links-wrapper" style={{ width: "100%" }}>


{links.reduce((acc, { count, label, link, category }, index) => {
const currentCategory = category;

// Check if category has changed or is the first item
if (!acc.currentCategory || acc.currentCategory !== currentCategory) {
acc.currentCategory = currentCategory;
acc.links.push({ category, items: [] }); // Create new category object
}

// Add link details to the current category
acc.links[acc.links.length - 1].items.push({ count, label, link });

return acc;
}, { currentCategory: null, links: [] }) // Initial accumulator state
.links.filter(({ items }) => items.length > 0) // Filter out categories with no items
.map(({ category, items }, index) => (
<>
{category && ( // Display category header if category exists
<div className="category-header">{category}</div>
)}
<div className="category-item">
{items.map((item, subIndex) => (
<div className="link-row" key={`${index}-${subIndex}`}>
<span className="link">
{ item.link && item.link?.includes("https") ? (
item.label.includes("Dashboard")?

<a href={item.link} target="_blank">
{item.label}
</a> :
<a href={item.link} target="">
{item.label}
</a>
) : (
<Link to={item.link}>{item.label}</Link>
)}
</span>
{item.count ? (
<>
{FsmHideCount ? null : (
<span className={"inbox-total"}>{item.count || "-"}</span>
)}
<Link to={item.link}>
<ArrowRightInbox />
</Link>
</>
) : null}
</div>
))}
</div>
</>
))}
</div>




{/* <div className="links-wrapper" style={{ width: "80%" }}>
{links.map(({ count, label, link,category }, index) => (
<span className="link" key={index}>
{link && link?.includes("https") ? (
{ link && link?.includes("https") ? (
label.includes("Dashboard")?<a href={link} target="_blank">
{label}
</a> :
Expand All @@ -67,7 +129,7 @@ const EmployeeModuleCard = ({
) : null}
</span>
))}
</div>
</div> */}
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 7c80d63

Please sign in to comment.