fixed bug with amount not updating / solved double dispatch problem with cartAction.load / removed all console.log calls - it became too chatty / add them as needed
This commit is contained in:
@@ -10,24 +10,10 @@ var CartActions = {
|
||||
});
|
||||
},
|
||||
|
||||
addItem: function(itemId) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: CartConstants.ADD_ITEM,
|
||||
itemId: itemId
|
||||
});
|
||||
},
|
||||
|
||||
takeItemOut: function(itemId) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: CartConstants.TAKE_ITEM_OUT,
|
||||
itemId: itemId
|
||||
});
|
||||
},
|
||||
|
||||
setItemCount: function(itemId, count) {
|
||||
setItemCount: function(item, count) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: CartConstants.SET_ITEM_COUNT,
|
||||
itemId: itemId,
|
||||
item: item,
|
||||
count: count
|
||||
});
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ var NavigationConstants = require('../constants/navigationConstants');
|
||||
var NavigationActions = {
|
||||
// select item
|
||||
goToItemDetails: function(item) {
|
||||
console.log("Going to item details");
|
||||
|
||||
AppDispatcher.handleAction({
|
||||
actionType: NavigationConstants.CHANGE_URL,
|
||||
url: '/artikal/' + item.get('id') +'/' + item.get('name')
|
||||
@@ -13,7 +13,6 @@ var NavigationActions = {
|
||||
},
|
||||
|
||||
goToSection: function(section) {
|
||||
console.log("Going to item details");
|
||||
AppDispatcher.handleAction({
|
||||
actionType: NavigationConstants.CHANGE_URL,
|
||||
url: '/sekcija/'+ section.get('id') + '/' + section.get('name')
|
||||
|
||||
Reference in New Issue
Block a user