Initiate InventoyTypes from a xlxs

Arrival mostly working
This commit is contained in:
2016-08-22 11:03:00 -04:00
parent 7e4d8a6d2a
commit 53ed1b3af9
40 changed files with 798 additions and 208 deletions
@@ -30,22 +30,22 @@
<div class="form-group has-feedback" ng-class="vm.getValidationClass()" form-group-validation="Commodity">
<label for="Commodity" class="control-label">Commodity</label>
<input name="Commodity" type="text"
ng-model="commodity"
ng-model="vm.commodity"
required
uib-typeahead="inventoryType as inventoryType.name for inventoryType in vm.inventoryTypes | filter:{name:$viewValue} | limitTo:8"
uib-typeahead=
"inventoryType as inventoryType.name for inventoryType in vm.inventoryTypes
| filter:{name:$viewValue}
| limitTo:8"
typeahead-editable='false'
class="form-control">
<i class="fa fa-search form-control-feedback"></i>
<div class="panel panel-default" ng-show="commodity.id">
<div class="panel-heading">Selected Commodity</div>
<div class="panel panel-default" ng-show="vm.commodity.id">
<div class="panel-body">
<dl class="dl-horizontal">
<dt>Commodity ID</dt>
<dd>{{commodity.id}}</dd>
<dt>Name</dt>
<dd>{{commodity.name}}</dd>
<dd>{{vm.commodity.identifier}}</dd>
<dt>Units per Case</dt>
<dd>{{commodity.unitsPerCase}} / {{commodity.containerType}}</dd>
<dd>{{vm.commodity.unitsPerCase}} / {{vm.commodity.containerType}}</dd>
</dl>
</div>
</div>
@@ -57,28 +57,28 @@
<div class="panel-heading"><label>Quantity</label></div>
<div class="panel-body container-fluid">
<div class="row">
<div class="col-sm-5">Pallets</div>
<div class="col-sm-5"><label for="PalletCount">Pallets</label></div>
<div class="col-sm-3">
<input type="number" class="form-control" ng-model="palletCount" />
<input ng-model="palletCount" name="PalletCount" type="number" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-sm-4 col-sm-offset-1">Cases per Pallet</div>
<div class="col-sm-4 col-sm-offset-1"><label for="CasesPerPallet">Cases per Pallet</label></div>
<div class="col-sm-3">
<input type="number" class="form-control" ng-model="casesPerPallet" />
<input ng-model="casesPerPallet" name="CasesPerPallet" type="number" class="form-control" />
</div>
</div>
<hr />
<div class="row">
<div class="col-sm-5">Individual Cases</div>
<div class="col-sm-5"><label for="CaseCount">Individual Cases</label></div>
<div class="col-sm-3">
<input type="number" class="form-control" ng-model="caseCount" />
<input ng-model="caseCount" name="CaseCount" type="number" class="form-control" />
</div>
</div>
<hr />
<div class="row">
<div class="col-sm-5">Total Units</div>
<div class="col-sm-3">{{vm.quantity()}}</div>
<div class="col-sm-5"><strong>Total Units</strong></div>
<div class="col-sm-3"><strong>{{vm.quantity()}}</strong></div>
</div>
</div>
</div>
@@ -1,12 +1,30 @@
@using InventoryTraker.Web.Helpers
@model InventoryTraker.Web.Models.InventoryViewModel
@{
var inventory = Html.Angular().ModelFor("vm.inventory");
var inventory = Html.Angular().ModelFor("inventory");
}
<div class="panel panel-default">
<div class="panel-heading">
@inventory.BindingFor(x => x.Name) <a href="" ng-click="vm.edit()"><i class="fa fa-edit"></i></a>
</div>
Quantity
@inventory.BindingFor(x => x.Quantity)
</div>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Units per Case</th>
<th>Case Qty</th>
<th>Unit Qty</th>
<th>Exp Date</th>
<th>Added Date</th>
<th>Memo</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="inventory in vm.inventories" inventory="inventory">
<td><strong>@inventory.BindingFor(x => x.Name)</strong> <a href="" ng-click="vm.edit()"><i class="fa fa-edit"></i></a></td>
<td>@inventory.BindingFor(x => x.UnitsPerCase) / @inventory.BindingFor(x => x.ContainerType)</td>
<td>@inventory.BindingFor(x => x.Quantity)</td>
<td>{{inventory.quantity * inventory.unitsPerCase}}</td>
<td>@inventory.BindingFor(x => x.ExpirationDate, "date:'shortDate'")</td>
<td>@inventory.BindingFor(x => x.AddedDate, "date:'shortDate'")</td>
<td>@inventory.BindingFor(x => x.Memo)</td>
</tr>
</tbody>
</table>