diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/products/update')
3 files changed, 10 insertions, 10 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx index d1dc9d540..7aa93b186 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx @@ -19,7 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { h, VNode, FunctionalComponent } from "preact"; +import { AmountString } from "@gnu-taler/taler-util"; +import { FunctionalComponent, h } from "preact"; import { UpdatePage as TestedComponent } from "./UpdatePage.js"; export default { @@ -46,7 +47,7 @@ export const WithManagedStock = createExample(TestedComponent, { description: "description1", description_i18n: {} as any, image: "", - price: "TESTKUDOS:10", + price: "TESTKUDOS:10" as AmountString, taxes: [], total_lost: 10, total_sold: 5, @@ -62,7 +63,7 @@ export const WithInfiniteStock = createExample(TestedComponent, { description: "description1", description_i18n: {} as any, image: "", - price: "TESTKUDOS:10", + price: "TESTKUDOS:10" as AmountString, taxes: [], total_lost: 10, total_sold: 5, diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx index 53aa9d61f..5395ae40f 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx @@ -19,14 +19,14 @@ * @author Sebastian Javier Marchano (sebasjm) */ +import { TalerMerchantApi } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { h, VNode } from "preact"; import { AsyncButton } from "../../../../components/exception/AsyncButton.js"; import { ProductForm } from "../../../../components/product/ProductForm.js"; -import { MerchantBackend } from "../../../../declaration.js"; import { useListener } from "../../../../hooks/listener.js"; -type Entity = MerchantBackend.Products.ProductDetail & { product_id: string }; +type Entity = TalerMerchantApi.ProductDetail & { product_id: string }; interface Props { onUpdate: (d: Entity) => Promise<void>; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx index 2d3e7bd6b..842462c12 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx @@ -19,28 +19,27 @@ * @author Sebastian Javier Marchano (sebasjm) */ +import { HttpStatusCode, TalerErrorDetail, TalerMerchantApi } from "@gnu-taler/taler-util"; import { ErrorType, HttpError, useTranslationContext, } from "@gnu-taler/web-util/browser"; -import { Fragment, h, VNode } from "preact"; +import { Fragment, VNode, h } from "preact"; import { useState } from "preact/hooks"; import { Loading } from "../../../../components/exception/loading.js"; import { NotificationCard } from "../../../../components/menu/index.js"; -import { MerchantBackend } from "../../../../declaration.js"; import { useProductAPI, useProductDetails } from "../../../../hooks/product.js"; import { Notification } from "../../../../utils/types.js"; import { UpdatePage } from "./UpdatePage.js"; -import { HttpStatusCode } from "@gnu-taler/taler-util"; -export type Entity = MerchantBackend.Products.ProductAddDetail; +export type Entity = TalerMerchantApi.ProductAddDetail; interface Props { onBack?: () => void; onConfirm: () => void; onUnauthorized: () => VNode; onNotFound: () => VNode; - onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode; + onLoadError: (e: HttpError<TalerErrorDetail>) => VNode; pid: string; } export default function UpdateProduct({ |