Skip to content

Commit 915f8e7

Browse files
fix: pagination move on the top records in reports
1 parent f38f5ea commit 915f8e7

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
@@ -1126,7 +1126,7 @@ const ReportTable = (props) => {
11261126
<Loader />
11271127
</div>
11281128
)}
1129-
<div className="p-2 w-full overflow-auto bg-base-100 text-base-content op-card shadow-lg">
1129+
<div className="p-2 w-full overflow-hidden bg-base-100 text-base-content op-card shadow-lg">
11301130
{isCelebration && (
11311131
<div className="relative z-[1000]">
11321132
<Confetti width={window.innerWidth} height={window.innerHeight} />
@@ -1169,8 +1169,8 @@ const ReportTable = (props) => {
11691169
</div>
11701170
<div
11711171
className={`${
1172-
isDashboard && props.List?.length > 0 ? "h-[317px]" : "h-full"
1173-
} w-full`}
1172+
isDashboard && props.List?.length > 0 ? "min-h-[317px]" : "h-full"
1173+
} overflow-auto w-full`}
11741174
>
11751175
<table className="op-table border-collapse w-full ">
11761176
<thead className="text-[14px]">
@@ -1206,48 +1206,50 @@ const ReportTable = (props) => {
12061206
</td>
12071207
<td className="px-4 py-2 ">{item?.Email || "-"}</td>
12081208
<td className="px-4 py-2">{item?.Phone || "-"}</td>
1209-
<td className="px-3 py-2 text-white grid grid-cols-2">
1210-
{props.actions?.length > 0 &&
1211-
props.actions.map((act, index) => (
1212-
<button
1213-
key={index}
1214-
onClick={() => handleActionBtn(act, item)}
1215-
title={t(`btnLabel.${act.hoverLabel}`)}
1216-
className={`${
1217-
act?.btnColor ? act.btnColor : ""
1218-
} op-btn op-btn-sm`}
1209+
<td className="px-3 py-2">
1210+
<div className="text-base-content min-w-max flex flex-row gap-x-2 gap-y-1 justify-start items-center">
1211+
{props.actions?.length > 0 &&
1212+
props.actions.map((act, index) => (
1213+
<button
1214+
key={index}
1215+
onClick={() => handleActionBtn(act, item)}
1216+
title={t(`btnLabel.${act.hoverLabel}`)}
1217+
className={`${
1218+
act?.btnColor ? act.btnColor : ""
1219+
} op-btn op-btn-sm`}
1220+
>
1221+
<i className={act.btnIcon}></i>
1222+
</button>
1223+
))}
1224+
{isDeleteModal[item.objectId] && (
1225+
<ModalUi
1226+
isOpen
1227+
title={"Delete Contact"}
1228+
handleClose={handleClose}
12191229
>
1220-
<i className={act.btnIcon}></i>
1221-
</button>
1222-
))}
1223-
{isDeleteModal[item.objectId] && (
1224-
<ModalUi
1225-
isOpen
1226-
title={"Delete Contact"}
1227-
handleClose={handleClose}
1228-
>
1229-
<div className="m-[20px]">
1230-
<div className="text-lg font-normal text-black">
1231-
{t("contact-delete-alert")}
1232-
</div>
1233-
<hr className="bg-[#ccc] mt-4 " />
1234-
<div className="flex items-center mt-3 gap-2 text-white">
1235-
<button
1236-
onClick={() => handleDelete(item)}
1237-
className="op-btn op-btn-primary"
1238-
>
1239-
{t("yes")}
1240-
</button>
1241-
<button
1242-
onClick={handleClose}
1243-
className="op-btn op-btn-secondary"
1244-
>
1245-
{t("no")}
1246-
</button>
1230+
<div className="m-[20px]">
1231+
<div className="text-lg font-normal text-black">
1232+
{t("contact-delete-alert")}
1233+
</div>
1234+
<hr className="bg-[#ccc] mt-4 " />
1235+
<div className="flex items-center mt-3 gap-2 text-white">
1236+
<button
1237+
onClick={() => handleDelete(item)}
1238+
className="op-btn op-btn-primary"
1239+
>
1240+
{t("yes")}
1241+
</button>
1242+
<button
1243+
onClick={handleClose}
1244+
className="op-btn op-btn-secondary"
1245+
>
1246+
{t("no")}
1247+
</button>
1248+
</div>
12471249
</div>
1248-
</div>
1249-
</ModalUi>
1250-
)}
1250+
</ModalUi>
1251+
)}
1252+
</div>
12511253
</td>
12521254
</tr>
12531255
) : (
@@ -1528,7 +1530,7 @@ const ReportTable = (props) => {
15281530
</td>
15291531
)}
15301532
<td className="px-2 py-2">
1531-
<div className="text-base-content flex flex-row gap-x-2 gap-y-1 justify-start items-center">
1533+
<div className="text-base-content min-w-max flex flex-row gap-x-2 gap-y-1 justify-start items-center">
15321534
{props.actions?.length > 0 &&
15331535
props.actions.map((act, index) =>
15341536
props.ReportName === "Templates" ? (

0 commit comments

Comments
 (0)