redesign / fixes

This commit is contained in:
2021-02-06 15:25:31 +01:00
parent 611b101e9e
commit f25196f57e
26 changed files with 251 additions and 66 deletions

View File

@@ -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" }}>