YuriPadilla / capstone-project-havana-bikes

https://capstone-project-havana-bikes-black.vercel.app
0 stars 0 forks source link

Userstory 7 - Add button "Book" with functionality #14

Open YuriPadilla opened 1 year ago

YuriPadilla commented 1 year ago

Value Proposition

As a User, I want to see the button "Book", so that I can book the bikes.

Description

The button "Book" is displayed as disable while there is no bikes or no date selected. When there is bikes and date selected, the button is displayed as active. Clicking this button will display a toast notification confirming that the booking was successful, the form will be reseted and it will get the shopping cart empty.

Bildschirmfoto 2023-02-07 um 12 53 07

Acceptance Criteria

Tasks

Complexity

M

HosseinKrouna commented 1 year ago

Hi Yuri,

I think you wanted to say in your description that the button is hidden until both (date and bike) have been selected. Instead of or.

In your acceptance criteria you write once is disabled if either bike or date is selected. The active status of your booking button is logical for me. But does it make sense to be disabled to book if only one of them is missing? You should think i'm wrong about that, If you want you can explain it to me in more detail ;)

Maybe you want to lead your user back to your homepage after booking. But now it wouldn't be a reason.

YuriPadilla commented 1 year ago

Hi Hossein!!! Thanks a lot for your review and for your time!!! :) :) :)

In my description I wanted to say exact what I said: "...disable..." and not hidden. I mean, the user can see the button, but it is no possible to click on it until both (date and bike) have been selected. So... if only one input, bikes "or" date is missing, then the button is disable. Even in the Excalidraw image it is possible to see that the color of the button is a light gray which indicates it is disable.

In my acceptance criteria I said that the button is disable if bikes "or" date are not selected. I think "or" is right...!!!

For sure it makes sense this button to be disable to book if only one of them is missing!!! BOTH inputs are needed!!!

About leading the user back to the homepage after booking, that is a good idea, maybe I will do something similar! 😀

Thanks again for your review, Hossein!!! Many greetings to you!!! 😀 👍

HosseinKrouna commented 1 year ago

haha 😅 I actually meant "disable"... yesterday I probably had a mistake in thinking

I was just wondering because in your acceptance criteria you say that, the button is disabled if Bikes or Date are not selected. What happens if both is not selected? I would understand that you could then book even though "both" inputs would be missing. But I could be wrong about that too

Anyway, I think these are small things, so we don't have to deal with them any longer and I'm happy to give you a go for your user story 😀👍

YuriPadilla commented 1 year ago

Hey Hossein! Nice to hear from you! ...And thanks for your comment! 😀

To your question: "What happens if both is not selected?", if both (bikes or date) are not selected (at the same time), it means that at least one of them is not selected, and if so, then it is no possible to rent/book... so here again, the "or" word is right here.

When you say that I should've written "and" instead of "or"... that "and" means that both at the same time have to be NOT selected so that the button is disable... (or the same... you can book/rent a bike even when there is no bikes or no date selected) ...and that is not logical ...and I don't want that.

To be able to rent a bike, both of the inputs must be selected (bikes "and" date) so that the button is active!!!

If you don't understand the logic, then you can read the description again...!!!

Greetings!!! 😀 👍