Skip to content

Reusable form#1471

Merged
plang-psm merged 13 commits intohackforla:developmentfrom
plang-psm:reusable-form
Aug 26, 2023
Merged

Reusable form#1471
plang-psm merged 13 commits intohackforla:developmentfrom
plang-psm:reusable-form

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!

@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 plang-psm requested a review from trillium August 25, 2023 04:41
@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