Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
inventory-frontend
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
coding-brunch-hh
inventory-frontend
Commits
abcaaaad
Commit
abcaaaad
authored
Aug 15, 2018
by
Martin Fahl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generates id
parent
6640b383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/container/AddDialogContainer/AddDialogContainer.js
src/container/AddDialogContainer/AddDialogContainer.js
+5
-1
No files found.
src/container/AddDialogContainer/AddDialogContainer.js
View file @
abcaaaad
...
...
@@ -26,10 +26,14 @@ const getNewQuantity = createSelector(
}
)
const
genId
=
()
=>
{
return
String
(
Math
.
floor
(
Math
.
random
()
*
10000
))
}
const
handleAdd
=
(
name
,
quantity
,
dispatch
)
=>
{
if
(
name
!==
""
)
{
dispatch
(
closeAddDialog
());
dispatch
(
addItem
(
name
,
quantity
))
dispatch
(
addItem
(
genId
(),
name
,
quantity
))
}
}
...
...
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