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

Reusable form #1471

Merged
merged 13 commits into from
Aug 26, 2023
Merged

Reusable form #1471

merged 13 commits into from
Aug 26, 2023

Conversation

plang-psm
Copy link
Member

@plang-psm plang-psm commented Aug 22, 2023

Fixes #1470

What changes did you make and why did you make them ?

  • Reusable project formform
  • Separate the Add and Edit project pages
  • Add an Edit icon badge that toggles edit mode on/off.
  • Add mouse pointer to buttons for user experience.
  • Remove Events UL styling - causing a double border.
  • Implement a PUT request instead of PATCH for the edit project request.
  • Reformat and comment files.
  • Validation for the edit page
  • React Hook Form State
  • Including the buttons within the project for + minor styling
  • Edit Mode cancel function using React Hook Form reset method

Additional comments

  • Edit project page validation needs to be updated to read current project details on the Edit Page. The validation isn't picking up the passed values for the project info and returns a validation error when you try to save. It does however, remove the highest error, one by one, if you continue to save. Eventually they all clear and the save submits.
  • I wanted to bring up this concern about the api/ProjectServiceApi/create. It is currently handling a POST request and returning the project ID. I believe these should be separate functions since they serve different purposes.

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Before image
After image image

@github-actions
Copy link

Want to review this pull request? Take a look at this documentation for a step by step guide!

From your project repository, check out a new branch and test the changes.

git checkout -b plang-psm-reusable-form development
git pull https://github.com/plang-psm/VRMS.git reusable-form

Copy link
Member

@trillium trillium left a comment

Choose a reason for hiding this comment

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

Great work!

I've left a few requests for changes, please update those and then we'll get it merged!

client/src/components/ProjectForm.js Outdated Show resolved Hide resolved
client/src/components/ProjectForm.js Show resolved Hide resolved
client/src/components/ProjectForm.js Outdated Show resolved Hide resolved
client/src/components/ProjectForm.js Outdated Show resolved Hide resolved
@trillium
Copy link
Member

Feel free to do these things a different way if you see fit, but I updated the code to revert to prev state on 2nd Edit button click, and added back in the Manually Triggered Event Checkin section here:

Yo, I heard you liked PRs so I made a PR to you PR

@plang-psm

This comment was marked as outdated.

@plang-psm
Copy link
Member Author

Pull request add a few more tasks which is now complete:

  • Validation for the edit page
  • React Hook Form State
  • Including the buttons within the project for + minor styling
  • Edit Mode cancel function using React Hook Form reset method

Copy link
Member

@trillium trillium left a comment

Choose a reason for hiding this comment

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

Stoked on these changes!

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.

1396 + Reusable form
2 participants