MonthlyInventory report

This commit is contained in:
2016-09-19 10:22:53 -04:00
parent 679ef75152
commit d242fea781
23 changed files with 448 additions and 65 deletions
@@ -0,0 +1,29 @@
(function() {
'use strict';
window.app.directive('monthlyInventoryReport', monthlyInventoryReport);
function monthlyInventoryReport() {
return {
scope: { monthlyInventoryData: "=" },
templateUrl: '/report/template/monthlyInventoryReport.tmpl.cshtml',
controller: controller,
controllerAs: 'vm'
}
}
controller.$inject = ['$scope', '$uibModal', 'inventorySvc'];
function controller($scope, $uibModal, inventorySvc) {
var vm = this;
vm.monthlyInventoryData = $scope.monthlyInventoryData;
vm.editInventory = function (inventoryId) {
inventorySvc.find(inventoryId)
.success(function (inventory) {
$uibModal.open({
template: '<edit-inventory inventory="inventory" />',
scope: angular.extend($scope.$new(true), { inventory: inventory })
});
});
}
}
})();