diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/product/ProductList.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/product/ProductList.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx b/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx index 25751dd96..4fff66fd7 100644 --- a/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx @@ -1,6 +1,6 @@ /* This file is part of GNU Taler - (C) 2021-2023 Taler Systems S.A. + (C) 2021-2024 Taler Systems S.A. GNU Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -13,18 +13,17 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { Amounts } from "@gnu-taler/taler-util"; +import { Amounts, TalerMerchantApi } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import emptyImage from "../../assets/empty.png"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; -import { MerchantBackend } from "../../declaration.js"; interface Props { - list: MerchantBackend.Product[]; + list: TalerMerchantApi.Product[]; actions?: { name: string; tooltip: string; - handler: (d: MerchantBackend.Product, index: number) => void; + handler: (d: TalerMerchantApi.Product, index: number) => void; }[]; } export function ProductList({ list, actions = [] }: Props): VNode { @@ -60,7 +59,7 @@ export function ProductList({ list, actions = [] }: Props): VNode { : Amounts.stringify( Amounts.mult( Amounts.parseOrThrow(entry.price), - entry.quantity, + entry.quantity ?? 0 ).amount, ); |