push tout
This commit is contained in:
parent
c1eee4227e
commit
3cdfffab3c
2 changed files with 23 additions and 15 deletions
|
@ -1,3 +1,11 @@
|
|||
body {
|
||||
-webkit-user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.home{
|
||||
flex:1;
|
||||
height:100%;
|
||||
|
|
|
@ -134,21 +134,21 @@ export default class Stock extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
plusQuantity = (element,id) => {
|
||||
let index = this.getArticleById(id).i;
|
||||
let articles = this.state.articles;
|
||||
articles[index].quantity++;
|
||||
console.log(articles[index]);
|
||||
this.setState({articles:articles},()=>{
|
||||
this.updateArticle(index,id);
|
||||
if (this.state.articles[index].quantity > 0 ){
|
||||
if (this.state.articles[index].selected){
|
||||
this.colorArticle("white",element)
|
||||
} else {
|
||||
this.colorArticle("grey",element)
|
||||
}
|
||||
}
|
||||
})
|
||||
plusQuantity = (element,id) => {
|
||||
let index = this.getArticleById(id).i;
|
||||
let articles = this.state.articles;
|
||||
articles[index].quantity++;
|
||||
console.log(articles[index]);
|
||||
this.setState({articles:articles},()=>{
|
||||
this.updateArticle(index,id);
|
||||
if (this.state.articles[index].quantity > 0 ){
|
||||
if (this.state.articles[index].selected){
|
||||
this.colorArticle("white",element)
|
||||
} else {
|
||||
this.colorArticle("grey",element)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
minusQuantity = (element,id) => {
|
||||
|
|
Loading…
Reference in a new issue