Přenos změn
This commit is contained in:
parent
e8d7e3fd9e
commit
160f3bf7f0
@ -72,8 +72,4 @@ export const removePizza = async (login: string, pizzaOrder: PizzaOrder) => {
|
|||||||
|
|
||||||
export const updateNote = async (login: string, note?: string) => {
|
export const updateNote = async (login: string, note?: string) => {
|
||||||
return await api.post<any, any>('/api/updateNote', JSON.stringify({ login, note }));
|
return await api.post<any, any>('/api/updateNote', JSON.stringify({ login, note }));
|
||||||
}
|
|
||||||
|
|
||||||
export const updateFoodChoice = async (login: string, choice: Locations, foodName?: string) => {
|
|
||||||
return await api.post<any, any>('/api/updateFoodChoice', JSON.stringify({ login, choice, foodName }));
|
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
import { EVENT_DISCONNECT, EVENT_MESSAGE, SocketContext } from './context/socket';
|
import { EVENT_DISCONNECT, EVENT_MESSAGE, SocketContext } from './context/socket';
|
||||||
import { addPizza, createPizzaDay, deletePizzaDay, finishDelivery, finishOrder, getData, getFood, getPizzy, getQrUrl, lockPizzaDay, removePizza, unlockPizzaDay, updateChoice, updateFoodChoice, updateNote } from './Api';
|
import { addPizza, createPizzaDay, deletePizzaDay, finishDelivery, finishOrder, getData, getFood, getPizzy, getQrUrl, lockPizzaDay, removePizza, unlockPizzaDay, updateChoice, updateFoodChoice, updateFoodChoice, updateNote } from './Api';
|
||||||
import { useAuth } from './context/auth';
|
import { useAuth } from './context/auth';
|
||||||
import Login from './Login';
|
import Login from './Login';
|
||||||
import { Locations, ClientData, Pizza, PizzaOrder, State, Order, Food, Restaurants, FoodChoice } from './Types';
|
import { Locations, ClientData, Pizza, PizzaOrder, State, Order, Food, Restaurants, FoodChoice, FoodChoice } from './Types';
|
||||||
import { Alert, Button, Col, Form, Row, Table } from 'react-bootstrap';
|
import { Alert, Button, Col, Form, Row, Table } from 'react-bootstrap';
|
||||||
import Header from './components/Header';
|
import Header from './components/Header';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
@ -32,6 +32,8 @@ function App() {
|
|||||||
const poznamkaRef = useRef<HTMLInputElement>(null);
|
const poznamkaRef = useRef<HTMLInputElement>(null);
|
||||||
const [foodSelection, setFoodSelection] = useState<Food[]>();
|
const [foodSelection, setFoodSelection] = useState<Food[]>();
|
||||||
const foodChoiceRef = useRef<HTMLSelectElement>(null);
|
const foodChoiceRef = useRef<HTMLSelectElement>(null);
|
||||||
|
const [foodSelection, setFoodSelection] = useState<Food[]>();
|
||||||
|
const foodChoiceRef = useRef<HTMLSelectElement>(null);
|
||||||
|
|
||||||
// Prvotní načtení aktuálního stavu
|
// Prvotní načtení aktuálního stavu
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user