diff options
author | Sebastian <sebasjm@gmail.com> | 2024-03-27 01:05:10 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-03-27 01:05:10 -0300 |
commit | 237c4e8adae997e84f5fb7a8fe5c03b1148e99dc (patch) | |
tree | 26ec2b1a82e730af080aae4625b736aaa77dfec7 /packages/merchant-backoffice-ui/src/components/form/InputStock.tsx | |
parent | ecb8c2078ebe94d81a6e03ebfe01ecdde53109e2 (diff) | |
download | wallet-core-237c4e8adae997e84f5fb7a8fe5c03b1148e99dc.tar.xz |
wip #8655
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/form/InputStock.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/form/InputStock.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx index e47259732..8104d1f9f 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx @@ -18,7 +18,8 @@ * * @author Sebastian Javier Marchano (sebasjm) */ -import { Location, useTranslationContext } from "@gnu-taler/web-util/browser"; +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 { FormErrors, FormProvider } from "./FormProvider.js"; @@ -27,7 +28,6 @@ import { InputGroup } from "./InputGroup.js"; import { InputLocation } from "./InputLocation.js"; import { InputNumber } from "./InputNumber.js"; import { InputProps, useField } from "./useField.js"; -import { TalerMerchantApi } from "@gnu-taler/taler-util"; export interface Props<T> extends InputProps<T> { alreadyExist?: boolean; @@ -40,7 +40,7 @@ export interface Stock { lost: number; sold: number; address?: TalerMerchantApi.Location; - nextRestock?: Timestamp; + 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, }; |