dimitriosxmi / ArtistsReferenceOrganizer

Neue Fische Capstone Project
https://artists-reference-organizer.vercel.app
0 stars 0 forks source link

Feature/us15/entry view edit mode #37

Closed dimitriosxmi closed 1 year ago

dimitriosxmi commented 1 year ago

Please take a moment to review this ❤️ 😊

Goal: US15 TL; DR: Existing entries can now be editted through the Entry form which can be accessed through Edit entry button which can be found in the entry view page.

Deployment

+ Add PenIcon svg
! Update components/svgs/index.js
# Exports the new svg.

+ Add EditEntryButton component
# Basically almost the same as the NewEntryButton component.

! Update BackButton component
# Now behaves diffently when called with editMode.

! Update entry.js api page
# Handles the PATCH method for updating an entry by id.

! Update NewEntryForm component
# Renamed to EntryForm.
# Adapted to now behave diffently when it
# receives the editEntryData through props:
# Fills all input fields with the received data.
# Submit button styling and Icon changes.
# Submitting makes a PATCH instead of POST request.

! Update new-entry.js page
# Updated import name of the previously NewEntryForm component.

! Update EntryDetails component
# Now uses EditEntryButton component.
# Now uses EntryForm component.

! Update [entryId].js page
# Uses the editMode and setEditMode state variable.
# Passes new props to BackButton and EntryDetails components