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

Antonio Valentini #2

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

Conversation

antoniovalentini
Copy link

@antoniovalentini antoniovalentini commented Oct 21, 2024

Antonio Valentini

The project was quite fun and challenging. I haven't got much experience in frontend development and that led me to waste some time on simple issues.

  • RE#001#_completed
  • RE#002#_completed
  • RE#003#_completed (except for the filter reservations that are for today or in the future, more info in the notes)

Task Report

The commit log is an accurate representation of my time spent from the first commit. It took me 4 hours to accomplish the 3 tasks. I spent most of the time trying to complete RE#001 and RE#003 with their related FRONTEND requirements.

Notes

  • I had an issue running the npx concurrently command on powershell which took me some time to solve
  • In the end I spent more then 30 minutes trying to troubleshoot the error InvalidOperationException: Collection was modified; enumeration operation may not execute. due to the new /api/staff/reservations endpoint, and I couldn't figure out the root cause. This was happening only when testing the endpoint from the UI. Integration tests where ok. Due to that issue, I wasn's able to apply the requested filter reservations that are for today or in the future

/// <param name="newGuest"></param>
/// <returns></returns>
[HttpPost, Produces("application/json"), Route("")]
public async Task<ActionResult<Reservation>> CreateGuest(
Copy link
Author

@antoniovalentini antoniovalentini Oct 21, 2024

Choose a reason for hiding this comment

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

Probably this wasn't within the requirements, but I needed a way to create a guest before creating a reservation, due to the FK GuestEmail.

Comment on lines +87 to +89
// TODO: throws an error => Collection was modified; enumeration operation may not execute
// it might be useful to have a custom ITimeProvider
// var list = reservations.Where(r => r.Start >= DateTime.Today);
Copy link
Author

Choose a reason for hiding this comment

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

At this point I kept getting the error InvalidOperationException: Collection was modified; enumeration operation may not execute. when calling the endpoint from the UI. I wasn't able to reproduce it through tests and it took me some time away.

Comment on lines +15 to +19
id: z.string(),
roomNumber: z.string(),
guestEmail: z.string().email(),
start: z.string(),
end: z.string(),
Copy link
Author

Choose a reason for hiding this comment

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

Not sure there was a more elegant way to tell Zod to use camelCale here.

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.

1 participant