Skip to content
Snippets Groups Projects
Commit cc97efa8 authored by meskio's avatar meskio :tent:
Browse files

Don't allow picking the same product twice

parent cb2bff18
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,10 @@ class ProductPicker extends React.Component {
pickProduct(product) {
let picks = this.props.picks;
if (picks.find((p) => product.code === p.code)) {
return;
}
picks.push({
code: product.code,
name: product.name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment