mirror of
https://github.com/valitydev/fraudbusters-ui.git
synced 2024-11-06 16:45:19 +00:00
Merge pull request #52 from rbkmoney/ft/fix-show-more
Add sorted field value
This commit is contained in:
commit
c972c8dbca
@ -15,7 +15,7 @@
|
||||
fxFlex="100"
|
||||
mat-button
|
||||
*ngIf="hasMore$ | async"
|
||||
(click)="fetchMore()"
|
||||
(click)="fetchMore(references[references.length - 1].groupId)"
|
||||
[disabled]="inProgress$ | async"
|
||||
>
|
||||
SHOW MORE
|
||||
|
@ -62,7 +62,7 @@ export class P2pReferencesComponent {
|
||||
this.fetchReferencesService.search({ type: OperationType.PeerToPeer, searchValue, isGlobal: false });
|
||||
}
|
||||
|
||||
fetchMore() {
|
||||
this.fetchReferencesService.fetchMore();
|
||||
fetchMore(sortFieldValue: string) {
|
||||
this.fetchReferencesService.fetchMore({ type: OperationType.PeerToPeer, sortFieldValue, isGlobal: false });
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
fxFlex="100"
|
||||
mat-button
|
||||
*ngIf="hasMore$ | async"
|
||||
(click)="fetchMore()"
|
||||
(click)="fetchMore(references[references.length - 1].groupId)"
|
||||
[disabled]="inProgress$ | async"
|
||||
>
|
||||
SHOW MORE
|
||||
|
@ -67,7 +67,7 @@ export class PaymentReferencesComponent {
|
||||
this.fetchReferencesService.search({ type: OperationType.Payment, searchValue, isGlobal: false });
|
||||
}
|
||||
|
||||
fetchMore() {
|
||||
this.fetchReferencesService.fetchMore();
|
||||
fetchMore(sortFieldValue: string) {
|
||||
this.fetchReferencesService.fetchMore({ type: OperationType.Payment, sortFieldValue, isGlobal: false });
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ export class CreatePaymentReferenceService {
|
||||
return this.fb.group({
|
||||
templateId: [templateId, Validators.required],
|
||||
partyId: [partyId, Validators.required],
|
||||
shopId: [shopId, Validators.required],
|
||||
shopId: [shopId],
|
||||
isDefault: false,
|
||||
isGlobal: false,
|
||||
});
|
||||
|
@ -13,7 +13,7 @@
|
||||
<fb-show-more-panel
|
||||
*ngIf="hasMore$ | async"
|
||||
[isLoading]="inProgress$ | async"
|
||||
(showMore)="fetchMore()"
|
||||
(showMore)="fetchMore(references[references.length - 1].templateId)"
|
||||
></fb-show-more-panel>
|
||||
</mat-card-content>
|
||||
<mat-card-footer *ngIf="inProgress$ | async">
|
||||
|
@ -73,7 +73,12 @@ export class P2pReferencesComponent {
|
||||
});
|
||||
}
|
||||
|
||||
fetchMore() {
|
||||
this.fetchReferencesService.fetchMore();
|
||||
fetchMore(sortFieldValue: string) {
|
||||
this.fetchReferencesService.fetchMore({
|
||||
type: OperationType.PeerToPeer,
|
||||
sortFieldValue,
|
||||
isGlobal: false,
|
||||
isDefault: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<fb-show-more-panel
|
||||
*ngIf="hasMore$ | async"
|
||||
[isLoading]="inProgress$ | async"
|
||||
(showMore)="fetchMore()"
|
||||
(showMore)="fetchMore(references[references.length - 1].templateId)"
|
||||
></fb-show-more-panel>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,8 +41,13 @@ export class PaymentReferencesComponent {
|
||||
});
|
||||
}
|
||||
|
||||
fetchMore() {
|
||||
this.fetchReferencesService.fetchMore();
|
||||
fetchMore(sortFieldValue: string) {
|
||||
this.fetchReferencesService.fetchMore({
|
||||
type: OperationType.Payment,
|
||||
sortFieldValue,
|
||||
isGlobal: false,
|
||||
isDefault: false,
|
||||
});
|
||||
}
|
||||
|
||||
goToTemplate(id: string) {
|
||||
|
@ -75,8 +75,8 @@ export abstract class PartialFetcher<R, P> {
|
||||
this.action$.next({ type: 'search' });
|
||||
}
|
||||
|
||||
fetchMore() {
|
||||
this.action$.next({ type: 'fetchMore' });
|
||||
fetchMore(value?: P) {
|
||||
this.action$.next(value ? { type: 'fetchMore', value } : { type: 'fetchMore' });
|
||||
}
|
||||
|
||||
protected abstract fetch(...args: Parameters<FetchFn<P, R>>): ReturnType<FetchFn<P, R>>;
|
||||
|
Loading…
Reference in New Issue
Block a user