web client v0.10 (restaurant view)
This commit is contained in:
@@ -169,7 +169,7 @@ export default function EditDish() {
|
||||
const validation = {
|
||||
name: validator.isLength(state.name, { max: 50, min: 1 }),
|
||||
category: restaurant.categories.includes(state.category),
|
||||
price: validator.isAlphanumeric(state.price),
|
||||
price: validator.isLength(state.price, { max: 10, min: 1 }),
|
||||
};
|
||||
|
||||
setState({
|
||||
@@ -275,9 +275,8 @@ export default function EditDish() {
|
||||
<TextField
|
||||
className={styles.textInput}
|
||||
required
|
||||
label="Cena"
|
||||
label="Cena (zł)"
|
||||
placeholder="np. 18,50"
|
||||
type="number"
|
||||
error={state.priceError}
|
||||
value={state.price}
|
||||
variant="outlined"
|
||||
@@ -294,9 +293,8 @@ export default function EditDish() {
|
||||
/>
|
||||
<TextField
|
||||
className={styles.textInput}
|
||||
label="Waga (g)"
|
||||
type="number"
|
||||
placeholder="np. 150"
|
||||
label="Porcja"
|
||||
placeholder="np. 150g"
|
||||
value={state.weight}
|
||||
variant="outlined"
|
||||
onChange={(event) =>
|
||||
|
||||
@@ -161,7 +161,7 @@ export default function NewRestaurant() {
|
||||
const validation = {
|
||||
name: validator.isLength(state.name, { max: 50, min: 1 }),
|
||||
category: restaurant.categories.includes(state.category),
|
||||
price: validator.isAlphanumeric(state.price),
|
||||
price: validator.isLength(state.price, { max: 10, min: 1 }),
|
||||
};
|
||||
|
||||
setState({
|
||||
@@ -288,9 +288,8 @@ export default function NewRestaurant() {
|
||||
<TextField
|
||||
className={styles.textInput}
|
||||
required
|
||||
label="Cena"
|
||||
label="Cena (zł)"
|
||||
placeholder="np. 18,50"
|
||||
type="number"
|
||||
error={state.priceError}
|
||||
value={state.price}
|
||||
variant="outlined"
|
||||
@@ -307,9 +306,9 @@ export default function NewRestaurant() {
|
||||
/>
|
||||
<TextField
|
||||
className={styles.textInput}
|
||||
label="Waga (g)"
|
||||
label="Porcja"
|
||||
type="number"
|
||||
placeholder="np. 150"
|
||||
placeholder="np. 150g"
|
||||
value={state.weight}
|
||||
variant="outlined"
|
||||
onChange={(event) =>
|
||||
|
||||
Reference in New Issue
Block a user