diff --git a/app/containers/Forms/Form.tsx b/app/containers/Forms/Form.tsx index 392870bcdd..ac87fe9f5c 100644 --- a/app/containers/Forms/Form.tsx +++ b/app/containers/Forms/Form.tsx @@ -6,7 +6,7 @@ import JsonSchemaForm, { AjvError } from 'react-jsonschema-form'; import {Form_query} from 'Form_query.graphql'; -import {Button, Row, Col} from 'react-bootstrap'; +import {Button, Row, Col, Alert} from 'react-bootstrap'; import globalFormStyles from './FormSharedStyles'; import Link from 'next/link'; import {FormJson} from 'next-env'; @@ -92,6 +92,9 @@ export const FormComponent: React.FunctionComponent = ({ window.scrollTo(0, 0); }; + const showAllocationReminder = formResult.some((result) => { + return result?.requiresEmissionAllocation === true; + }); const formClass = uiSchema?.['ui:className'] || ''; return (
@@ -122,6 +125,14 @@ export const FormComponent: React.FunctionComponent = ({ onSubmit={onComplete} onChange={onValueChanged} > + {showAllocationReminder && ( + + Before you proceed: + Please refer to the guidance documents to calculate the emission + allocations for each product or service, and ensure that you report + all the necessary product or services + + )}
@@ -130,22 +141,21 @@ export const FormComponent: React.FunctionComponent = ({ pathname: '/reporter/user-dashboard' }} > - Save & Exit + Save & Exit - {ciipApplicationWizardByFormId && - ciipApplicationWizardByFormId.formPosition > 0 && ( - - )} + {ciipApplicationWizardByFormId?.formPosition > 0 && ( + + )}