Skip to content

Commit

Permalink
Merge pull request #420 from AOT-Technologies/release/7.0.0
Browse files Browse the repository at this point in the history
Release/7.0.0 change to main
  • Loading branch information
arun-s-aot authored Jan 16, 2025
2 parents ea11d0a + 70be2e1 commit 55e122f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
6 changes: 6 additions & 0 deletions forms-flow-admin/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ const Admin = React.memo(({ props }: any) => {
}
}, []);

React.useEffect(()=>{
if(instance){
publish("FF_AUTH", instance);
}
},[instance])

React.useEffect(()=>{
if(!isAuth) return
const locale = localStorage.getItem("i18nextLng")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const ImportModal: React.FC<ImportModalProps> = React.memo(
const redColor = computedStyle.getPropertyValue("--ff-red-000");
const [selectedFile, setSelectedFile] = useState<File | null>(null);
const [uploadProgress, setUploadProgress] = useState(0);
const hasVersion = (item) => item?.majorVersion != null || item?.minorVersion != null;
const skipImport = "Skip, do not import";
const [selectedLayoutVersion, setSelectedLayoutVersion] = useState<{
value: any;
Expand Down Expand Up @@ -160,34 +161,27 @@ export const ImportModal: React.FC<ImportModalProps> = React.memo(
};


const primaryButtonDisabled =
!selectedFile ||
inprogress ||
const primaryButtonDisabled =
!selectedFile ||
inprogress ||
importLoader ||
(importError && primaryButtonText !== "Try Again") ||
(showFileItems &&
selectedFlowVersion?.label === skipImport &&
(importError && primaryButtonText !== "Try Again") ||
(showFileItems &&
fileItems &&
selectedFlowVersion?.label === skipImport &&
selectedLayoutVersion?.label === skipImport);


useEffect(() => {
if (
fileItems &&
!importError &&
Object.values(fileItems).some(
(item) => item?.majorVersion != null || item?.minorVersion != null
)
) {
setShowFileItems(true);
} else if (
processVersion?.majorVersion != null ||
processVersion?.minorVersion != null
) {
setShowFileItems(true);
} else {
setShowFileItems(false);
}
}, [importError, fileItems]);
useEffect(() => {
const fileItemsHasVersion =
fileItems && Object.values(fileItems).some(hasVersion);
const processVersionHasVersion = hasVersion(processVersion);
if (fileItemsHasVersion || processVersionHasVersion) {
setShowFileItems(true);
} else {
setShowFileItems(false);
}
}, [importError, fileItems, processVersion]);

useEffect(() => {
if (!showModal) {
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-nav/src/sidenav/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ const Sidebar = React.memo(({ props, sidenavHeight="100%" }) => {
});

Sidebar.propTypes = {
subscribe: PropTypes.func.isRequired,
getKcInstance: PropTypes.func.isRequired,
subscribe: PropTypes.func,
getKcInstance: PropTypes.func,
publish: PropTypes.func,
sidenavHeight: PropTypes.string,
};
Expand Down

0 comments on commit 55e122f

Please sign in to comment.