diff options
Diffstat (limited to 'packages')
3 files changed, 14 insertions, 6 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/templates.ts b/packages/merchant-backoffice-ui/src/hooks/templates.ts index 12d99f3fc..500a94a48 100644 --- a/packages/merchant-backoffice-ui/src/hooks/templates.ts +++ b/packages/merchant-backoffice-ui/src/hooks/templates.ts @@ -57,7 +57,8 @@ export function useInstanceTemplates() { if (data === undefined) return undefined; if (data.type !== "ok") return data; - return buildPaginatedResult(data.body.templates, offset, setOffset, (d) => d.template_id) + // return buildPaginatedResult(data.body.templates, offset, setOffset, (d) => d.template_id) + return data; } diff --git a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx index 9e59609c7..fce14dcc3 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/templates/list/index.tsx @@ -93,11 +93,16 @@ export default function ListTemplates({ /> <ListPage - templates={result.body} - onLoadMoreBefore={ - result.isFirstPage ? undefined: result.loadFirst - } - onLoadMoreAfter={result.isLastPage ? undefined : result.loadNext} + // templates={result.body} + // onLoadMoreBefore={ + // result.isFirstPage ? undefined: result.loadFirst + // } + // onLoadMoreAfter={result.isLastPage ? undefined : result.loadNext} + + templates={result.body.templates} + onLoadMoreBefore={undefined} + onLoadMoreAfter={undefined} + onCreate={onCreate} onSelect={(e) => { onSelect(e.template_id); diff --git a/packages/taler-util/src/http-client/merchant.ts b/packages/taler-util/src/http-client/merchant.ts index cad2c839e..892971fee 100644 --- a/packages/taler-util/src/http-client/merchant.ts +++ b/packages/taler-util/src/http-client/merchant.ts @@ -1638,6 +1638,8 @@ export class TalerMerchantInstanceHttpClient { ) { const url = new URL(`private/templates`, this.baseUrl); + addMerchantPaginationParams(url, params); + const headers: Record<string, string> = {}; if (token) { headers.Authorization = makeBearerTokenAuthHeader(token); |