From 94a27d7defeeaf85bfcde09529b1dbe8748dad8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csneha122=E2=80=9D?= <“sneha@appsmith.com”> Date: Wed, 12 Feb 2025 18:37:29 +0530 Subject: [PATCH 1/2] fix: move to page redirection issue fixed for paragon integration --- app/client/src/sagas/ActionSagas.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index b6ea24423b9e..49d9f2cb02da 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -1064,6 +1064,7 @@ function* handleMoveOrCopySaga(actionPayload: ReduxAction) { const isQuery = pluginType === PluginType.DB; const isSaas = pluginType === PluginType.SAAS; const isInternal = pluginType === PluginType.INTERNAL; + const isExternalSaas = pluginType === PluginType.EXTERNAL_SAAS; const { parentEntityId } = resolveParentEntityMetadata(actionPayload.payload); if (!parentEntityId) return; @@ -1082,7 +1083,7 @@ function* handleMoveOrCopySaga(actionPayload: ReduxAction) { ); } - if (isQuery || isInternal) { + if (isQuery || isInternal || isExternalSaas) { history.push( queryEditorIdURL({ baseParentEntityId, From 1cae0a7d35772483778126338fee5b4ed1d7f764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csneha122=E2=80=9D?= <“sneha@appsmith.com”> Date: Wed, 12 Feb 2025 18:42:40 +0530 Subject: [PATCH 2/2] fix: fixed this for remote, ai plugins as well --- app/client/src/sagas/ActionSagas.ts | 68 ++++++++++++++--------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index 49d9f2cb02da..c939e5999330 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -1060,11 +1060,6 @@ function* toggleActionExecuteOnLoadSaga( function* handleMoveOrCopySaga(actionPayload: ReduxAction) { const { baseId: baseActionId, pluginId, pluginType } = actionPayload.payload; - const isApi = pluginType === PluginType.API; - const isQuery = pluginType === PluginType.DB; - const isSaas = pluginType === PluginType.SAAS; - const isInternal = pluginType === PluginType.INTERNAL; - const isExternalSaas = pluginType === PluginType.EXTERNAL_SAAS; const { parentEntityId } = resolveParentEntityMetadata(actionPayload.payload); if (!parentEntityId) return; @@ -1074,37 +1069,40 @@ function* handleMoveOrCopySaga(actionPayload: ReduxAction) { parentEntityId, ); - if (isApi) { - history.push( - apiEditorIdURL({ - baseParentEntityId, - baseApiId: baseActionId, - }), - ); - } - - if (isQuery || isInternal || isExternalSaas) { - history.push( - queryEditorIdURL({ - baseParentEntityId, - baseQueryId: baseActionId, - }), - ); - } - - if (isSaas) { - const plugin = shouldBeDefined( - yield select(getPlugin, pluginId), - `Plugin not found for pluginId - ${pluginId}`, - ); + switch (pluginType) { + case PluginType.API: { + history.push( + apiEditorIdURL({ + baseParentEntityId, + baseApiId: baseActionId, + }), + ); + break; + } + case PluginType.SAAS: { + const plugin = shouldBeDefined( + yield select(getPlugin, pluginId), + `Plugin not found for pluginId - ${pluginId}`, + ); - history.push( - saasEditorApiIdURL({ - baseParentEntityId, - pluginPackageName: plugin.packageName, - baseApiId: baseActionId, - }), - ); + history.push( + saasEditorApiIdURL({ + baseParentEntityId, + pluginPackageName: plugin.packageName, + baseApiId: baseActionId, + }), + ); + break; + } + default: { + history.push( + queryEditorIdURL({ + baseParentEntityId, + baseQueryId: baseActionId, + }), + ); + break; + } } }