Skip to content

Commit

Permalink
FWF-4012:[Feature] - resolved comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Josephalexantony-aot committed Dec 9, 2024
1 parent 774e821 commit 48662f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions forms-flow-web/src/apiManager/services/FormServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export const formUpdate = (form_id,formData) => {
};

export const processMigrate = (migrationData) => {
const migrationUrl = replaceUrl(API.PROCESS_MIGRATE);
return RequestService.httpPOSTRequest(migrationUrl, migrationData );
return RequestService.httpPOSTRequest(API.PROCESS_MIGRATE, migrationData );
};


Expand Down
15 changes: 8 additions & 7 deletions forms-flow-web/src/apiManager/services/processServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,15 @@ export const getFormProcesses = (formId, ...rest) => {
export const getProcessDetails = (processKey, tenant_key = null, mapperId = null) => {
const api = API.GET_PROCESS_XML;
let url = replaceUrl(api, "<process_key>", processKey);
// Append tenant_key if available
if (tenant_key) {
url += `?tenantId=${tenant_key}`;
}
// Append mapperId if available
if (mapperId) {
url += tenant_key ? `&mapperId=${mapperId}` : `?mapperId=${mapperId}`;

const params = [];
if (tenant_key) params.push(`tenantId=${tenant_key}`);
if (mapperId) params.push(`mapperId=${mapperId}`);

if (params.length) {
url += `?${params.join("&")}`;
}

return RequestService.httpGETRequest(url);
};

Expand Down
1 change: 1 addition & 0 deletions forms-flow-web/src/components/Form/EditForm/FlowEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const FlowEdit = forwardRef(({ isPublished = false, CategoryType,
fetchHistories({ parentProcessKey: processData.parentProcessKey });
};
const handleSaveFlowClick = () => {
//On clicking the save flow it checks if the current flow has already been migrated, if not, it tries to migrate first.
if (shouldShowMigrationModal()) {
setShowMigrationModal(true);
} else {
Expand Down

0 comments on commit 48662f8

Please sign in to comment.