Distribution report
This commit is contained in:
@@ -17,9 +17,11 @@
|
||||
var vm = this;
|
||||
|
||||
vm.add = add;
|
||||
vm.saving = false;
|
||||
vm.inventory = { };
|
||||
vm.inventoryTypes = inventoryTypeSvc.inventoryTypes;
|
||||
|
||||
vm.saving = false;
|
||||
vm.statusMessage = "Enter details for the inventory arrival below.";
|
||||
vm.errorMessages = [];
|
||||
|
||||
vm.quantity = quantity;
|
||||
@@ -43,6 +45,7 @@
|
||||
});
|
||||
|
||||
function add() {
|
||||
vm.statusMessage = null;
|
||||
vm.saving = true;
|
||||
inventorySvc.add(vm.inventory)
|
||||
.success(function () {
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
var vm = this;
|
||||
|
||||
vm.save = save;
|
||||
vm.saving = false;
|
||||
vm.quantities = angular.copy(inventorySvc.inventories);
|
||||
vm.distribution = {};
|
||||
|
||||
vm.saving = false;
|
||||
vm.statusMessage = "Enter details for the inventory distribution below.";
|
||||
vm.errorMessages = [];
|
||||
|
||||
function getInventoryDistributeQuantities(inventory) {
|
||||
@@ -31,6 +33,7 @@
|
||||
}
|
||||
|
||||
function save() {
|
||||
vm.statusMessage = null;
|
||||
vm.saving = true;
|
||||
vm.distribution.inventoryQuantities = getInventoryDistributeQuantities(vm.quantities);
|
||||
inventorySvc.distribute(vm.distribution)
|
||||
|
||||
@@ -25,9 +25,11 @@
|
||||
transactionType: vm.inventory.isExpired ? "Expired" : null
|
||||
};
|
||||
|
||||
vm.statusMessage = "Enter details for the inventory removal below.";
|
||||
vm.errorMessages = [];
|
||||
|
||||
function save() {
|
||||
vm.statusMessage = null;
|
||||
vm.saving = true;
|
||||
inventorySvc.remove(vm.removeForm)
|
||||
.success(function (data) {
|
||||
|
||||
@@ -14,15 +14,8 @@
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="alert alert-info" ng-hide="vm.errorMessages.length">
|
||||
Enter details for the inventory arrival below.
|
||||
</div>
|
||||
<div class="alert alert-danger" ng-show="vm.errorMessages.length">
|
||||
There were problems adding the inventory.
|
||||
<ul>
|
||||
<li ng-repeat="error in vm.errorMessages">{{error}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<status-message message="vm.statusMessage"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<script type="text/ng-template" id="commodityTypeahead.html">
|
||||
<a>
|
||||
|
||||
@@ -14,15 +14,8 @@
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="alert alert-info" ng-hide="vm.errorMessages.length">
|
||||
Enter details for the inventory distribution below.
|
||||
</div>
|
||||
<div class="alert alert-danger" ng-show="vm.errorMessages.length">
|
||||
There were problems distributing the inventory.
|
||||
<ul>
|
||||
<li ng-repeat="error in vm.errorMessages">{{error}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<status-message message="vm.statusMessage"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
@distribution.FormGroupFor(m => m.Destination)
|
||||
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="alert alert-danger" ng-show="vm.errorMessage != null">
|
||||
{{vm.errorMessage}}
|
||||
</div>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<inventory-info inventory="inventory"></inventory-info>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -14,15 +14,8 @@
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="alert alert-info" ng-hide="vm.errorMessages.length">
|
||||
Enter details for the inventory removal below.
|
||||
</div>
|
||||
<div class="alert alert-danger" ng-show="vm.errorMessages.length">
|
||||
There were problems removing the inventory.
|
||||
<ul>
|
||||
<li ng-repeat="error in vm.errorMessages">{{error}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<status-message message="vm.statusMessage"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
Reference in New Issue
Block a user