-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: main
Are you sure you want to change the base?
Conversation
/// <param name="newGuest"></param> | ||
/// <returns></returns> | ||
[HttpPost, Produces("application/json"), Route("")] | ||
public async Task<ActionResult<Reservation>> CreateGuest( |
There was a problem hiding this comment.
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
.
// 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); |
There was a problem hiding this comment.
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.
id: z.string(), | ||
roomNumber: z.string(), | ||
guestEmail: z.string().email(), | ||
start: z.string(), | ||
end: z.string(), |
There was a problem hiding this comment.
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.
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.
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
npx concurrently
command on powershell which took me some time to solveInvalidOperationException: 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 filterreservations that are for today or in the future