MonthlyInventory report
This commit is contained in:
@@ -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 })
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user