From c311cc2fd7114214cde38d67f1f0f3aab22ca773 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20H=C3=A1jek?= <mikrop@centrum.cz>
Date: Sun, 2 Feb 2025 16:01:21 +0100
Subject: [PATCH] =?UTF-8?q?Oprava=20import=C5=AF=20klienta=20do=20slo?=
 =?UTF-8?q?=C5=BEky=20types,=20aby=20nebylo=20pot=C5=99eba=20slo=C5=BEku?=
 =?UTF-8?q?=20kok=C3=ADrovat?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 client/package.json                                  | 5 ++---
 client/src/App.tsx                                   | 5 ++---
 client/src/api/EasterEggApi.ts                       | 2 +-
 client/src/api/FoodApi.ts                            | 2 +-
 client/src/api/PizzaDayApi.ts                        | 2 +-
 client/src/api/VotingApi.ts                          | 2 +-
 client/src/components/Header.tsx                     | 2 +-
 client/src/components/PizzaOrderList.tsx             | 2 +-
 client/src/components/PizzaOrderRow.tsx              | 2 +-
 client/src/components/modals/FeaturesVotingModal.tsx | 2 +-
 client/src/context/eggs.tsx                          | 2 +-
 11 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/client/package.json b/client/package.json
index 3dbf06a..859efd8 100644
--- a/client/package.json
+++ b/client/package.json
@@ -31,9 +31,8 @@
     "vite-tsconfig-paths": "^5.1.4"
   },
   "scripts": {
-    "copy-types": "cp -r ../types ./src",
-    "start": "yarn copy-types && vite",
-    "build": "yarn copy-types && vite build"
+    "start": "yarn vite",
+    "build": "yarn vite build"
   },
   "eslintConfig": {
     "extends": [
diff --git a/client/src/App.tsx b/client/src/App.tsx
index 7e5baab..aba63fb 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -8,13 +8,12 @@ import { Alert, Button, Col, Form, Row, Table } from 'react-bootstrap';
 import Header from './components/Header';
 import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
 import PizzaOrderList from './components/PizzaOrderList';
-import SelectSearch, { SelectedOptionValue } from 'react-select-search';
+import SelectSearch, {SelectedOptionValue, SelectSearchOption} from 'react-select-search';
 import 'react-select-search/style.css';
 import './App.scss';
-import { SelectSearchOption } from 'react-select-search';
 import { faCircleCheck, faNoteSticky, faTrashCan } from '@fortawesome/free-regular-svg-icons';
 import { useSettings } from './context/settings';
-import { ClientData, Restaurants, Food, Order, Locations, PizzaOrder, PizzaDayState, FoodChoices, DayMenu, DepartureTime, LocationKey } from './types';
+import { ClientData, Restaurants, Food, Order, Locations, PizzaOrder, PizzaDayState, FoodChoices, DayMenu, DepartureTime, LocationKey } from '../../types';
 import Footer from './components/Footer';
 import { faChainBroken, faChevronLeft, faChevronRight, faGear, faSatelliteDish, faSearch } from '@fortawesome/free-solid-svg-icons';
 import Loader from './components/Loader';
diff --git a/client/src/api/EasterEggApi.ts b/client/src/api/EasterEggApi.ts
index e16af03..eed4197 100644
--- a/client/src/api/EasterEggApi.ts
+++ b/client/src/api/EasterEggApi.ts
@@ -1,4 +1,4 @@
-import { EasterEgg } from "../types";
+import { EasterEgg } from "../../../types";
 import { api } from "./Api";
 
 const EASTER_EGGS_API_PREFIX = '/api/easterEggs';
diff --git a/client/src/api/FoodApi.ts b/client/src/api/FoodApi.ts
index 17957d9..ef2f865 100644
--- a/client/src/api/FoodApi.ts
+++ b/client/src/api/FoodApi.ts
@@ -1,4 +1,4 @@
-import { AddChoiceRequest, ChangeDepartureTimeRequest, LocationKey, RemoveChoiceRequest, RemoveChoicesRequest, UpdateNoteRequest } from "../types";
+import { AddChoiceRequest, ChangeDepartureTimeRequest, LocationKey, RemoveChoiceRequest, RemoveChoicesRequest, UpdateNoteRequest } from "../../../types";
 import { api } from "./Api";
 
 const FOOD_API_PREFIX = '/api/food';
diff --git a/client/src/api/PizzaDayApi.ts b/client/src/api/PizzaDayApi.ts
index 3db215d..153d763 100644
--- a/client/src/api/PizzaDayApi.ts
+++ b/client/src/api/PizzaDayApi.ts
@@ -1,4 +1,4 @@
-import { AddPizzaRequest, FinishDeliveryRequest, PizzaOrder, RemovePizzaRequest, UpdatePizzaDayNoteRequest, UpdatePizzaFeeRequest } from "../types";
+import { AddPizzaRequest, FinishDeliveryRequest, PizzaOrder, RemovePizzaRequest, UpdatePizzaDayNoteRequest, UpdatePizzaFeeRequest } from "../../../types";
 import { api } from "./Api";
 
 const PIZZADAY_API_PREFIX = '/api/pizzaDay';
diff --git a/client/src/api/VotingApi.ts b/client/src/api/VotingApi.ts
index 7a32030..a1f7341 100644
--- a/client/src/api/VotingApi.ts
+++ b/client/src/api/VotingApi.ts
@@ -1,4 +1,4 @@
-import { FeatureRequest, UpdateFeatureVoteRequest } from "../types";
+import { FeatureRequest, UpdateFeatureVoteRequest } from "../../../types";
 import { api } from "./Api";
 
 const VOTING_API_PREFIX = '/api/voting';
diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx
index b526b50..840e43e 100644
--- a/client/src/components/Header.tsx
+++ b/client/src/components/Header.tsx
@@ -4,7 +4,7 @@ import { useAuth } from "../context/auth";
 import SettingsModal from "./modals/SettingsModal";
 import { useSettings } from "../context/settings";
 import FeaturesVotingModal from "./modals/FeaturesVotingModal";
-import { FeatureRequest } from "../types";
+import { FeatureRequest } from "../../../types";
 import { errorHandler } from "../api/Api";
 import { getFeatureVotes, updateFeatureVote } from "../api/VotingApi";
 import PizzaCalculatorModal from "./modals/PizzaCalculatorModal";
diff --git a/client/src/components/PizzaOrderList.tsx b/client/src/components/PizzaOrderList.tsx
index 80d8769..fa1a200 100644
--- a/client/src/components/PizzaOrderList.tsx
+++ b/client/src/components/PizzaOrderList.tsx
@@ -1,5 +1,5 @@
 import { Table } from "react-bootstrap";
-import { Order, PizzaDayState, PizzaOrder } from "../types";
+import { Order, PizzaDayState, PizzaOrder } from "../../../types";
 import PizzaOrderRow from "./PizzaOrderRow";
 import { updatePizzaFee } from "../api/PizzaDayApi";
 
diff --git a/client/src/components/PizzaOrderRow.tsx b/client/src/components/PizzaOrderRow.tsx
index 115de2b..9e229f3 100644
--- a/client/src/components/PizzaOrderRow.tsx
+++ b/client/src/components/PizzaOrderRow.tsx
@@ -2,7 +2,7 @@ import React, { useState } from "react";
 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
 import { faMoneyBill1, faTrashCan } from "@fortawesome/free-regular-svg-icons";
 import { useAuth } from "../context/auth";
-import { Order, PizzaDayState, PizzaOrder } from "../types";
+import { Order, PizzaDayState, PizzaOrder } from "../../../types";
 import PizzaAdditionalFeeModal from "./modals/PizzaAdditionalFeeModal";
 
 type Props = {
diff --git a/client/src/components/modals/FeaturesVotingModal.tsx b/client/src/components/modals/FeaturesVotingModal.tsx
index 4c27d1b..8674614 100644
--- a/client/src/components/modals/FeaturesVotingModal.tsx
+++ b/client/src/components/modals/FeaturesVotingModal.tsx
@@ -1,5 +1,5 @@
 import { Modal, Button, Form } from "react-bootstrap"
-import { FeatureRequest } from "../../types";
+import { FeatureRequest } from "../../../../types";
 
 type Props = {
     isOpen: boolean,
diff --git a/client/src/context/eggs.tsx b/client/src/context/eggs.tsx
index 86f1b05..dd1f750 100644
--- a/client/src/context/eggs.tsx
+++ b/client/src/context/eggs.tsx
@@ -1,7 +1,7 @@
 import { useEffect, useState } from "react";
 import { getEasterEgg } from "../api/EasterEggApi";
 import { AuthContextProps } from "./auth";
-import { EasterEgg } from "../types";
+import { EasterEgg } from "../../../types";
 
 export const useEasterEgg = (auth?: AuthContextProps | null): [EasterEgg | undefined, boolean] => {
   const [result, setResult] = useState<EasterEgg | undefined>();