Inventory edit

After making changes the inventory list was not refreshing.
This commit is contained in:
Chris Houseknecht
2014-07-03 02:53:58 -04:00
parent 9e3700545e
commit 92bba3a87c
2 changed files with 3 additions and 2 deletions

View File

@@ -169,6 +169,7 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com
}
$scope.removeRefreshInventories = $scope.$on('RefreshInventories', function () {
// Reflect changes after inventory properties edit completes
console.log('here!!');
$scope.search(list.iterator);
});

View File

@@ -354,6 +354,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
catch(err) {
// ignore
}
parent_scope.$emit('RefreshInventories');
scope.$destroy();
});
@@ -382,8 +383,7 @@ angular.module('InventoryHelper', ['RestServices', 'Utilities', 'OrganizationLis
scope.saveModal = function () {
scope.inventory_id = inventory_id;
parent_scope.inventory_name = scope.inventory_name;
SaveInventory({ scope: scope });
SaveInventory({ scope: scope, parent_scope: parent_scope });
};
};