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

Implement the third page, Select Menu Items #10

Open
dartandrevinsky opened this issue Apr 30, 2021 · 5 comments
Open

Implement the third page, Select Menu Items #10

dartandrevinsky opened this issue Apr 30, 2021 · 5 comments
Assignees

Comments

@dartandrevinsky
Copy link
Collaborator

Use this sketch as a guideline:

Select Menu Items

@dartandrevinsky dartandrevinsky self-assigned this Apr 30, 2021
dartandrevinsky added a commit that referenced this issue Apr 30, 2021
 - Basic structure, redux store and actions
 - Handlers to move to this page
dartandrevinsky added a commit that referenced this issue May 13, 2021
 - Added a new row: selected restaurant
dartandrevinsky added a commit that referenced this issue May 18, 2021
 - Page retrieves the menu of the restaurant, displays it
dartandrevinsky added a commit that referenced this issue May 19, 2021
 - User selects item from the list of menu items
 - Menu items reflect the presence in the tray
@dartandrevinsky
Copy link
Collaborator Author

Presently:

image

dartandrevinsky added a commit that referenced this issue May 21, 2021
 - Cart ('Your tray') is updated based on the user selection and confirmation from the API backend
@dartandrevinsky
Copy link
Collaborator Author

The above commit backs these UI changes:
image

dartandrevinsky added a commit that referenced this issue May 21, 2021
 - Cart ('Your tray') has its own actions column with ability to add/remove items (WIP)
@dartandrevinsky
Copy link
Collaborator Author

Presently the UI looks thus:
image

@dartandrevinsky
Copy link
Collaborator Author

Description of the added API endpoints

POST <api>/cart

Description: Creates a new cart object

Body: <empty>

Response:

{
  id, // id of the cart
  items // Array<CartItem>
}

PUT <api>/cart/:cartId

Description: Updated the cart item's quantity or adds one to it

Body:

{ 
  cartId, // id of the current cart
  restaurantId, // id of the restaurant the menu item belongs to
  itemId, // id of the menu item
  qty // desired quantity of the item in the cart
}

Response:

// CartItem:
{
  id,
  count,
  meta: {
    restaurantId
  }
}

dartandrevinsky added a commit that referenced this issue May 24, 2021
 - Cart ('Your tray') has its own actions column with ability to add/remove items and update subtotal
@dartandrevinsky
Copy link
Collaborator Author

Empty tray:

image

Tray with Items:

image

Subtotal added:

image

dartandrevinsky added a commit that referenced this issue May 24, 2021
 - adjustments in UI (columns width and formatting)
 - cleanup (debugger statements removed, etc.)
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

No branches or pull requests

1 participant