Skip to content

Commit

Permalink
Merge pull request AOT-Technologies#2324 from shuhaib-aot/Bugfix/FWF-…
Browse files Browse the repository at this point in the history
…3864-status-not-retaining

FWF-3864 [bugfix] fixed status not retaining of published forms
  • Loading branch information
arun-s-aot authored Nov 4, 2024
2 parents 7664fe7 + 13c7a49 commit a15bdee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions forms-flow-web/src/components/Form/EditForm/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from "react";
import React, { useEffect,useState } from "react";
import { useParams } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux";
import { Edit as FormEdit } from './FormEdit.js';
Expand All @@ -22,7 +22,7 @@ const Index = () => {
(state) => state.process?.formAuthVerifyLoading
);
const apiCallError = useSelector((state) => state.errors?.apiCallError);

const [mapperDataLoading, setMapperDataLoading] = useState(false);

// fetch form and mapper data along with authorization data
const errorHandling = (err) => {
Expand Down Expand Up @@ -52,8 +52,10 @@ const Index = () => {
} else {
try {
//TBD: need to combine these two calls
setMapperDataLoading(true);
dispatch(getFormProcesses(res._id,(err, res)=>{
dispatch(getApplicationCount(res.id));
setMapperDataLoading(false);
}));
const authResponse = await fetchFormAuthorizationDetials(
res?.parentFormId || res._id
Expand All @@ -68,7 +70,7 @@ const Index = () => {
);
}, [formId]);

if (formAuthVerifyLoading) {
if (formAuthVerifyLoading || mapperDataLoading) {
return <Loading />;
}
if (apiCallError) {
Expand Down
1 change: 0 additions & 1 deletion forms-flow-web/src/components/Form/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ const List = React.memo((props) => {
setFormSubmitted(false);
});
};
console.log(form,"form");

const onChangeCheckBox = () => {
const newWizardChecked = !wizardChecked;
Expand Down

0 comments on commit a15bdee

Please sign in to comment.