-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update github workflow yaml file * rename the frontend folder * create the checkout button * create dynamic route * update the routing definition and getmenubyId API call * Merge branch 'development' of github.com:olasunkanmi-SE/restaurant into development * remove the styling for menu name * optimize the components * conditionally render the checkout component * remove code smell * Merge branch 'release' into development * update the menu item page and clean up the navigation * create the delete menu repo method, service and controller * create the delete menu API * update food menu component to include item id * update food menu component to include item id * add the add menu item to cart functionality * implement add menu items to cart * fix build errors * fix code smell * create the item quantity button component * update the menu list ui * implement the add items to cart functionality * fix code smell * create the selected items summary * update cart reducer * update the add item to cart implementation * create folder structure for componsnts * implement the remove from cart functionality * implement the add to cart functionality * rename add and remove from cart to add and remove menu from cart * remove the menuid from foodmenu component * create the shopping component * implement display menu quantity, also display only menu items ata a time * prevent increase in total price if the menu quantity is 1 * fix issues with totalprice calculations * fix issues with menu items reduction * fix the bug in shopping cart provider * remove menu price from global state * fix bug in remove menu from cart * fix error in menuItems calculations * update some names in the shoppingcart context * add the none button for food items * update remove item from cart method to calculate total price correctly * remove unused file * create the radio button * calculate order quantity * remove quantity count from checkout * Calculate cart total * disable add to cart buttons on page load * add development branch to github workflow, in order to track and build branches created from issues * fix code smells * enable the add to cart button on click none and addons * Incrementing cart quantity without addons * Fix: Add to Cart without incrementing the cart quantity throws an error * Create the summary modal and include error boundary in applocation * update error boundary url * add the edit and update button to the order summary page * add the call to action to clear cart * generate Ids for ordersummary * generate ordersummary ids * update the cart UI * create the localstorage utility functions * remove uuid package * remove crypto declaration * save state in local storage * persist cart state in local storage * Display list of car items
- Loading branch information
1 parent
1834c0b
commit d7da6ea
Showing
8 changed files
with
175 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Stack } from "react-bootstrap"; | ||
import { selectedItem } from "../../reducers"; | ||
import { QtyButton } from "../MenuItems/addItemButton"; | ||
import { useShoppingCart } from "../../hooks/UseShoppingCart"; | ||
import { useState } from "react"; | ||
|
||
export type cartSelectedItem = { | ||
selectedItem: selectedItem; | ||
isEdit: boolean; | ||
}; | ||
|
||
export const ShoppingCartSelectedItem = ({ selectedItem, isEdit }: cartSelectedItem) => { | ||
const { GetOrderSummary } = useShoppingCart(); | ||
|
||
return ( | ||
<div> | ||
<Stack key={selectedItem.id} direction="horizontal" gap={3} style={{ marginBottom: "10px", marginTop: "10px" }}> | ||
<span> | ||
<small> | ||
x{selectedItem.quantity} {selectedItem.name} | ||
</small> | ||
</span> | ||
</Stack> | ||
</div> | ||
); | ||
}; |
This file contains 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
Oops, something went wrong.