From 6da68389f05d9e6903f599542eb845c897637454 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 23 Nov 2023 08:02:47 +0100 Subject: [PATCH] Fixed a bug in the server.js --- .../pages/Home/components/Dialog/Dialog.jsx | 53 +++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/client/src/pages/Home/components/Dialog/Dialog.jsx b/client/src/pages/Home/components/Dialog/Dialog.jsx index ef87ca3..37d520c 100644 --- a/client/src/pages/Home/components/Dialog/Dialog.jsx +++ b/client/src/pages/Home/components/Dialog/Dialog.jsx @@ -7,7 +7,10 @@ import Button from "@/common/components/Button"; export const Dialog = ({onClose, open}) => { - const {rounds, updateRounds, demandTable, updateDemandTable} = useContext(SettingsContext); + const { + rounds, updateRounds, demandTable, updateDemandTable, startCapital, setStartCapital, costPerCake, + setCostPerCake, costPerRound, setCostPerRound, maxProduction, setMaxProduction, maxPrice, setMaxPrice + } = useContext(SettingsContext); const deleteDemand = (key) => { let newDemandTable = {...demandTable}; @@ -40,10 +43,10 @@ export const Dialog = ({onClose, open}) => {
- +

Spieleinstellungen

- +
@@ -56,7 +59,37 @@ export const Dialog = ({onClose, open}) => {

Runden

updateRounds(parseInt(e.target.value))} /> + onChange={(e) => updateRounds(parseInt(e.target.value))}/> +
+ +
+

Startkapital

+ setStartCapital(parseInt(e.target.value))}/> +
+ +
+

Kosten pro Kochen

+ setCostPerCake(parseInt(e.target.value))}/> +
+ +
+

Kosten pro Runde

+ setCostPerRound(parseInt(e.target.value))}/> +
+ +
+

Absatzmenge

+ setMaxProduction(parseInt(e.target.value))}/> +
+ +
+

Absatzpreis

+ setMaxPrice(parseInt(e.target.value))}/>
@@ -71,24 +104,24 @@ export const Dialog = ({onClose, open}) => {

Ab {key === "0" && "0 €"}

{key !== "0" && updateDemandKey(key, e)} />} + onChange={(e) => updateDemandKey(key, e)}/>}
updateDemand(key, e)} /> - {key !== "0" && deleteDemand(key)} />} + onChange={(e) => updateDemand(key, e)}/> + {key !== "0" && deleteDemand(key)}/>}
); })}
-
- +
- {open &&
} + {open &&
} ) } \ No newline at end of file