aboutsummaryrefslogtreecommitdiff
path: root/src/components/Form/Items
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Form/Items')
-rw-r--r--src/components/Form/Items/AddNewItemForm.js9
-rw-r--r--src/components/Form/Items/RegisterItemForm.js6
2 files changed, 7 insertions, 8 deletions
diff --git a/src/components/Form/Items/AddNewItemForm.js b/src/components/Form/Items/AddNewItemForm.js
index 78d1437..b2099e7 100644
--- a/src/components/Form/Items/AddNewItemForm.js
+++ b/src/components/Form/Items/AddNewItemForm.js
@@ -9,7 +9,6 @@
import React, { useState } from "react";
import "./../Form.scss";
-
const AddNewItemForm = (props) => {
const [itemNameValue, setItemNameValue] = useState("");
const [itemDescValue, setItemDescValue] = useState("");
@@ -83,7 +82,7 @@ const AddNewItemForm = (props) => {
resetAllValues();
}
}>
- <div className={"widePane"}>
+ <div className={"widePane formPane"}>
<label>
Item/Service:
<select
@@ -104,7 +103,7 @@ const AddNewItemForm = (props) => {
<option key={registerItemPrompt}>{registerItemPrompt}</option>
</select>
</label>
-
+
<label>
Description:
<input className={"wideInputBox"} type="text" value={itemDescValue}
@@ -117,7 +116,7 @@ const AddNewItemForm = (props) => {
</label>
</div>
- <div className={"widePane"}>
+ <div className={"widePane formPane"}>
<label>
Quantity:
<input className={"smallInputBox"} type="number" min="1" value={itemQtyValue}
@@ -179,7 +178,7 @@ const AddNewItemForm = (props) => {
</label>
</div>
- <div className={"smallPane"}>
+ <div className={"smallPane formPane"}>
<input type="button"
value="Register New Client"
onClick={() => props.registerPersonFormVisibility(true)}
diff --git a/src/components/Form/Items/RegisterItemForm.js b/src/components/Form/Items/RegisterItemForm.js
index 140de29..b57db9f 100644
--- a/src/components/Form/Items/RegisterItemForm.js
+++ b/src/components/Form/Items/RegisterItemForm.js
@@ -35,7 +35,7 @@ const RegisterItemForm = (props) => {
// TODO: show confirmation before being invisible
axios.post(
- `/api/items/`
+ `/api/items/register/`
+ `?model=${newItemNameValue}`
+ `&desc=${newItemDescValue}`
+ `&price=${newItemPriceValue}`
@@ -59,7 +59,7 @@ const RegisterItemForm = (props) => {
<div className={"formContainer"}>
<form className={"floatingForm"} onSubmit={postForm}>
<div className={"twoPaneForm"}>
- <div className={"widePane"}>
+ <div className={"widePane formPane"}>
<label>
Item/Service: <input className={"wideInputBox"} type="text" value={newItemNameValue} onChange={
(event) => {
@@ -77,7 +77,7 @@ const RegisterItemForm = (props) => {
</label>
</div>
- <div className={"widePane"}>
+ <div className={"widePane formPane"}>
<label>
Price: <input className={"smallInputBox"} type="number" min="0.00" step="0.001" value={newItemPriceValue} onChange={
(event) => {