Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Ajay-aot/forms-flow-ai i…
Browse files Browse the repository at this point in the history
…nto bugfix/FWF-4201-tables-style-confirmation
  • Loading branch information
Ajay-aot committed Jan 17, 2025
2 parents 9f604e0 + c8d0601 commit 04ccae7
Show file tree
Hide file tree
Showing 10 changed files with 446 additions and 696 deletions.
120 changes: 0 additions & 120 deletions forms-flow-web/src/components/CustomComponents/MultiSelect.js

This file was deleted.

8 changes: 5 additions & 3 deletions forms-flow-web/src/components/Form/EditForm/FormEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ import NewVersionModal from "../../Modals/NewVersionModal";
import { currentFormReducer } from "../../../modules/formReducer.js";
import { toast } from "react-toastify";
import userRoles from "../../../constants/permissions.js";
import { generateUniqueId, isFormComponentsChanged, addTenantkey, textTruncate } from "../../../helper/helper.js";
import { generateUniqueId, isFormComponentsChanged, addTenantkey, textTruncate,
convertMultiSelectOptionToValue } from "../../../helper/helper.js";
import { useMutation } from "react-query";
import NavigateBlocker from "../../CustomComponents/NavigateBlocker";
import { setProcessData, setFormPreviosData, setFormProcessesData } from "../../../actions/processActions.js";
Expand Down Expand Up @@ -538,12 +539,13 @@ const handleSaveLayout = () => {


/* ----------- save settings function to be used in settings modal ---------- */

const filterAuthorizationData = (authorizationData) => {
if(authorizationData.selectedOption === "submitter"){
return {roles: [], userName:null, resourceDetails:{submitter:true}};
}
if (authorizationData.selectedOption === "specifiedRoles") {
return { roles: authorizationData.selectedRoles, userName: "" };
return { roles: convertMultiSelectOptionToValue(authorizationData.selectedRoles, "role"), userName: "" };
}
return { roles: [], userName: preferred_username };
};
Expand Down Expand Up @@ -582,7 +584,7 @@ const handleSaveLayout = () => {
resourceDetails: {},
roles:
rolesState.FORM.selectedOption === "specifiedRoles"
? rolesState.FORM.selectedRoles
? convertMultiSelectOptionToValue(rolesState.FORM.selectedRoles, "role")
: [],
},
};
Expand Down
Loading

0 comments on commit 04ccae7

Please sign in to comment.