Bug Fixing
This commit is contained in:
parent
a6ce4a8c53
commit
947d6cea0a
|
@ -284,21 +284,11 @@ export const ProductComponent = observer((props) => {
|
|||
<div>
|
||||
{store.ui.mediaQuery.isDesktop && (
|
||||
<Table
|
||||
style={
|
||||
// store.authentication.userData.role === "Admin"
|
||||
// ? {
|
||||
{
|
||||
cursor: "pointer",
|
||||
textAlign: "center",
|
||||
width: store.ui.mediaQuery.isMobile ? 250 : "",
|
||||
}
|
||||
|
||||
// }
|
||||
// : {
|
||||
// textAlign: "center",
|
||||
// width: store.ui.mediaQuery.isMobile ? 250 : "",
|
||||
// }
|
||||
}
|
||||
style={{
|
||||
cursor: "pointer",
|
||||
textAlign: "center",
|
||||
width: store.ui.mediaQuery.isMobile ? 250 : "",
|
||||
}}
|
||||
columns={columns}
|
||||
dataSource={
|
||||
store.authentication.userData.role === "Admin Partner"
|
||||
|
|
|
@ -741,6 +741,7 @@ export const DetailUser = observer(() => {
|
|||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||
onClick={() => {
|
||||
store.transaction.visibleModalFilterTransaction = true;
|
||||
store.transaction.page=0;
|
||||
setAction(true);
|
||||
}}
|
||||
>
|
||||
|
@ -777,6 +778,7 @@ export const DetailUser = observer(() => {
|
|||
style={{ marginBottom: "1rem" }}
|
||||
onClick={() => {
|
||||
store.transaction.visibleModalFilterTransaction = true;
|
||||
store.transaction.page=0;
|
||||
setAction(true);
|
||||
}}
|
||||
>
|
||||
|
@ -858,6 +860,7 @@ export const DetailUser = observer(() => {
|
|||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||
onClick={() => {
|
||||
store.transaction.visibleModalFilterTransaction = true;
|
||||
store.transaction.page=0;
|
||||
}}
|
||||
>
|
||||
<FilterOutlined />
|
||||
|
@ -897,6 +900,7 @@ export const DetailUser = observer(() => {
|
|||
style={{ marginBottom: "1rem" }}
|
||||
onClick={() => {
|
||||
store.transaction.visibleModalFilterTransaction = true;
|
||||
store.transaction.page=0;
|
||||
}}
|
||||
>
|
||||
<FilterOutlined />
|
||||
|
|
|
@ -334,6 +334,7 @@ export const Membership = observer(() => {
|
|||
<Button
|
||||
onClick={() => {
|
||||
store.membership.visibleModalFilterMembership = true;
|
||||
store.membership.page=0;
|
||||
}}
|
||||
>
|
||||
<FilterOutlined />
|
||||
|
|
|
@ -455,6 +455,7 @@ export const Profile = observer(() => {
|
|||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||
onClick={() => {
|
||||
store.transaction.visibleModalFilterTransaction = true;
|
||||
store.transaction.page=0;
|
||||
setAction(true);
|
||||
}}
|
||||
>
|
||||
|
@ -570,6 +571,7 @@ export const Profile = observer(() => {
|
|||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||
onClick={() => {
|
||||
store.transaction.visibleModalFilterTransaction = true;
|
||||
store.transaction.page=0
|
||||
}}
|
||||
>
|
||||
<FilterOutlined />
|
||||
|
@ -583,17 +585,17 @@ export const Profile = observer(() => {
|
|||
//scroll={{ x: 1500, y: 300 }}
|
||||
dataSource={store.transaction.dataHistoryTransaction}
|
||||
pagination={{
|
||||
pageSize: store.transaction.pageSizeHistoryTransaction,
|
||||
pageSize: store.transaction.pageSize,
|
||||
total: store.transaction.total_dataHistoryTransaction,
|
||||
current: store.transaction.pageHistoryTransaction + 1,
|
||||
current: store.transaction.page + 1,
|
||||
showSizeChanger: true,
|
||||
simple: false,
|
||||
}}
|
||||
onChange={async (page) => {
|
||||
let pageNumber = page.current;
|
||||
store.transaction.pageSizeHistoryTransaction =
|
||||
store.transaction.pageSize =
|
||||
page.pageSize;
|
||||
store.transaction.pageHistoryTransaction = pageNumber - 1;
|
||||
store.transaction.page = pageNumber - 1;
|
||||
modalLoader.setLoading(true);
|
||||
await store.transaction.getDataHistoryTransaction();
|
||||
modalLoader.setLoading(false);
|
||||
|
@ -610,16 +612,16 @@ export const Profile = observer(() => {
|
|||
onChange: async (page, pageSize) => {
|
||||
console.log(page, "Page");
|
||||
console.log(pageSize, "Page size");
|
||||
store.transaction.pageSizeHistoryTransaction =
|
||||
store.transaction.page =
|
||||
pageSize;
|
||||
store.transaction.pageHistoryTransaction = page - 1;
|
||||
store.transaction.page = page - 1;
|
||||
modalLoader.setLoading(true);
|
||||
await store.transaction.getDataHistoryTransaction();
|
||||
modalLoader.setLoading(false);
|
||||
},
|
||||
pageSize: store.transaction.pageSizeHistoryTransaction,
|
||||
pageSize: store.transaction.pageSize,
|
||||
total: store.transaction.total_dataHistoryTransaction,
|
||||
current: store.transaction.pageHistoryTransaction + 1,
|
||||
current: store.transaction.page + 1,
|
||||
style: { marginBottom: "1rem", marginRight: "1rem" },
|
||||
}}
|
||||
style={{ padding: 0 }}
|
||||
|
|
|
@ -133,7 +133,7 @@ export class Transaction {
|
|||
async getDataHistoryTransaction() {
|
||||
try {
|
||||
const response = await http.get(
|
||||
`/transaction/history?page=${this.pageHistoryTransaction}&pageSize=${this.pageSizeHistoryTransaction}&start=${this.filterStart}&end=${this.filterEnd}`
|
||||
`/transaction/history?page=${this.page}&pageSize=${this.pageSize}&start=${this.filterStart}&end=${this.filterEnd}`
|
||||
);
|
||||
console.log(response);
|
||||
this.dataHistoryTransaction = response.body.data ?? [];
|
||||
|
@ -158,7 +158,7 @@ export class Transaction {
|
|||
async getDataHistoryTopUp(id) {
|
||||
try {
|
||||
const response = await http.get(
|
||||
`/transaction/history-deposit?page=${this.pageHistoryTopUp}&pageSize=${this.pageSizeHistoryTopUp}&user-destination=${id}&start=${this.filterStart}&end=${this.filterEnd}`
|
||||
`/transaction/history-deposit?page=${this.page}&pageSize=${this.pageSize}&user-destination=${id}&start=${this.filterStart}&end=${this.filterEnd}`
|
||||
);
|
||||
console.log(response,'get data history')
|
||||
this.dataHistoryTopUp = response.body.data ?? [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user