Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
inventory-promotion-react
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
inventory-promotion-react
Commits
d6f57876
Commit
d6f57876
authored
May 07, 2021
by
Ben Anderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaked product form fields
parent
6dd744aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
ProductForm.jsx
src/component/ProductForm.jsx
+11
-11
emptProduct.js
src/emptProduct.js
+2
-2
No files found.
src/component/ProductForm.jsx
View file @
d6f57876
...
...
@@ -28,7 +28,7 @@ export default function ProductForm(props) {
if
(
form
.
upc
.
length
<
3
)
{
errs
.
push
(
"UPC must be at least 3 characters"
);
}
if
(
form
.
prodName
.
length
===
0
)
{
if
(
form
.
prod
uct
Name
.
length
===
0
)
{
errs
.
push
(
"Please enter a product name"
);
}
if
(
form
.
brand
.
length
===
0
)
{
...
...
@@ -127,17 +127,17 @@ export default function ProductForm(props) {
<
div
className=
"row mt-3"
>
<
div
className=
"col-6"
>
<
div
>
<
label
htmlFor=
"prodName"
className=
"form-label"
>
<
label
htmlFor=
"prod
uct
Name"
className=
"form-label"
>
Name
</
label
>
<
input
required
name=
"prodName"
name=
"prod
uct
Name"
type=
"text"
className=
"form-control"
id=
"prodName"
value=
{
form
.
prodName
}
onChange=
{
(
e
)
=>
setForm
({
...
form
,
prodName
:
e
.
target
.
value
})
}
id=
"prod
uct
Name"
value=
{
form
.
prod
uct
Name
}
onChange=
{
(
e
)
=>
setForm
({
...
form
,
prod
uct
Name
:
e
.
target
.
value
})
}
/>
</
div
>
<
div
>
...
...
@@ -170,17 +170,17 @@ export default function ProductForm(props) {
</
div
>
</
div
>
<
div
className=
"col-6"
>
<
label
htmlFor=
"prodDesc"
className=
"form-label"
>
<
label
htmlFor=
"prod
uct
Desc"
className=
"form-label"
>
Description
</
label
>
<
textarea
name=
"prodDesc"
id=
"prodDesc"
name=
"prod
uct
Desc"
id=
"prod
uct
Desc"
cols=
"40"
rows=
"7"
className=
"form-control"
value=
{
form
.
prodDesc
}
onChange=
{
(
e
)
=>
setForm
({
...
form
,
prodDesc
:
e
.
target
.
value
})
}
value=
{
form
.
prod
uct
Desc
}
onChange=
{
(
e
)
=>
setForm
({
...
form
,
prod
uct
Desc
:
e
.
target
.
value
})
}
></
textarea
>
</
div
>
</
div
>
...
...
src/emptProduct.js
View file @
d6f57876
const
emptyProduct
=
{
sku
:
""
,
upc
:
""
,
prodName
:
""
,
prod
uct
Name
:
""
,
brand
:
""
,
category
:
""
,
price
:
0.0
,
stock
:
0
,
prodDesc
:
""
,
prod
uct
Desc
:
""
,
prodImgUrl
:
""
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment