redesign / fixes
This commit is contained in:
@@ -90,18 +90,19 @@ export default function EditDishList(props) {
|
||||
setSetListOpen(true);
|
||||
};
|
||||
|
||||
const addToSet = (setName) => {
|
||||
const addToSet = (setName, quantity) => {
|
||||
setSetListOpen(false);
|
||||
const data = {
|
||||
setName: setName,
|
||||
restaurantId: props.restaurantId,
|
||||
dishId: selectedDish,
|
||||
quantity: quantity,
|
||||
action: "add",
|
||||
};
|
||||
dispatch(showBackdrop());
|
||||
axios({
|
||||
method: "POST",
|
||||
url: backend + "/restaurant/lunch",
|
||||
url: backend + "restaurant/lunch",
|
||||
data: data,
|
||||
headers: {
|
||||
"x-auth-token": token,
|
||||
@@ -182,7 +183,7 @@ export default function EditDishList(props) {
|
||||
lunchMenu={props.lunchMenu}
|
||||
open={setListOpen}
|
||||
cancel={() => setSetListOpen(false)}
|
||||
add={(setName) => addToSet(setName)}
|
||||
add={(setName, quantity) => addToSet(setName, quantity)}
|
||||
/>
|
||||
{thisCategoryDishes.length === 0 ? (
|
||||
<ListItem style={{ marginLeft: "14px", fontSize: "12px" }}>
|
||||
|
||||
Reference in New Issue
Block a user