fix: some tab not available in menu

This commit is contained in:
prafull-opensignlabs
2024-07-19 18:00:53 +05:30
parent a1f4e9ea74
commit 13d161e3c8
3 changed files with 85 additions and 64 deletions
File diff suppressed because one or more lines are too long
@@ -81,7 +81,21 @@ const Sidebar = ({ isOpen, closeSidebar }) => {
});
setmenuList(newSidebarList);
} else {
setmenuList(sidebarList);
if (!isEnableSubscription) {
const newSidebarList = sidebarList.map((item) => {
if (item.title === "Settings") {
// Make a shallow copy of the item
const newItem = { ...item };
const arr = newItem.children.slice(0, 1);
newItem.children = arr;
return newItem;
}
return item;
});
setmenuList(newSidebarList);
} else {
setmenuList(sidebarList);
}
}
}
} catch (e) {
@@ -1056,7 +1056,7 @@ const ReportTable = (props) => {
<Loader />
</div>
)}
<div className="p-2 w-full bg-base-100 text-base-content op-card shadow-lg">
<div className="p-2 w-full overflow-auto bg-base-100 text-base-content op-card shadow-lg">
{isCelebration && (
<div className="relative z-[1000]">
<Confetti width={window.innerWidth} height={window.innerHeight} />
@@ -1100,9 +1100,9 @@ const ReportTable = (props) => {
<div
className={`${
isDashboard && props.List?.length > 0 ? "h-[317px]" : "h-full"
} overflow-x-auto w-full`}
} w-full`}
>
<table className="op-table border-collapse w-full">
<table className="op-table border-collapse w-full ">
<thead className="text-[14px]">
<tr className="border-y-[1px]">
{props.heading?.map((item, index) => (
@@ -1396,7 +1396,7 @@ const ReportTable = (props) => {
)}
{isOption[item.objectId] &&
act.action === "option" && (
<ul className="fixed right-14 top-auto z-[70] w-max op-dropdown-content op-menu shadow bg-base-100 text-base-content rounded-box">
<ul className="absolute -right-1 top-auto z-[70] w-max op-dropdown-content op-menu shadow bg-base-100 text-base-content rounded-box">
{act.subaction?.map((subact) => (
<li
key={subact.btnId}
@@ -1448,7 +1448,7 @@ const ReportTable = (props) => {
)}
{isOption[item.objectId] &&
act.action === "option" && (
<ul className="fixed right-14 top-auto z-[70] w-max op-dropdown-content op-menu shadow bg-base-100 text-base-content rounded-box">
<ul className="absolute -right-1 top-auto z-[70] w-max op-dropdown-content op-menu shadow bg-base-100 text-base-content rounded-box">
{act.subaction?.map((subact) => (
<li
key={subact.btnId}