hackforla / hackforla/HomeUniteUs

Other Pets component

Open
#682 1 comment 0 reactions 0 assignees View on GitHub
Complexity: Small dependency enhancement p-Feature: Profile Guest Role: Front End Section: 2 size: 2pt
Dominant language
Python
Stars
45
Forks
22
Avg merge
15d 1h
Merged PRs (30d)
1

Description

### Dependency
- Awaiting updated design

### Overview
Implement the "Pets" component for the Intake profile.

Screenshot 2024-04-23 at 5 46 15 PM

You'll have to work off the `feat/generated-profile` branch so make sure to check it out and pull in the most up-to-date changes.

### Action Items

- [x] Add a "pets" type to the FieldTypes type definition.
- [x] Add a case to the switch statement that renders fields
- [x] Add the field to the `/src/utils/test/db/profile.ts` in the "Other Guests/Pets section"
- [x] Build the pets field component:
- [x] Create a component that renders a field for a user to type in a pet
- [x] The field has a button that allows the user to add another pet
- [x] Add a button to delete pets
- [x] Add custom validation if necessary

### Resources/Instructions
The `AdditionalGuestsField` could be a good reference to how to approach building this, but you will have to make some tweaks. You may have to define the data as an array of object so [here](https://formik.org/docs/guides/arrays) is some info from Formik on how to handle that.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.