Antonio Valentini - #2
Open
antoniovalentini wants to merge 12 commits into
Open
Conversation
| /// <param name="newGuest"></param> | ||
| /// <returns></returns> | ||
| [HttpPost, Produces("application/json"), Route("")] | ||
| public async Task<ActionResult<Reservation>> CreateGuest( |
Author
There was a problem hiding this comment.
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); |
Author
There was a problem hiding this comment.
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(), |
Author
There was a problem hiding this comment.
Not sure there was a more elegant way to tell Zod to use camelCale here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 concurrentlycommand 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