aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-26 23:45:43 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-26 23:45:43 +0530
commit33a344feca3de8b25988932fd0039d14c363b5cd (patch)
tree5ca767043822b462fa5697492730380e3bc0956e /src
parente54214c8ecdcf264a0f055ae24afe3299c0c7697 (diff)
ported and changed order in ItemsDisplay
Diffstat (limited to 'src')
-rw-r--r--src/components/Display/ItemsDisplay.tsx (renamed from src/components/Display/ItemsDisplay.js)21
-rw-r--r--src/index.tsx (renamed from src/index.js)10
2 files changed, 21 insertions, 10 deletions
diff --git a/src/components/Display/ItemsDisplay.js b/src/components/Display/ItemsDisplay.tsx
index f0882af..db3d336 100644
--- a/src/components/Display/ItemsDisplay.js
+++ b/src/components/Display/ItemsDisplay.tsx
@@ -7,17 +7,21 @@
*/
import React from "react";
+import { Item } from "./../../interfaces";
import "./Display.scss";
import DisplayItem from "./DisplayItem";
// import {SummaryDisplayTR} from "./SummaryDisplay";
-const ItemsDisplay = (props) => {
+interface Props {
+ items: Item[]
+ defGSTValue: number
+}
+
+const ItemsDisplay: React.FC<Props> = (props) => {
const items = props.items;
// TODO: remove mutability
let itemNumber = 0;
- // TODO: Add HSN Support
-
return (
<table className={"ItemsDisplay"}>
<tbody>
@@ -25,12 +29,13 @@ const ItemsDisplay = (props) => {
<th>S. Num</th>
<th className={"leftAlign"}>Item</th>
<th className={"leftAlign"}>Description</th>
- <th>Quantity(NOS)</th>
- <th>Discount(%)</th>
- <th>sgst(%)</th>
- <th>cgst(%)</th>
- <th>igst(%)</th>
<th>HSN</th>
+ <th>Quantity</th>
+ <th>Unit Price</th>
+ <th>Discount</th>
+ <th>sgst</th>
+ <th>cgst</th>
+ <th>igst</th>
<th>Price</th>
</tr>
diff --git a/src/index.js b/src/index.tsx
index 0d1a5dc..682b794 100644
--- a/src/index.js
+++ b/src/index.tsx
@@ -7,8 +7,14 @@
*/
// import React from 'react';
-import ReactDOM from 'react-dom';
+import React from "react";
+import ReactDOM from "react-dom";
import "./styles/global.scss"
import App from "./components/App";
-ReactDOM.render(App(), document.getElementById("root"))
+ReactDOM.render(
+ <React.StrictMode>
+ <App />
+ </React.StrictMode>,
+ document.getElementById("root")
+)