aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/InstanceRoutes.tsx')
-rw-r--r--packages/merchant-backoffice-ui/src/InstanceRoutes.tsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx
index c8f22f583..b911483a7 100644
--- a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx
+++ b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx
@@ -52,6 +52,7 @@ import ReservesDetailsPage from "./paths/instance/reserves/details/index.js";
import ReservesListPage from "./paths/instance/reserves/list/index.js";
import TemplateCreatePage from "./paths/instance/templates/create/index.js";
import TemplateUsePage from "./paths/instance/templates/use/index.js";
+import TemplateQrPage from "./paths/instance/templates/qr/index.js";
import TemplateListPage from "./paths/instance/templates/list/index.js";
import TemplateUpdatePage from "./paths/instance/templates/update/index.js";
import WebhookCreatePage from "./paths/instance/webhooks/create/index.js";
@@ -94,6 +95,7 @@ export enum InstancePaths {
templates_update = "/templates/:tid/update",
templates_new = "/templates/new",
templates_use = "/templates/:tid/use",
+ templates_qr = "/templates/:tid/qr",
webhooks_list = "/webhooks",
webhooks_update = "/webhooks/:tid/update",
@@ -465,6 +467,9 @@ export function InstanceRoutes({
onNewOrder={(id: string) => {
route(InstancePaths.templates_use.replace(":tid", id));
}}
+ onQR={(id: string) => {
+ route(InstancePaths.templates_qr.replace(":tid", id));
+ }}
onSelect={(id: string) => {
route(InstancePaths.templates_update.replace(":tid", id));
}}
@@ -505,6 +510,16 @@ export function InstanceRoutes({
route(InstancePaths.templates_list);
}}
/>
+ <Route
+ path={InstancePaths.templates_qr}
+ component={TemplateQrPage}
+ onUnauthorized={LoginPageAccessDenied}
+ onLoadError={ServerErrorRedirectTo(InstancePaths.templates_list)}
+ onNotFound={IfAdminCreateDefaultOr(NotFoundPage)}
+ onBack={() => {
+ route(InstancePaths.templates_list);
+ }}
+ />
{/**
* reserves pages