From 4f7d07dcd67b0d11314db74f46585fb14e8929ad Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Thu, 28 Sep 2023 13:29:02 +0200 Subject: [PATCH] :bug: Fixing redirect on create document --- .../Layouts/DocumentTypes/DocumentTypesCreate/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx b/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx index f6dfa2a5..e1b62143 100644 --- a/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx +++ b/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx @@ -29,13 +29,15 @@ export default function DocumentTypesCreate(props: IProps) { }); const documentToCreate = DocumentType.hydrate({ ...values, - office: office + office: office, }); await validateOrReject(documentToCreate, { groups: ["createDocumentType"] }); const documentTypeCreated = await DocumentTypes.getInstance().post(documentToCreate); router.push( - Module.getInstance().get().modules.pages.DocumentTypes.pages.Edit.props.path.replace("[uid]", documentTypeCreated.uid!), + Module.getInstance() + .get() + .modules.pages.DocumentTypes.pages.DocumentTypesInformations.props.path.replace("[uid]", documentTypeCreated.uid!), ); } catch (e) { if (e instanceof Array) {