aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx6
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx10
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx5
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx5
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx6
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx6
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx6
7 files changed, 36 insertions, 8 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx
index 5b6564485..bb1ee944b 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx
@@ -24,6 +24,7 @@ import { useSessionContext } from "../../../context/session.js";
import { useInstanceDetails } from "../../../hooks/instance.js";
import { LoginPage } from "../../login/index.js";
import { DetailPage } from "./DetailPage.js";
+import { NotFoundPageOrAdminCreate } from "../../notfound/index.js";
interface Props {
onUpdate: () => void;
@@ -50,8 +51,11 @@ export default function Detail({
case HttpStatusCode.Unauthorized: {
return <LoginPage />
}
+ case HttpStatusCode.NotFound: {
+ return <NotFoundPageOrAdminCreate />;
+ }
default: {
- assertUnreachable(result.case)
+ assertUnreachable(result)
}
}
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
index 32c7b6c7f..ed0e1220f 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
@@ -24,7 +24,6 @@ import { VNode, h } from "preact";
import { ErrorLoadingMerchant } from "../../../../components/ErrorLoadingMerchant.js";
import { Loading } from "../../../../components/exception/loading.js";
import { useInstanceKYCDetails } from "../../../../hooks/instance.js";
-import { LoginPage } from "../../../login/index.js";
import { ListPage } from "./ListPage.js";
interface Props {
@@ -36,6 +35,10 @@ export default function ListKYC(_p: Props): VNode {
if (result instanceof TalerError) {
return <ErrorLoadingMerchant error={result} />
}
+ /**
+ * This component just render known kyc requirements.
+ * If query fail then is safe to hide errors.
+ */
if (result.type === "fail") {
switch (result.case) {
case HttpStatusCode.GatewayTimeout: {
@@ -54,7 +57,10 @@ export default function ListKYC(_p: Props): VNode {
return <div />
}
case HttpStatusCode.Unauthorized: {
- return <LoginPage />
+ return <div />
+ }
+ case HttpStatusCode.NotFound: {
+ return <div />;
}
default: {
assertUnreachable(result)
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
index 10b115905..f612389fe 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx
@@ -61,8 +61,11 @@ export default function OrderCreate({
case HttpStatusCode.Unauthorized: {
return <LoginPage />
}
+ case HttpStatusCode.NotFound: {
+ return <NotFoundPageOrAdminCreate />;
+ }
default: {
- assertUnreachable(detailsResult.case);
+ assertUnreachable(detailsResult);
}
}
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx
index 8efef1c1b..165ced3dc 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx
@@ -78,11 +78,14 @@ export default function OrderList({ onCreate, onSelect }: Props): VNode {
}
if (result.type === "fail") {
switch(result.case) {
+ case HttpStatusCode.NotFound: {
+ return <NotFoundPageOrAdminCreate />;
+ }
case HttpStatusCode.Unauthorized: {
return <LoginPage />
}
default: {
- assertUnreachable(result.case)
+ assertUnreachable(result)
}
}
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx
index 36ba10e30..768e21325 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx
@@ -25,6 +25,7 @@ import { useInstanceDetails } from "../../../hooks/instance.js";
import { Notification } from "../../../utils/types.js";
import { LoginPage } from "../../login/index.js";
import { DetailPage } from "./DetailPage.js";
+import { NotFoundPageOrAdminCreate } from "../../notfound/index.js";
interface Props {
onChange: () => void;
@@ -50,8 +51,11 @@ export default function Token({
case HttpStatusCode.Unauthorized: {
return <LoginPage />
}
+ case HttpStatusCode.NotFound: {
+ return <NotFoundPageOrAdminCreate />;
+ }
default: {
- assertUnreachable(result.case)
+ assertUnreachable(result)
}
}
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx
index b53f67884..6c451aab8 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx
@@ -28,6 +28,7 @@ import { useInstanceBankAccounts } from "../../../../hooks/bank.js";
import { useInstanceTransfers } from "../../../../hooks/transfer.js";
import { LoginPage } from "../../../login/index.js";
import { ListPage } from "./ListPage.js";
+import { NotFoundPageOrAdminCreate } from "../../../notfound/index.js";
interface Props {
onCreate: () => void;
@@ -79,8 +80,11 @@ export default function ListTransfer({
case HttpStatusCode.Unauthorized: {
return <LoginPage />
}
+ case HttpStatusCode.NotFound: {
+ return <NotFoundPageOrAdminCreate />;
+ }
default: {
- assertUnreachable(result.case);
+ assertUnreachable(result);
}
}
}
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
index de3ffce48..b5319bc2d 100644
--- a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
+++ b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx
@@ -31,6 +31,7 @@ import {
import { Notification } from "../../../utils/types.js";
import { LoginPage } from "../../login/index.js";
import { UpdatePage } from "./UpdatePage.js";
+import { NotFoundPageOrAdminCreate } from "../../notfound/index.js";
export interface Props {
onBack: () => void;
@@ -79,8 +80,11 @@ function CommonUpdate(
case HttpStatusCode.Unauthorized: {
return <LoginPage />
}
+ case HttpStatusCode.NotFound: {
+ return <NotFoundPageOrAdminCreate />;
+ }
default: {
- assertUnreachable(result.case)
+ assertUnreachable(result)
}
}
}