summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-03-22 15:15:15 -0300
committerSebastian <sebasjm@gmail.com>2024-03-26 16:57:58 -0300
commit5181d060cf09ffc7250c9f1069920da0724e0284 (patch)
tree477312c567976c63caa101202bc525490727c096 /packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
parente2bfbced7ab027c901913e83ff7dd82240661990 (diff)
downloadwallet-core-5181d060cf09ffc7250c9f1069920da0724e0284.tar.gz
wallet-core-5181d060cf09ffc7250c9f1069920da0724e0284.tar.bz2
wallet-core-5181d060cf09ffc7250c9f1069920da0724e0284.zip
wip, doesn't compile. now merchant doesn't have it's own definition of types... it uses the one defined by taler-util
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx15
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
index 6adc221da..1017a9334 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx
@@ -19,32 +19,31 @@
* @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 { h, VNode } from "preact";
+import { VNode, h } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading.js";
+import { JumpToElementById } from "../../../../components/form/JumpToElementById.js";
import { NotificationCard } from "../../../../components/menu/index.js";
-import { MerchantBackend, WithId } from "../../../../declaration.js";
+import { ConfirmModal } from "../../../../components/modal/index.js";
import {
useInstanceProducts,
useProductAPI,
} from "../../../../hooks/product.js";
import { Notification } from "../../../../utils/types.js";
import { CardTable } from "./Table.js";
-import { HttpStatusCode } from "@gnu-taler/taler-util";
-import { ConfirmModal, DeleteModal } from "../../../../components/modal/index.js";
-import { JumpToElementById } from "../../../../components/form/JumpToElementById.js";
interface Props {
onUnauthorized: () => VNode;
onNotFound: () => VNode;
onCreate: () => void;
onSelect: (id: string) => void;
- onLoadError: (e: HttpError<MerchantBackend.ErrorDetail>) => VNode;
+ onLoadError: (e: HttpError<TalerErrorDetail>) => VNode;
}
export default function ProductList({
onUnauthorized,
@@ -56,7 +55,7 @@ export default function ProductList({
const result = useInstanceProducts();
const { deleteProduct, updateProduct, getProduct } = useProductAPI();
const [deleting, setDeleting] =
- useState<MerchantBackend.Products.ProductDetail & WithId | null>(null);
+ useState<TalerMerchantApi.ProductDetail & WithId | null>(null);
const [notif, setNotif] = useState<Notification | undefined>(undefined);
const { i18n } = useTranslationContext();
@@ -107,7 +106,7 @@ export default function ProductList({
)
}
onSelect={(product) => onSelect(product.id)}
- onDelete={(prod: MerchantBackend.Products.ProductDetail & WithId) =>
+ onDelete={(prod: TalerMerchantApi.ProductDetail & WithId) =>
setDeleting(prod)
}
/>