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

Refactor: company modal data persisting. #157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bwillett2003
Copy link
Collaborator

@bwillett2003 bwillett2003 commented Feb 26, 2025

Type of Change

  • refactor 🧑‍💻
  • testing 🧪

Description

Refactored the CompanyShow.tsx file to have user typed data persist upon accidental closing of the modal.

The zip code input field also was allowing letters and characters to be saved. I made it where only integers are accepted. The 5 digit and 9 digit zip-codes are allowed and the field will automatically insert a hyphen if typing more that 5 digits.

Cypress tests have been added to verify the data persists and to verify the zip-code.

Motivation and Context

The company edit modal was not saving data that the user typed in any of the fields if that user closed the modal on accident.

Now the data will persist until the user clicks save or navigates to another page that is not the Company Details page.

Related Tickets

closes #141

Screenshots (if appropriate):

Added Test?

  • Yes 🫡
  • All previous tests still pass 🥳

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

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.

FE - Refactor Company Modal to have persisting data
1 participant