|
@@ -88,6 +88,8 @@ class TransferStore {
|
|
|
|
|
|
|
|
@observable executionsLoading = false;
|
|
@observable executionsLoading = false;
|
|
|
|
|
|
|
|
|
|
+ @observable executionsPaginationLoading = false;
|
|
|
|
|
+
|
|
|
executionsPageSize = 10;
|
|
executionsPageSize = 10;
|
|
|
|
|
|
|
|
@action resetTransferPagination(): void {
|
|
@action resetTransferPagination(): void {
|
|
@@ -100,6 +102,7 @@ class TransferStore {
|
|
|
this.executionsList = [];
|
|
this.executionsList = [];
|
|
|
this.executionsHasOlderPage = false;
|
|
this.executionsHasOlderPage = false;
|
|
|
this.executionsLoading = false;
|
|
this.executionsLoading = false;
|
|
|
|
|
+ this.executionsPaginationLoading = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@action async getTransferExecutions(options?: {
|
|
@action async getTransferExecutions(options?: {
|
|
@@ -136,7 +139,12 @@ class TransferStore {
|
|
|
|
|
|
|
|
@action async loadOlderExecutions(): Promise<void> {
|
|
@action async loadOlderExecutions(): Promise<void> {
|
|
|
const transferId = this.transferDetails?.id;
|
|
const transferId = this.transferDetails?.id;
|
|
|
- if (!transferId || !this.executionsHasOlderPage || this.executionsLoading) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ !transferId ||
|
|
|
|
|
+ !this.executionsHasOlderPage ||
|
|
|
|
|
+ this.executionsLoading ||
|
|
|
|
|
+ this.executionsPaginationLoading
|
|
|
|
|
+ ) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -145,7 +153,7 @@ class TransferStore {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- this.executionsLoading = true;
|
|
|
|
|
|
|
+ this.executionsPaginationLoading = true;
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
const raw = await TransferSource.getExecutions(transferId, {
|
|
const raw = await TransferSource.getExecutions(transferId, {
|
|
@@ -158,12 +166,12 @@ class TransferStore {
|
|
|
runInAction(() => {
|
|
runInAction(() => {
|
|
|
this.executionsList = [...raw, ...this.executionsList];
|
|
this.executionsList = [...raw, ...this.executionsList];
|
|
|
this.executionsHasOlderPage = hasOlderPage;
|
|
this.executionsHasOlderPage = hasOlderPage;
|
|
|
- this.executionsLoading = false;
|
|
|
|
|
|
|
+ this.executionsPaginationLoading = false;
|
|
|
});
|
|
});
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
runInAction(() => {
|
|
runInAction(() => {
|
|
|
this.executionsHasOlderPage = false;
|
|
this.executionsHasOlderPage = false;
|
|
|
- this.executionsLoading = false;
|
|
|
|
|
|
|
+ this.executionsPaginationLoading = false;
|
|
|
});
|
|
});
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
}
|
|
}
|