diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/form/InputStock.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/form/InputStock.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx index 1d18685c5..8104d1f9f 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputStock.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 @@ -18,10 +18,10 @@ * * @author Sebastian Javier Marchano (sebasjm) */ +import { TalerMerchantApi, TalerProtocolTimestamp } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, h } from "preact"; import { useLayoutEffect, useState } from "preact/hooks"; -import { MerchantBackend, Timestamp } from "../../declaration.js"; import { FormErrors, FormProvider } from "./FormProvider.js"; import { InputDate } from "./InputDate.js"; import { InputGroup } from "./InputGroup.js"; @@ -39,8 +39,8 @@ export interface Stock { current: number; lost: number; sold: number; - address?: MerchantBackend.Location; - nextRestock?: Timestamp; + address?: TalerMerchantApi.Location; + nextRestock?: TalerProtocolTimestamp; } interface StockDelta { @@ -133,8 +133,7 @@ export function InputStock<T>({ const stockAddedErrors: FormErrors<typeof addedStock> = { lost: currentStock + addedStock.incoming < addedStock.lost - ? i18n.str`lost cannot be greater than current and incoming (max ${ - currentStock + addedStock.incoming + ? i18n.str`lost cannot be greater than current and incoming (max ${currentStock + addedStock.incoming })` : undefined, }; |