- fix PAGINATION error in transaction history
This commit is contained in:
parent
e2fea03de9
commit
c2d46f8b00
|
@ -856,15 +856,15 @@ export const DetailUser = observer(() => {
|
||||||
position={"top"}
|
position={"top"}
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: async (page, pageSize) => {
|
onChange: async (page, pageSize) => {
|
||||||
store.transaction.pageSize = pageSize;
|
store.transaction.pageSizeHistoryTopUp = pageSize;
|
||||||
store.transaction.page = page - 1;
|
store.transaction.pageHistoryTopUp = page - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await getData();
|
await getData();
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
},
|
},
|
||||||
pageSize: store.transaction.pageSize,
|
pageSize: store.transaction.pageSizeHistoryTopUp,
|
||||||
total: store.transaction.total_data,
|
total: store.transaction.total_dataHistoryTopUp,
|
||||||
current: store.transaction.page + 1,
|
current: store.transaction.pageHistoryTopUp + 1,
|
||||||
style: { marginBottom: "1rem", marginRight: "1rem" },
|
style: { marginBottom: "1rem", marginRight: "1rem" },
|
||||||
}}
|
}}
|
||||||
dataSource={store.transaction.dataHistoryTopUp}
|
dataSource={store.transaction.dataHistoryTopUp}
|
||||||
|
|
|
@ -629,17 +629,17 @@ export const Profile = observer(() => {
|
||||||
onChange: async (page, pageSize) => {
|
onChange: async (page, pageSize) => {
|
||||||
console.log(page, "Page");
|
console.log(page, "Page");
|
||||||
console.log(pageSize, "Page size");
|
console.log(pageSize, "Page size");
|
||||||
store.transaction.pageSize = pageSize;
|
store.transaction.pageSizeHistoryTopUpProfile = pageSize;
|
||||||
store.transaction.page = page - 1;
|
store.transaction.pageHistoryTopUpProfile = page - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await store.transaction.getDataHistoryTopUpProfile(
|
await store.transaction.getDataHistoryTopUpProfile(
|
||||||
store.authentication.profileData?.id
|
store.authentication.profileData?.id
|
||||||
);
|
);
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
},
|
},
|
||||||
pageSize: store.transaction.pageSize,
|
pageSize: store.transaction.pageSizeHistoryTopUpProfile,
|
||||||
total: store.transaction.total_dataHistoryTopUpProfile,
|
total: store.transaction.total_dataHistoryTopUpProfile,
|
||||||
current: store.transaction.page + 1,
|
current: store.transaction.pageHistoryTopUpProfile + 1,
|
||||||
style: { marginBottom: "1rem", marginRight: "1rem" },
|
style: { marginBottom: "1rem", marginRight: "1rem" },
|
||||||
}}
|
}}
|
||||||
style={{ padding: 0 }}
|
style={{ padding: 0 }}
|
||||||
|
@ -877,15 +877,15 @@ export const Profile = observer(() => {
|
||||||
onChange: async (page, pageSize) => {
|
onChange: async (page, pageSize) => {
|
||||||
console.log(page, "Page");
|
console.log(page, "Page");
|
||||||
console.log(pageSize, "Page size");
|
console.log(pageSize, "Page size");
|
||||||
store.transaction.pageSize = pageSize;
|
store.transaction.pageSizeHistorybillProfile = pageSize;
|
||||||
store.transaction.page = page - 1;
|
store.transaction.pageHistorybillProfile = page - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await store.transaction.getDataHistoryCheckBill();
|
await store.transaction.getDataHistoryCheckBill();
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
},
|
},
|
||||||
pageSize: store.transaction.pageSize,
|
pageSize: store.transaction.pageSizeHistorybillProfile,
|
||||||
total: store.transaction.total_dataHistorybillProfile,
|
total: store.transaction.total_dataHistorybillProfile,
|
||||||
current: store.transaction.page + 1,
|
current: store.transaction.pageHistorybillProfile + 1,
|
||||||
style: { marginBottom: "1rem", marginRight: "1rem" },
|
style: { marginBottom: "1rem", marginRight: "1rem" },
|
||||||
}}
|
}}
|
||||||
style={{ padding: 0 }}
|
style={{ padding: 0 }}
|
||||||
|
@ -924,10 +924,7 @@ export const Profile = observer(() => {
|
||||||
<br />
|
<br />
|
||||||
<small>
|
<small>
|
||||||
Transaction Date :{" "}
|
Transaction Date :{" "}
|
||||||
{format(
|
{ moment(new Date (item.created_at).toISOString().slice(0, -1)).format("MM-DD-YYYY dd-MM-yyyy") }
|
||||||
parseISO(item.transaction_date),
|
|
||||||
"dd-MM-yyyy"
|
|
||||||
)}
|
|
||||||
</small>{" "}
|
</small>{" "}
|
||||||
<br />
|
<br />
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user