From b0a64791f57b58f91b4851acbab1fd080da20eed Mon Sep 17 00:00:00 2001 From: Artem_Blazhko Date: Wed, 11 Sep 2024 17:43:37 +0300 Subject: [PATCH] Use request id to redirect to details page --- src/routes/RequestsRoute.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/routes/RequestsRoute.js b/src/routes/RequestsRoute.js index 8054c787..e05fa92a 100644 --- a/src/routes/RequestsRoute.js +++ b/src/routes/RequestsRoute.js @@ -1129,8 +1129,16 @@ class RequestsRoute extends React.Component { const mode = query.get('mode'); return mutator.POST(requestData) - .then(() => { - this.closeLayer(); + .then((res) => { + const { + match: { + path, + }, + history, + } = this.props; + + history.push(`${path}/view/${res?.primaryRequestId || res?.id}`); + this.context.sendCallout({ message: isDuplicateMode(mode) ? (