Skip to content

Commit 04c228c

Browse files
Merge pull request #1249 from OpenSignLabs/validation
fix: pagination move on the top records in reports
2 parents 218cea0 + 915f8e7 commit 04c228c

File tree

1 file changed

+46
-44
lines changed

1 file changed

+46
-44
lines changed

apps/OpenSign/src/primitives/GetReportDisplay.js

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ const ReportTable = (props) => {
11341134
<Loader />
11351135
</div>
11361136
)}
1137-
<div className="p-2 w-full overflow-auto bg-base-100 text-base-content op-card shadow-lg">
1137+
<div className="p-2 w-full overflow-hidden bg-base-100 text-base-content op-card shadow-lg">
11381138
{isCelebration && (
11391139
<div className="relative z-[1000]">
11401140
<Confetti
@@ -1182,8 +1182,8 @@ const ReportTable = (props) => {
11821182
</div>
11831183
<div
11841184
className={`${
1185-
isDashboard && props.List?.length > 0 ? "h-[317px]" : "h-full"
1186-
} w-full`}
1185+
isDashboard && props.List?.length > 0 ? "min-h-[317px]" : "h-full"
1186+
} overflow-auto w-full`}
11871187
>
11881188
<table className="op-table border-collapse w-full ">
11891189
<thead className="text-[14px]">
@@ -1219,48 +1219,50 @@ const ReportTable = (props) => {
12191219
</td>
12201220
<td className="px-4 py-2 ">{item?.Email || "-"}</td>
12211221
<td className="px-4 py-2">{item?.Phone || "-"}</td>
1222-
<td className="px-3 py-2 text-white grid grid-cols-2">
1223-
{props.actions?.length > 0 &&
1224-
props.actions.map((act, index) => (
1225-
<button
1226-
key={index}
1227-
onClick={() => handleActionBtn(act, item)}
1228-
title={t(`btnLabel.${act.hoverLabel}`)}
1229-
className={`${
1230-
act?.btnColor ? act.btnColor : ""
1231-
} op-btn op-btn-sm`}
1222+
<td className="px-3 py-2">
1223+
<div className="text-base-content min-w-max flex flex-row gap-x-2 gap-y-1 justify-start items-center">
1224+
{props.actions?.length > 0 &&
1225+
props.actions.map((act, index) => (
1226+
<button
1227+
key={index}
1228+
onClick={() => handleActionBtn(act, item)}
1229+
title={t(`btnLabel.${act.hoverLabel}`)}
1230+
className={`${
1231+
act?.btnColor ? act.btnColor : ""
1232+
} op-btn op-btn-sm`}
1233+
>
1234+
<i className={act.btnIcon}></i>
1235+
</button>
1236+
))}
1237+
{isDeleteModal[item.objectId] && (
1238+
<ModalUi
1239+
isOpen
1240+
title={"Delete Contact"}
1241+
handleClose={handleClose}
12321242
>
1233-
<i className={act.btnIcon}></i>
1234-
</button>
1235-
))}
1236-
{isDeleteModal[item.objectId] && (
1237-
<ModalUi
1238-
isOpen
1239-
title={"Delete Contact"}
1240-
handleClose={handleClose}
1241-
>
1242-
<div className="m-[20px]">
1243-
<div className="text-lg font-normal text-black">
1244-
{t("contact-delete-alert")}
1245-
</div>
1246-
<hr className="bg-[#ccc] mt-4 " />
1247-
<div className="flex items-center mt-3 gap-2 text-white">
1248-
<button
1249-
onClick={() => handleDelete(item)}
1250-
className="op-btn op-btn-primary"
1251-
>
1252-
{t("yes")}
1253-
</button>
1254-
<button
1255-
onClick={handleClose}
1256-
className="op-btn op-btn-secondary"
1257-
>
1258-
{t("no")}
1259-
</button>
1243+
<div className="m-[20px]">
1244+
<div className="text-lg font-normal text-black">
1245+
{t("contact-delete-alert")}
1246+
</div>
1247+
<hr className="bg-[#ccc] mt-4 " />
1248+
<div className="flex items-center mt-3 gap-2 text-white">
1249+
<button
1250+
onClick={() => handleDelete(item)}
1251+
className="op-btn op-btn-primary"
1252+
>
1253+
{t("yes")}
1254+
</button>
1255+
<button
1256+
onClick={handleClose}
1257+
className="op-btn op-btn-secondary"
1258+
>
1259+
{t("no")}
1260+
</button>
1261+
</div>
12601262
</div>
1261-
</div>
1262-
</ModalUi>
1263-
)}
1263+
</ModalUi>
1264+
)}
1265+
</div>
12641266
</td>
12651267
</tr>
12661268
) : (
@@ -1541,7 +1543,7 @@ const ReportTable = (props) => {
15411543
</td>
15421544
)}
15431545
<td className="px-2 py-2">
1544-
<div className="text-base-content flex flex-row gap-x-2 gap-y-1 justify-start items-center">
1546+
<div className="text-base-content min-w-max flex flex-row gap-x-2 gap-y-1 justify-start items-center">
15451547
{props.actions?.length > 0 &&
15461548
props.actions.map((act, index) =>
15471549
props.ReportName === "Templates" ? (

0 commit comments

Comments
 (0)