diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/InstanceRoutes.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/InstanceRoutes.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx index 1c55572bb..3be793ada 100644 --- a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx +++ b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx @@ -48,6 +48,7 @@ import ReservesCreatePage from "./paths/instance/reserves/create/index.js"; 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 TemplateListPage from "./paths/instance/templates/list/index.js"; import TemplateUpdatePage from "./paths/instance/templates/update/index.js"; import TransferCreatePage from "./paths/instance/transfers/create/index.js"; @@ -85,6 +86,7 @@ export enum InstancePaths { templates_list = "/templates", templates_update = "/templates/:tid/update", templates_new = "/templates/new", + templates_use = "/templates/:tid/use", } // eslint-disable-next-line @typescript-eslint/no-empty-function @@ -399,6 +401,9 @@ export function InstanceRoutes({ onCreate={() => { route(InstancePaths.templates_new); }} + onNewOrder={(id: string) => { + route(InstancePaths.templates_use.replace(":tid", id)); + }} onSelect={(id: string) => { route(InstancePaths.templates_update.replace(":tid", id)); }} @@ -426,6 +431,19 @@ export function InstanceRoutes({ route(InstancePaths.templates_list); }} /> + <Route + path={InstancePaths.templates_use} + component={TemplateUsePage} + onOrderCreated={(id: string) => { + route(InstancePaths.order_details.replace(":oid", id)); + }} + onUnauthorized={LoginPageAccessDenied} + onLoadError={ServerErrorRedirectTo(InstancePaths.templates_list)} + onNotFound={IfAdminCreateDefaultOr(NotFoundPage)} + onBack={() => { + route(InstancePaths.templates_list); + }} + /> {/** * reserves pages |