From c1600045a243e3547fe589bfc7e474d2decaea4c Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Mon, 13 Sep 2021 17:26:09 +0530 Subject: moved interfaces to new folder --- src/components/Display/ClientInfoDisplay.tsx | 2 +- src/components/Display/DisplayItem.tsx | 2 +- src/components/Display/ItemsDisplay.tsx | 2 +- src/components/Display/SummaryDisplay.tsx | 2 +- src/components/Form/Document/DocumentInfoForm.tsx | 3 +- src/components/Form/Items/AddNewItemForm.tsx | 2 +- src/components/Form/Items/RegisterItemForm.tsx | 2 +- src/components/Form/People/SelectClientForm.tsx | 2 +- src/components/Form/Transport/TransportForm.tsx | 2 +- src/components/Menu/SubmitMenu.tsx | 2 +- src/components/Pages/BillingPage.tsx | 2 +- src/components/Print/Print.scss | 13 ------ src/components/Print/PrintableDoc.tsx | 40 ------------------ src/components/Util/SearchBar.scss | 28 ------------- src/components/Util/SearchBar.tsx | 50 ----------------------- 15 files changed, 11 insertions(+), 143 deletions(-) delete mode 100644 src/components/Print/Print.scss delete mode 100644 src/components/Print/PrintableDoc.tsx delete mode 100644 src/components/Util/SearchBar.scss delete mode 100644 src/components/Util/SearchBar.tsx (limited to 'src/components') diff --git a/src/components/Display/ClientInfoDisplay.tsx b/src/components/Display/ClientInfoDisplay.tsx index ad65e40..fda8fe7 100644 --- a/src/components/Display/ClientInfoDisplay.tsx +++ b/src/components/Display/ClientInfoDisplay.tsx @@ -7,7 +7,7 @@ */ import React from "react"; -import { Person } from "./../../interfaces"; +import { Person } from "./../../Interfaces/interfaces"; import "./Display.scss"; interface Props { diff --git a/src/components/Display/DisplayItem.tsx b/src/components/Display/DisplayItem.tsx index 448460b..26137f5 100644 --- a/src/components/Display/DisplayItem.tsx +++ b/src/components/Display/DisplayItem.tsx @@ -7,7 +7,7 @@ */ import React from "react"; -import { Item } from "./../../interfaces"; +import { Item } from "./../../Interfaces/interfaces"; import "./Display.scss"; interface Props { diff --git a/src/components/Display/ItemsDisplay.tsx b/src/components/Display/ItemsDisplay.tsx index 79eed40..d03ee9e 100644 --- a/src/components/Display/ItemsDisplay.tsx +++ b/src/components/Display/ItemsDisplay.tsx @@ -7,7 +7,7 @@ */ import React from "react"; -import { Item } from "./../../interfaces"; +import { Item } from "./../../Interfaces/interfaces"; import "./Display.scss"; import DisplayItem from "./DisplayItem"; import {SummaryDisplayTR} from "./SummaryDisplay"; diff --git a/src/components/Display/SummaryDisplay.tsx b/src/components/Display/SummaryDisplay.tsx index ae779bf..d2dfb4e 100644 --- a/src/components/Display/SummaryDisplay.tsx +++ b/src/components/Display/SummaryDisplay.tsx @@ -7,7 +7,7 @@ */ import React, {Dispatch, SetStateAction} from "react"; -import { Item, InvoiceSummary } from "./../../interfaces" +import { Item, InvoiceSummary } from "./../../Interfaces/interfaces" import "./Display.scss"; interface Props { diff --git a/src/components/Form/Document/DocumentInfoForm.tsx b/src/components/Form/Document/DocumentInfoForm.tsx index 2d7dcd9..9689d9f 100644 --- a/src/components/Form/Document/DocumentInfoForm.tsx +++ b/src/components/Form/Document/DocumentInfoForm.tsx @@ -9,8 +9,7 @@ import React, { useState } from "react"; import DatePicker from "react-datepicker"; import "./../../../styles/datepicker.scss"; // custom datepicker css -// import "react-datepicker/dist/react-datepicker.css"; -import { Person } from "./../../../interfaces"; +import { Person } from "./../../../Interfaces/interfaces"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faSync } from '@fortawesome/free-solid-svg-icons'; import "./../Form.scss"; diff --git a/src/components/Form/Items/AddNewItemForm.tsx b/src/components/Form/Items/AddNewItemForm.tsx index b810964..7988ddd 100644 --- a/src/components/Form/Items/AddNewItemForm.tsx +++ b/src/components/Form/Items/AddNewItemForm.tsx @@ -7,7 +7,7 @@ */ import React, { useState } from "react"; -import { Item } from "../../../interfaces"; +import { Item } from "../../../Interfaces/interfaces"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faSync } from '@fortawesome/free-solid-svg-icons' import "./../Form.scss"; diff --git a/src/components/Form/Items/RegisterItemForm.tsx b/src/components/Form/Items/RegisterItemForm.tsx index 4089084..4c90875 100644 --- a/src/components/Form/Items/RegisterItemForm.tsx +++ b/src/components/Form/Items/RegisterItemForm.tsx @@ -8,7 +8,7 @@ import React, { useState, Dispatch, SetStateAction } from "react"; import "./../Form.scss"; -import { NewItem } from "./../../../interfaces" +import { NewItem } from "./../../../Interfaces/interfaces" import axios from "axios"; interface props { diff --git a/src/components/Form/People/SelectClientForm.tsx b/src/components/Form/People/SelectClientForm.tsx index ca984ca..1e47e55 100644 --- a/src/components/Form/People/SelectClientForm.tsx +++ b/src/components/Form/People/SelectClientForm.tsx @@ -7,7 +7,7 @@ */ import React, { Dispatch, SetStateAction } from "react"; -import { Person } from "./../../../interfaces"; +import { Person } from "./../../../Interfaces/interfaces"; import "./../Form.scss"; import ClientInfoDisplay from "../../Display/ClientInfoDisplay"; diff --git a/src/components/Form/Transport/TransportForm.tsx b/src/components/Form/Transport/TransportForm.tsx index af64d80..427b7de 100644 --- a/src/components/Form/Transport/TransportForm.tsx +++ b/src/components/Form/Transport/TransportForm.tsx @@ -7,7 +7,7 @@ */ import React, { useState, Dispatch, SetStateAction } from "react"; -import { Transport } from "./../../../interfaces" +import { Transport } from "./../../../Interfaces/interfaces" interface Props { setVisibility: Dispatch> // this component's visibility diff --git a/src/components/Menu/SubmitMenu.tsx b/src/components/Menu/SubmitMenu.tsx index 6e5e317..93b6d30 100644 --- a/src/components/Menu/SubmitMenu.tsx +++ b/src/components/Menu/SubmitMenu.tsx @@ -7,7 +7,7 @@ */ import React, { Dispatch, SetStateAction } from "react"; -import { Transport, Item } from "./../../interfaces"; +import { Transport, Item } from "./../../Interfaces/interfaces"; interface Props { setVisibility: Dispatch> // this component's visibility diff --git a/src/components/Pages/BillingPage.tsx b/src/components/Pages/BillingPage.tsx index e065cbc..a61ffbf 100644 --- a/src/components/Pages/BillingPage.tsx +++ b/src/components/Pages/BillingPage.tsx @@ -8,7 +8,7 @@ import React, { useState, useEffect } from "react"; import "./BillingPage.scss"; -import { Item, Person, Transport/*, Invoice*/ } from "../../interfaces"; +import { Item, Person, Transport/*, Invoice*/ } from "../../Interfaces/interfaces"; import axios from "axios"; import DocumentInfoForm from "./../Form/Document/DocumentInfoForm"; diff --git a/src/components/Print/Print.scss b/src/components/Print/Print.scss deleted file mode 100644 index bae5f76..0000000 --- a/src/components/Print/Print.scss +++ /dev/null @@ -1,13 +0,0 @@ -@import "../../styles/theme"; - -.PDFViewer { - height: 95%; - width: 95%; - border: 2px solid $border0; - - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - margin: auto; - z-index: 3; -} diff --git a/src/components/Print/PrintableDoc.tsx b/src/components/Print/PrintableDoc.tsx deleted file mode 100644 index 67c8580..0000000 --- a/src/components/Print/PrintableDoc.tsx +++ /dev/null @@ -1,40 +0,0 @@ -/* - * OpenBills - Self hosted browser app to generate and keep track of simple invoices - * Version - 0 - * Licensed under the MIT license - https://opensource.org/licenses/MIT - * - * Copyright (c) 2021 Vidhu Kant Sharma -*/ - -import React, { /*useState,*/ } from "react"; -import "./Print.scss"; -import { Page, Text, View, Document, StyleSheet } from '@react-pdf/renderer'; - -const styles = StyleSheet.create({ - page: { - flexDirection: 'row', - backgroundColor: '#E4E4E4' - }, - section: { - margin: 10, - padding: 10, - flexGrow: 1 - } -}); - -const PrintableDoc: React.FC = () => { - return ( - - - - Section #1 - - - Section #2 - - - - ); -} - -export default PrintableDoc; diff --git a/src/components/Util/SearchBar.scss b/src/components/Util/SearchBar.scss deleted file mode 100644 index d08f1ac..0000000 --- a/src/components/Util/SearchBar.scss +++ /dev/null @@ -1,28 +0,0 @@ -@import "../../styles/theme"; - -.searchBar input { - width: 12rem; -} - -.searchResults { - margin-top: $fontSize1; - width: 12rem; - height: 10rem; - background-color: $background3; - overflow-x: hidden; - overflow-y: auto; - border: 1px solid $border2; -} - -.searchResult { - color: $defFG; -} - -.searchResults .dataItem { - width: 100%; - height: 50px; - display: flex; - align-items: center; - color: black; -} - diff --git a/src/components/Util/SearchBar.tsx b/src/components/Util/SearchBar.tsx deleted file mode 100644 index d26415b..0000000 --- a/src/components/Util/SearchBar.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenBills - Self hosted browser app to generate and keep track of simple invoices - * Version - 0 - * Licensed under the MIT license - https://opensource.org/licenses/MIT - * - * Copyright (c) 2021 Vidhu Kant Sharma -*/ - -import React, { useState } from "react"; -import "./SearchBar.scss"; - -const SearchBar: React.FC = () => { - const sampledata: string[] = ["one", "two", "three", "four", "five", "six"] - - const [searchValue, setSearchValue] = useState(""); - const [searchSelection, setSearchSelection] = useState(""); - - const setSelectionValue = (value: string) => { - setSearchValue(""); - setSearchSelection(value); - console.log(searchSelection); - } - - return ( -
-
- { - setSearchValue(event.target.value); - console.log(searchSelection); - } - } - /> -
- -
- { - searchValue === "" - || sampledata.map((i) => i.toLowerCase().includes(searchValue.toLowerCase()) - && (

setSelectionValue(i)}>{i}

)) - } -
-
- ); -} - -export default SearchBar; -- cgit v1.2.3