Box modifications
This commit is contained in:
@@ -9,78 +9,40 @@
|
||||
<fieldset ng-disabled="vm.saving">
|
||||
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><i class="fa fa-cubes"></i> Inventory Arrival</h3>
|
||||
<h3 class="modal-title"><i class="fa fa-cubes"></i> Inventory Addition</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<status-message message="vm.statusMessage"></status-message>
|
||||
<status-message message="vm.statusMessage" ng-hide="vm.errorMessages.length"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<script type="text/ng-template" id="commodityTypeahead.html">
|
||||
<script type="text/ng-template" id="programTypeahead.html">
|
||||
<a>
|
||||
<span ng-bind-html="match.label.name | uibTypeaheadHighlight:query"></span>
|
||||
</a>
|
||||
</script>
|
||||
|
||||
<div class="form-group" form-group-validation="Commodity">
|
||||
<label for="Commodity" class="control-label">Commodity</label>
|
||||
<input name="Commodity" type="text"
|
||||
ng-model="vm.commodity"
|
||||
@inventory.FormGroupFor(m => m.Id)
|
||||
|
||||
<div class="form-group" form-group-validation="ProgramName">
|
||||
<label for="ProgramName" class="control-label">Program Name</label>
|
||||
<input name="ProgramName" type="text"
|
||||
ng-model="vm.inventory.programName"
|
||||
required
|
||||
uib-typeahead=
|
||||
"inventoryType as inventoryType.name for inventoryType in vm.inventoryTypes
|
||||
| filter:{name:$viewValue}
|
||||
| limitTo:8"
|
||||
typeahead-editable='false'
|
||||
"programName for programName in vm.programNames
|
||||
|filter:$viewValue
|
||||
| limitTo:8"
|
||||
class="form-control">
|
||||
<i class="fa fa-search form-control-feedback"></i>
|
||||
<div class="panel panel-default" ng-show="vm.commodity.id">
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Commodity ID</dt>
|
||||
<dd>{{vm.commodity.identifier}}</dd>
|
||||
<dt>Units per Case</dt>
|
||||
<dd>{{vm.commodity.unitsPerCase}} / {{vm.commodity.containerType}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@inventory.FormGroupFor(m => m.ExpirationDate)
|
||||
|
||||
<div class="form-group panel panel-default">
|
||||
<div class="panel-heading"><label>Quantity</label></div>
|
||||
<div class="panel-body container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-5"><label for="PalletCount">Pallets</label></div>
|
||||
<div class="col-sm-3">
|
||||
<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"><label for="CasesPerPallet">Cases per Pallet</label></div>
|
||||
<div class="col-sm-3">
|
||||
<input ng-model="casesPerPallet" name="CasesPerPallet" type="number" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-5"><label for="CaseCount">Individual Cases</label></div>
|
||||
<div class="col-sm-3">
|
||||
<input ng-model="caseCount" name="CaseCount" type="number" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-5"><strong>Total Units</strong></div>
|
||||
<div class="col-sm-3"><strong>{{vm.quantity()}}</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@inventory.FormGroupFor(m => m.AddedDate)
|
||||
@inventory.FormGroupFor(m => m.Memo)
|
||||
@inventory.FormGroupFor(m => m.ProgramSubtype)
|
||||
@inventory.FormGroupFor(m => m.Description)
|
||||
@inventory.FormGroupFor(m => m.ShredReadyDate)
|
||||
@inventory.FormGroupFor(m => m.AddedDate)
|
||||
@inventory.FormGroupFor(m => m.Memo)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
@using InventoryTraker.Web.Helpers
|
||||
@model InventoryTraker.Web.Models.InventoryDistributeForm
|
||||
@{
|
||||
var distribution = Html.Angular().ModelFor("vm.distribution");
|
||||
}
|
||||
<form novalidate
|
||||
name="vm.form"
|
||||
ng-submit="vm.form.$valid && vm.save()">
|
||||
<fieldset ng-disabled="vm.saving">
|
||||
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><i class="fa fa-cubes"></i> Inventory Distribution</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<status-message message="vm.statusMessage"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
@distribution.FormGroupFor(m => m.Destination)
|
||||
|
||||
@distribution.FormGroupFor(m => m.DistributedDate)
|
||||
|
||||
@distribution.FormGroupFor(m => m.Memo)
|
||||
|
||||
<table class="table table-condensed" ng-class="vm.getValidationClass()">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name<br/>Units per Case</th>
|
||||
<th>Expiration Date</th>
|
||||
<th>Available Case Qty</th>
|
||||
<th>Distribute Case Qty</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="inventory in vm.quantities" inventory="inventory">
|
||||
<td>
|
||||
{{inventory.name}}<br/>
|
||||
{{inventory.unitsPerCase}} / {{inventory.containerType}}<br/>
|
||||
</td>
|
||||
<td ng-class="{ danger: inventory.isExpired }">{{inventory.expirationDate | date:'shortDate'}}</td>
|
||||
<td>{{inventory.quantity}}</td>
|
||||
<td>
|
||||
<div class="form-group col-sm-9" form-group-validation="DistributeQuantity{{inventory.name}}">
|
||||
<input name="DistributeQuantity{{inventory.name}}" type="number"
|
||||
class="form-control"
|
||||
ng-model="inventory.distributeQuantity"
|
||||
ng-max="{{inventory.quantity}}"
|
||||
ng-min="0" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-success" ng-disabled="vm.form.$invalid || vm.form.$pristine">Save</button>
|
||||
<button type="button" class="btn" ng-click="$dismiss()">Cancel</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -1,4 +1,8 @@
|
||||
@model InventoryTraker.Web.Models.InventoryAddForm
|
||||
@using InventoryTraker.Web.Helpers
|
||||
@model InventoryTraker.Web.Models.InventoryAddForm
|
||||
@{
|
||||
var inventory = Html.Angular().ModelFor("vm.inventory");
|
||||
}
|
||||
<form novalidate
|
||||
name="vm.form"
|
||||
ng-submit="vm.form.$valid && vm.save()">
|
||||
@@ -12,11 +16,22 @@
|
||||
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<inventory-info inventory="inventory"></inventory-info>
|
||||
<label class="control-label">Box Id</label>
|
||||
<p class="form-control-static">{{vm.inventory.id}}</p>
|
||||
<label class="control-label">Program Name</label>
|
||||
<p class="form-control-static">{{vm.inventory.programName}}<span ng-show="vm.inventory.programSubtype != null"> / {{vm.inventory.programSubtype}}</span></p>
|
||||
@inventory.FormGroupFor(m => m.Description)
|
||||
<label class="control-label">Currently in Inventory</label>
|
||||
<p class="form-control-static">{{vm.isInInventory() ? "Yes" : "No"}}</p>
|
||||
@inventory.FormGroupFor(m => m.ShredReadyDate)
|
||||
<label class="control-label">Added Date</label>
|
||||
<p class="form-control-static">{{vm.inventory.addedDate | date:'shortDate'}}</p>
|
||||
@inventory.FormGroupFor(m => m.Memo)
|
||||
|
||||
<div class="modal-footer">
|
||||
<button ng-click="vm.removeInventory()" class="btn btn-sm pull-left"><i class="fa fa-minus-circle"></i> Remove Inventory</button>
|
||||
<button type="button" class="btn btn-sm pull-left" ng-click="vm.removeInventory()"><i class="fa fa-minus-circle"></i> Remove Inventory</button>
|
||||
<button class="btn btn-success" ng-disabled="vm.form.$invalid || vm.form.$pristine">Save</button>
|
||||
<button type="button" class="btn" ng-click="$parent.$dismiss()">Cancel</button>
|
||||
<button type="button" class="btn" ng-click="vm.cancel()">Close</button>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -29,23 +44,16 @@
|
||||
<th>Type</th>
|
||||
<th>Memo</th>
|
||||
<th>Transaction Date</th>
|
||||
<th>Add Qty</th>
|
||||
<th>Remove Qty</th>
|
||||
<th>Qty</th>
|
||||
<th>In Inventory</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-hide="vm.loadingTransactions">
|
||||
<tr ng-repeat-start="transaction in vm.transactions | orderBy:['-transactionDate', 'currentQuantity']">
|
||||
<td>
|
||||
{{transaction.transactionType}}
|
||||
<span ng-show="transaction.destination"><i class="fa fa-map-marker" title="{{transaction.destination}}"></i></span>
|
||||
</td>
|
||||
<td>{{transaction.transactionType}}</td>
|
||||
<td>{{transaction.memo}}</td>
|
||||
<td>{{transaction.transactionDate | date:'shortDate'}}</td>
|
||||
<td>{{transaction.addedQuantity}}</td>
|
||||
<td>{{transaction.removedQuantity}}</td>
|
||||
<td>{{transaction.currentQuantity}}</td>
|
||||
<td>{{transaction.currentQuantity > 0 ? "Yes" : "No"}}</td>
|
||||
<td>
|
||||
<a href="" ng-show="$first"
|
||||
ng-click="vm.confirmDeleteTransaction = !vm.confirmDeleteTransaction">
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<form novalidate
|
||||
name="vm.form"
|
||||
ng-submit="vm.form.$valid && vm.submit()">
|
||||
<fieldset ng-disabled="vm.uploading">
|
||||
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><i class="fa fa-cubes"></i> Inventory Import</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<status-message message="vm.statusMessage" ng-hide="vm.errorMessages.length"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<div class="btn btn-default"
|
||||
ngf-select
|
||||
ng-model="vm.file"
|
||||
name="file"
|
||||
ngf-pattern="'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
|
||||
ngf-accept="'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'">Select</div>
|
||||
|
||||
<div>{{vm.file.name}}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-success" ng-disabled="vm.form.$invalid || vm.form.$pristine">Submit</button>
|
||||
<button type="button" class="btn" ng-click="$dismiss()">Cancel</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -1,19 +1,19 @@
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>{{inventory.name}}</dd>
|
||||
<dt>Units per Case</dt>
|
||||
<dd>{{inventory.unitsPerCase}} / {{inventory.containerType}}</dd>
|
||||
<dt>Added Date</dt>
|
||||
<dd>{{inventory.addedDate | date:'shortDate'}}</dd>
|
||||
<dt>Expiration Date</dt>
|
||||
<dt>Box Id</dt>
|
||||
<dd>{{inventory.id}}</dd>
|
||||
<dt>Program Name</dt>
|
||||
<dd>{{inventory.programName}}<span ng-show="inventory.programSubtype != null"> / {{inventory.programSubtype}}</span></dd>
|
||||
<dt>Currently in Inventory</dt>
|
||||
<dd>{{vm.isInInventory() ? "Yes" : "No"}}</dd>
|
||||
<dt>Shred Ready Date</dt>
|
||||
<dd>
|
||||
<span ng-class="{ 'bg-danger': inventory.quantity && inventory.isExpired }">
|
||||
{{inventory.expirationDate | date:'shortDate'}}
|
||||
<span ng-show="inventory.isExpired" class="label label-danger">Expired</span>
|
||||
<span ng-class="{ 'bg-danger': inventory.quantity && vm.isShredReady() }">
|
||||
{{inventory.shredReadyDate | date:'shortDate'}}
|
||||
<span ng-show="vm.isShredReady()" class="label label-danger">Shred Ready</span>
|
||||
</span>
|
||||
</dd>
|
||||
<dt>Quantity (in Cases)</dt>
|
||||
<dd>{{inventory.quantity}}</dd>
|
||||
<dt>Added Date</dt>
|
||||
<dd>{{inventory.addedDate | date:'shortDate'}}</dd>
|
||||
<dt ng-show="inventory.memo">Memo</dt>
|
||||
<dd ng-show="inventory.memo">{{inventory.memo}}</dd>
|
||||
</dl>
|
||||
|
||||
@@ -8,26 +8,24 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="control-column"></th>
|
||||
<th>Name</th>
|
||||
<th>Units per Case</th>
|
||||
<th>Case Qty</th>
|
||||
<th>Unit Qty</th>
|
||||
<th>Exp Date</th>
|
||||
<th>Id</th>
|
||||
<th>Program Name</th>
|
||||
<th>Description</th>
|
||||
<th>Shred Ready Date</th>
|
||||
<th>Added Date</th>
|
||||
<th>Memo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="inventory in vm.inventories | filter:{name: ''}">
|
||||
<tr ng-repeat="inventory in vm.inventories | filter:{quantity: 1}">
|
||||
<td>
|
||||
<a href="" ng-click="vm.edit(inventory)" title="Details"><i class="fa fa-edit"></i></a>
|
||||
</td>
|
||||
<td>@inventory.BindingFor(x => x.Name)</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 ng-class="{ danger: inventory.isExpired }">
|
||||
@inventory.BindingFor(x => x.ExpirationDate, "date:'shortDate'")
|
||||
<td>@inventory.BindingFor(x => x.Id)</td>
|
||||
<td>@inventory.BindingFor(x => x.ProgramName)</td>
|
||||
<td>@inventory.BindingFor(x => x.Description)</td>
|
||||
<td ng-class="{ danger: vm.isShredReady(inventory) }">
|
||||
@inventory.BindingFor(x => x.ShredReadyDate, "date:'shortDate'")
|
||||
</td>
|
||||
<td>@inventory.BindingFor(x => x.AddedDate, "date:'shortDate'")</td>
|
||||
<td>@inventory.BindingFor(x => x.Memo)</td>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<status-message message="vm.statusMessage"></status-message>
|
||||
<status-message message="vm.statusMessage" ng-hide="vm.errorMessages.length"></status-message>
|
||||
<error-list errors="vm.errorMessages"></error-list>
|
||||
|
||||
<div class="panel panel-default">
|
||||
@@ -27,9 +27,9 @@
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="TransactionType"
|
||||
ng-model="vm.removeForm.transactionType"
|
||||
value="Expired"
|
||||
value="Shreded"
|
||||
required />
|
||||
Expired
|
||||
Shreded
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="TransactionType"
|
||||
@@ -40,7 +40,6 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@removeForm.FormGroupFor(m => m.Quantity)
|
||||
@removeForm.FormGroupFor(m => m.RemovedDate)
|
||||
@removeForm.FormGroupFor(m => m.Memo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user