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
b46fa7d8
Commit
b46fa7d8
authored
May 19, 2021
by
Ben Anderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deployment 20: Removed console log statements
parent
129250aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
deployment.yaml
deployment.yaml
+1
-1
App.js
src/App.js
+1
-1
ProductForm.jsx
src/component/ProductForm.jsx
+4
-4
ProductRow.jsx
src/component/ProductRow.jsx
+1
-1
No files found.
deployment.yaml
View file @
b46fa7d8
...
@@ -14,7 +14,7 @@ spec:
...
@@ -14,7 +14,7 @@ spec:
spec
:
spec
:
containers
:
containers
:
-
name
:
afp-inventory-ui-container
-
name
:
afp-inventory-ui-container
image
:
nexus.mynisum.com/afp-inventory-ui:
19
image
:
nexus.mynisum.com/afp-inventory-ui:
20
imagePullPolicy
:
Always
imagePullPolicy
:
Always
ports
:
ports
:
-
containerPort
:
8081
-
containerPort
:
8081
...
...
src/App.js
View file @
b46fa7d8
...
@@ -12,7 +12,7 @@ export const AuthContext = createContext();
...
@@ -12,7 +12,7 @@ export const AuthContext = createContext();
function
App
()
{
function
App
()
{
const
[
isLoggedIn
,
setIsLoggedIn
]
=
useState
(
false
);
const
[
isLoggedIn
,
setIsLoggedIn
]
=
useState
(
false
);
const
[
user
,
setUser
]
=
useState
(
null
);
const
[
user
,
setUser
]
=
useState
(
null
);
console
.
log
(
user
);
//
console.log(user);
const
state
=
{
const
state
=
{
user
,
user
,
setUser
,
setUser
,
...
...
src/component/ProductForm.jsx
View file @
b46fa7d8
...
@@ -23,14 +23,14 @@ export default function ProductForm(props) {
...
@@ -23,14 +23,14 @@ export default function ProductForm(props) {
useEffect
(()
=>
{
useEffect
(()
=>
{
fetch
(
`
${
Config
.
inventoryUrl
}
/
${
productId
}
/`
).
then
((
res
)
=>
{
fetch
(
`
${
Config
.
inventoryUrl
}
/
${
productId
}
/`
).
then
((
res
)
=>
{
if
(
res
.
ok
)
{
if
(
res
.
ok
)
{
console
.
log
(
res
);
//
console.log(res);
res
.
json
().
then
((
data
)
=>
{
res
.
json
().
then
((
data
)
=>
{
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
if
(
data
[
key
]
===
null
)
{
if
(
data
[
key
]
===
null
)
{
data
[
key
]
=
""
;
data
[
key
]
=
""
;
}
}
});
});
console
.
log
(
data
);
//
console.log(data);
setForm
({
...
data
});
setForm
({
...
data
});
});
});
}
}
...
@@ -40,7 +40,7 @@ export default function ProductForm(props) {
...
@@ -40,7 +40,7 @@ export default function ProductForm(props) {
const
validate
=
()
=>
{
const
validate
=
()
=>
{
setErrors
([]);
setErrors
([]);
const
errs
=
[];
const
errs
=
[];
console
.
log
(
form
);
//
console.log(form);
if
(
form
.
sku
.
length
<
3
)
{
if
(
form
.
sku
.
length
<
3
)
{
errs
.
push
(
"SKU must be at least 3 characters"
);
errs
.
push
(
"SKU must be at least 3 characters"
);
}
}
...
@@ -90,7 +90,7 @@ export default function ProductForm(props) {
...
@@ -90,7 +90,7 @@ export default function ProductForm(props) {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
ok
)
{
if
(
res
.
ok
)
{
res
.
json
().
then
((
data
)
=>
console
.
log
(
data
));
//
res.json().then((data) => console.log(data));
history
.
push
(
"/products"
);
history
.
push
(
"/products"
);
}
else
{
}
else
{
setErrors
([
setErrors
([
...
...
src/component/ProductRow.jsx
View file @
b46fa7d8
...
@@ -10,7 +10,7 @@ export default function ProductRow({ product, handleDelete }) {
...
@@ -10,7 +10,7 @@ export default function ProductRow({ product, handleDelete }) {
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
setShow
(
false
);
setShow
(
false
);
console
.
log
({
show
});
//
console.log({ show });
handleCloseConfirm
();
handleCloseConfirm
();
};
};
...
...
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