aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/App.tsx2
-rw-r--r--src/components/Display/SummaryDisplay.tsx26
-rw-r--r--src/components/Menu/SubmitMenu.tsx1
-rw-r--r--src/components/Pages/BillingPage.tsx9
4 files changed, 11 insertions, 27 deletions
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 40b38f4..f7e0348 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -12,11 +12,9 @@ import { BrowserRouter, Route, Switch } from "react-router-dom";
import Header from "./Header/Header";
import HomePage from "./Pages/HomePage";
import BillingPage from "./Pages/BillingPage";
-import SearchBar from "./Util/SearchBar";
const App: React.FC = () => (
<>
- <SearchBar/>
<BrowserRouter>
<Header/>
<div className={"root-content"}>
diff --git a/src/components/Display/SummaryDisplay.tsx b/src/components/Display/SummaryDisplay.tsx
index 22f2e52..5d1589e 100644
--- a/src/components/Display/SummaryDisplay.tsx
+++ b/src/components/Display/SummaryDisplay.tsx
@@ -6,12 +6,13 @@
* Copyright (c) 2021 Vidhu Kant Sharma
*/
-import React from "react";
+import React, {Dispatch, SetStateAction} from "react";
import { Item } from "./../../interfaces"
import "./Display.scss";
interface props {
items: Item[]
+ setShowSubmitMenu: Dispatch<SetStateAction<boolean>>
}
interface FullSummary {
@@ -51,25 +52,6 @@ const getFullSummary = (items: Item[]): FullSummary => {
}
}
-// export const SummaryDisplayTR: React.FC<props> = (props) => {
-// const summary = getBasicSummary(props.items);
-//
-// return (
-// <tr className={"SummaryDisplayTR"}>
-// <td>Total</td>
-// <td className={"disabledBorder"}></td>
-// <td className={"disabledBorder"}></td>
-// <td>{summary.TotalQuantity}</td>
-// <td className={"disabledBorder"}></td>
-// <td className={"disabledBorder"}></td>
-// <td className={"disabledBorder"}></td>
-// <td className={"disabledBorder"}></td>
-// <td className={"disabledBorder"}></td>
-// <td>{summary.TotalRawPrice}</td>
-// </tr>
-// );
-// }
-
const SummaryDisplay: React.FC<props> = (props) => {
const summary: FullSummary = getFullSummary(props.items);
return (
@@ -109,6 +91,10 @@ const SummaryDisplay: React.FC<props> = (props) => {
</tr>
</tbody>
</table>
+
+ <button onClick={() => props.setShowSubmitMenu(true)}>
+ Submit
+ </button>
</div>
);
}
diff --git a/src/components/Menu/SubmitMenu.tsx b/src/components/Menu/SubmitMenu.tsx
index 649b49d..6e5e317 100644
--- a/src/components/Menu/SubmitMenu.tsx
+++ b/src/components/Menu/SubmitMenu.tsx
@@ -22,6 +22,7 @@ const TransportForm: React.FC<Props> = (props) => {
const closeOnBGClicked = (event: any) =>
event.target.className === "floatingMenuBG" && hideSelf();
+
return (
<div className={"floatingMenuBG"} onClick={closeOnBGClicked}>
<div className={"smallFloatingMenu TransportForm"}>
diff --git a/src/components/Pages/BillingPage.tsx b/src/components/Pages/BillingPage.tsx
index 9dcb485..c1d30a5 100644
--- a/src/components/Pages/BillingPage.tsx
+++ b/src/components/Pages/BillingPage.tsx
@@ -113,11 +113,10 @@ const BillingPage: React.FC = () => {
setShowTransportForm={setShowTransportForm}
/>
- <button onClick={() => setShowSubmitMenu(true)}>
- post (experimental)
- </button>
-
- <SummaryDisplay items={items}/>
+ <SummaryDisplay
+ items={items}
+ setShowSubmitMenu={setShowSubmitMenu}
+ />
</div>
</>
);