diff --git a/forms-flow-web/package.json b/forms-flow-web/package.json index 33c421564..b90d47108 100644 --- a/forms-flow-web/package.json +++ b/forms-flow-web/package.json @@ -117,4 +117,4 @@ "not ie <= 11", "not op_mini all" ] -} \ No newline at end of file +} diff --git a/forms-flow-web/src/components/CustomComponents/MultiSelect.js b/forms-flow-web/src/components/CustomComponents/MultiSelect.js index 0ef401645..62d34bcca 100644 --- a/forms-flow-web/src/components/CustomComponents/MultiSelect.js +++ b/forms-flow-web/src/components/CustomComponents/MultiSelect.js @@ -11,7 +11,7 @@ const RoleSelector = ({ setSelectedRoles, openByDefault = false, }) => { - const primaryColor = StyleServices.getCSSVariable('primary'); + const primaryColor = StyleServices.getCSSVariable('--ff-primary'); const [roleInput, setRoleInput] = useState(""); const [filteredRoles, setFilteredRoles] = useState([]); const [isDropdownOpen, setIsDropdownOpen] = useState(false); // To control dropdown visibility diff --git a/forms-flow-web/src/components/Modals/ActionModal.js b/forms-flow-web/src/components/Modals/ActionModal.js index 0334dfd21..3df950982 100644 --- a/forms-flow-web/src/components/Modals/ActionModal.js +++ b/forms-flow-web/src/components/Modals/ActionModal.js @@ -20,22 +20,31 @@ const ActionModal = React.memo( onAction, published, isCreate, - isMigrated + isMigrated, + diagramType }) => { - const primaryColor = StyleServices.getCSSVariable('primary'); + const primaryColor = StyleServices.getCSSVariable('--ff-primary'); const handleAction = (actionType) => { onAction(actionType); onClose(); }; let customInfo = null; - if (published || !isMigrated) { + if (CategoryType === "FORM" && (published || !isMigrated)) { customInfo = { heading: "Note", content: ` - ${published ? "Importing and deleting is not available when the form is published. You must unpublish the form first if you wish to make any changes." : ""} + ${published ? `Importing and deleting is not available when the form is published. You must unpublish the form first if you wish to make any changes.` : ""} ${!isMigrated ? "\nSome actions are disabled as this form has not been migrated to the new 1 to 1 relationship structure. To migrate this form exit this popup and click \"Save layout\" or \"Save flow\"." : ""} `.trim(), + }; + } else if (CategoryType === "WORKFLOW" && published) { + customInfo = { + heading: "Note", + content: `Importing and deleting is not available when the ${diagramType} is published.` + + `You must unpublish the ${diagramType} first if you wish to make any changes.`.trim(), + + }; } @@ -59,7 +68,7 @@ const ActionModal = React.memo( variant="secondary" size="sm" label="Duplicate" - disabled={published || !isMigrated} + disabled={!isMigrated} icon={} className="" dataTestid="duplicate-form-button" @@ -156,6 +165,7 @@ ActionModal.propTypes = { published: PropTypes.bool.isRequired, isCreate: PropTypes.bool, isMigrated: PropTypes.bool, // Adding validation for isMigrated + diagramType: PropTypes.string, }; export default ActionModal; diff --git a/forms-flow-web/src/components/Modals/TaskVariableModal.js b/forms-flow-web/src/components/Modals/TaskVariableModal.js index 3c9175d67..4e77e999e 100644 --- a/forms-flow-web/src/components/Modals/TaskVariableModal.js +++ b/forms-flow-web/src/components/Modals/TaskVariableModal.js @@ -33,8 +33,8 @@ import { StyleServices } from "@formsflow/service"; //TBD in case of Bundle form display const PillList = React.memo(({ alternativeLabels, onRemove }) => { const { t } = useTranslation(); - const primaryColor = StyleServices.getCSSVariable('primary'); - const secondaryColor = StyleServices.getCSSVariable('secondary'); + const primaryColor = StyleServices.getCSSVariable('--ff-primary'); + const secondaryColor = StyleServices.getCSSVariable('--ff-secondary'); const filteredVariablePills = Object.values(alternativeLabels).filter( ({ key }) => !ignoreKeywords.has(key) diff --git a/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js b/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js index 8116149f5..ec7e7b839 100644 --- a/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js +++ b/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js @@ -682,6 +682,8 @@ const ProcessCreateEdit = ({ type }) => { setSelectedAction(action); }} isCreate={isCreate} + published={isPublished} + diagramType={diagramType} />