Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/wp 715 react exception form follow on #330

Draft
wants to merge 8 commits into
base: feat/apcd-react-conversion
Choose a base branch
from

Conversation

sophia-massie
Copy link
Contributor

@sophia-massie sophia-massie commented Oct 16, 2024

Overview

Button actions, add non-dynamic fields, allow form to choose between other exception or threshold.
This should complete work on the React Exception Form page.

Related

Changes

  • Loads other/threshold forms dynamically
  • Add/remove threshold working
  • Dynamically appending unique index for threshold form fields

Testing

  1. Go to http://localhost:8000/submissions/exception/ and try out the different exception types and check dynamic fields

UI

Main page

Screenshot 2024-10-15 at 7 10 54 PM

Main page after selection to threshold

Screenshot 2024-10-15 at 7 11 22 PM
Screenshot 2024-10-15 at 7 11 37 PM

Threshold when adding an exception and populating dynamic fields

Screenshot 2024-10-15 at 7 12 32 PM

Other exception selection page

Screenshot 2024-10-15 at 7 13 07 PM

Notes

TODO:

  • Handle submit
  • Handle validation
  • Pass threshold form fields back to exceptionFormPage using something like
interface ExceptionFormProps {
  index: number;
  formikProps: {
    setFieldValue: (field: string, value: any) => void;
    values: any; // or a more specific type
  };
}

const ExceptionForm: React.FC<ExceptionFormProps> = ({ index, formikProps }) => {
  const { setFieldValue, values } = formikProps;

…. Dynamically appending unique index for thresholdform fields
@sophia-massie sophia-massie changed the base branch from main to feat/apcd-react-conversion October 16, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant