Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/shops/shops.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<cc-page-layout fullHeight title="Shops">
<cc-shops-table
[hasMore]="hasMore$ | async"
[progress]="progress$ | async"
[shops]="shops$ | async"
(filterChange)="searchParamsUpdated($event)"
Expand Down
1 change: 1 addition & 0 deletions src/app/shops/shops.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class ShopsComponent implements OnInit {
map((res) => res.map((r) => ({ ...r.object.shop_config, info: r.info }))),
);
progress$ = this.fetchDomainObjectsService.isLoading$;
hasMore$ = this.fetchDomainObjectsService.hasMore$;

ngOnInit() {
this.searchParamsUpdated('');
Expand Down
1 change: 1 addition & 0 deletions src/app/terminals/terminals.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[progress]="progress$ | async"
name="terminals"
standaloneFilter
(filterChange)="filter($event)"
(more)="more()"
(update)="update($event)"
></v-table>
Expand Down
7 changes: 7 additions & 0 deletions src/app/terminals/terminals.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ export class TerminalsComponent implements OnInit {
this.dialogService.open(CreateDomainObjectDialogComponent, { objectType: 'terminal' });
}

filter(search: string) {
this.fetchFullDomainObjectsService.load({
type: DomainObjectType.terminal,
query: search,
});
}

private getTerminalShopWalletDelegates(terminalObj: TerminalObject) {
return this.routingRulesStoreService.routingRules$.pipe(
map((rules) => getTerminalShopWalletDelegates(rules, terminalObj)),
Expand Down
2 changes: 2 additions & 0 deletions src/components/shops-table/shops-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
[columns]="columns"
[data]="shops()"
[externalFilter]="filterChange.observed"
[hasMore]="hasMore"
[progress]="progress"
name="shops"
standaloneFilter
(filterChange)="filterChange.emit($event)"
(more)="more.emit()"
(update)="update.emit($event)"
></v-table>
5 changes: 5 additions & 0 deletions src/components/shops-table/shops-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ export class ShopsTableComponent {

shops = input<ShopWithInfo[]>([]);
@Input() progress: number | boolean = false;
@Input() hasMore: boolean = false;
@Output() update = new EventEmitter<UpdateOptions>();
@Output() filterChange = new EventEmitter<string>();
@Output() more = new EventEmitter<void>();

noPartyColumn = input(false, { transform: booleanAttribute });

Expand Down Expand Up @@ -235,6 +237,7 @@ export class ShopsTableComponent {
partyId,
'routing-rules',
'payment',
rr.ref.id,
]),
},
...(delegates[idx].length
Expand All @@ -248,6 +251,8 @@ export class ShopsTableComponent {
partyId,
'routing-rules',
'payment',
rr.ref.id,
'delegate',
delegate.ruleset.id,
]),
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class TerminalDelegatesCardComponent implements OnChanges {
);
case 'wallet_is':
return this.partiesStoreService
.getShop(party?.definition?.wallet_is)
.getWallet(party?.definition?.wallet_is)
.value$.pipe(
map((wallet) => ({
value: wallet.data.name,
Expand Down
Loading