upleveled / next-js-example-fall-2023-atvie

https://next-js-example-fall-2023-vienna-austria.fly.dev/
2 stars 2 forks source link

Add birth dates, improve UX for admin page + API #9

Closed ProchaLu closed 9 months ago

ProchaLu commented 1 year ago

Follow up PR to

Dates handling has been added to the animals-admin page, allowing for the creation, updating, and deletion of animals. These changes must be done in the Next.js API lecture, where we create the API routes and the animals-admin page. To simplify date handling in input fields, we introduce the dayjs library.

value={dayjs(birthDateInput).format('YYYY-MM-DD')}

With these updates, we also have been updating the UI/UX of the animals-admin page. The page now has a table with all the information on the left side and a form for adding new animals on the right side. Without selecting any animal, you can add new animals to the list.

Screenshot 2024-01-25 at 14 54 08

For editing or deleting an animal, you can click on the specific row and select the animal you want to edit or delete. The selected animal remains highlighted, and the animal information is in the form and you can update or delete the animal by clicking Save changes or Delete. After clicking on any button, the selected row gets deselected, and the form changes to Add Animal.

Screenshot 2024-01-25 at 14 54 14

Also added a media query for a responsive design for the Animal Dashboard page

Screenshot 2024-01-25 at 14 54 34 Screenshot 2024-01-25 at 14 54 39

Additionally, the animal-management-naive-dont-copy pages have been updated to use date parameters:

karlhorky commented 11 months ago

@ProchaLu you'll need to resolve this error before continuing with your PR here: