Skip to content

Conversation

@barshathakuri
Copy link
Collaborator

@barshathakuri barshathakuri commented Oct 15, 2025

Summary

Add EAP Registration Form.

Addresses

  • No issue

Changes

  • Add EAP Registration Form

This PR Ensures:

  • No typos or grammatical errors
  • No conflict markers left in the code
  • No unwanted comments, temporary files, or auto-generated files
  • No inclusion of secret keys or sensitive data
  • No console.log statements meant for debugging
  • All CI checks have passed

Additional Notes

Optional: Add any other relevant context, screenshots, or details here.

@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2025

⚠️ No Changeset found

Latest commit: 20d7ef9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 53 to 144
<InputSection
title="National Society (NS)"
description="Select National Society that is planning to apply for the EAP"
withAsteriskOnTitle
>
<NationalSocietySelectInput
error={undefined}
name="national_society"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good go ahead, but @barshathakuri , you need to create a typing, setup form and then create inputs. The form needs to be editable and working, only the send action is stopped. Only after we do this, we can change things easily later on.


type FormSchema = ObjectSchema<PartialFormFields>;
export const formSchema: FormSchema = {
fields: (value) => ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to make every field required?

} = props;

const strings = useTranslation(i18n);
const defaultFormValue = useMemo(() => ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After removing every field required we can have default value empty.

Copy link
Member

@AdityaKhatri AdityaKhatri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure all input components have error handled. Add nonFieldErrors as well. Also, make sure select componets have their options fetched if they are there.

Comment on lines 47 to 48
const eapFormOptions = [
{ value: 'full', label: 'Full application' },
{ value: 'simplified', label: 'Simplified application' },
{ value: 'not_sure', label: 'Not Sure' },
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use translation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dummy data. I'll be an Enum.

Comment on lines 31 to 33
interface Props {
disabled?: boolean;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always keep props next to the component

Comment on lines 179 to 180
keySelector={(option) => option.value}
labelSelector={(option) => option.label}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define these outside plz

Comment on lines 193 to 207
value={value?.eap_start_date}
/>
<DateInput
name="eap_end_date"
onChange={setFieldValue}
value={value?.eap_end_date}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add errors here

onChange={setFieldValue}
keySelector={partnerInvolvedKeySelector}
labelSelector={partnerInvolvedLabelSelector}
options={[]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we fetch this from? Either implement or add FIXME

Comment on lines +335 to +355
<Button
name={undefined}
onClick={handleFormSubmit}
type="submit"
variant="secondary"
disabled={disabled}
>
{strings.eapSubmitButton}
</Button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll probably need a cancel button too right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a submit button only in figma. Do we need to add the cancel button as well?
We also have a cancel button on the top of the form.

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.

4 participants