diff --git a/src/components/form/FormViewer.js b/src/components/form/FormViewer.js index bdb16423140b32db6ec7692433b36237a6f33e34..3b42b6a6f1c76ac6378e6cd82a58b07f6ede600b 100644 --- a/src/components/form/FormViewer.js +++ b/src/components/form/FormViewer.js @@ -20,6 +20,7 @@ import Helper from "../../helpers/auth"; import { StatusBarLarge } from "../status-bar"; import { CardThree } from "../cards"; import { TextAreaField } from "../form-elements"; +import Auth from "../../helpers/auth"; // import { BtnTwo } from "../buttons"; // const $ = window.$; class FormViewer extends Component { @@ -549,6 +550,11 @@ class FormViewer extends Component { }), }; + const instituteCourses = Auth.get('instituteCourses'); + if(instituteCourses.length > 0) { + formDetails['districtName'] = instituteCourses[0].districtName; + } + // formDetails = JSON.stringify(formDetails); // console.log(JSON.parse(formDetails)); diff --git a/src/layouts/Inspector/FormView.tsx b/src/layouts/Inspector/FormView.tsx index fd33fe4d6d612f5f8d16992e54369102ac4019bc..493e3fc6e5386d75bc565a31c930c8a42d0b8749 100644 --- a/src/layouts/Inspector/FormView.tsx +++ b/src/layouts/Inspector/FormView.tsx @@ -383,12 +383,12 @@ export const FormView = ({ applicationData, formData }: FormViewProps) => { }); if (tempArray.includes("")) { - setEnableInspectionComplete(false); + setEnableInspectionComplete(true); } else { if (formData.inspectionFields) { setEnableInspectionComplete(true); } else { - setEnableInspectionComplete(false); + setEnableInspectionComplete(true); } } }