Skip to content

Commit

Permalink
feat(stock): depot selection modal for exits
Browse files Browse the repository at this point in the history
This commit implements the depot selection modal for stock exits.  It
follows the same principles of the stock entry.
  • Loading branch information
jniles committed Sep 14, 2017
1 parent 3533882 commit 7812eac
Show file tree
Hide file tree
Showing 2 changed files with 204 additions and 185 deletions.
36 changes: 26 additions & 10 deletions client/src/modules/stock/exit/exit.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,31 @@
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.STOCK</li>
<li class="title">
<span translate>STOCK.EXIT</span>
<span class="text-uppercase badge badge-primary">{{StockCtrl.movement.exit_type}}</span>
<li ng-class="{ 'title' : !StockCtrl.depot.uuid, 'static' : StockCtrl.depot.uuid }">
<span translate>STOCK.EXIT</span>
</li>
<li class="title" ng-if="StockCtrl.depot.uuid">
<span>{{ StockCtrl.depot.text }}</span>
<span class="text-uppercase badge badge-primary" ng-show="StockCtrl.movement.exit_type">
{{ StockCtrl.movement.exit_type }}
</span>
</li>
</ol>

<div class="toolbar">
<div class="toolbar-item">
<bh-depot-dropdown on-select="StockCtrl.setupDepot(depot)"></bh-depot-dropdown>
<div uib-dropdown dropdown-append-to-body data-action="open-tools">
<a class="btn btn-default" uib-dropdown-toggle>
<span class="fa fa-bars"></span> <span class="hidden-xs" translate>FORM.LABELS.MENU</span> <span class="caret"></span>
</a>
<ul uib-dropdown-menu role="menu" class="dropdown-menu-right">
<li role="menuitem">
<a href ng-click="StockCtrl.changeDepot()" data-action="change-depot">
<i class="fa fa-archive"></i> <span translate>DEPOT.CHANGE</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
Expand All @@ -23,7 +39,7 @@
<form name="StockForm" bh-submit="StockCtrl.submit(StockForm)" novalidate>
<!-- destination -->
<div class="row">
<bh-stock-entry-exit-type
<bh-stock-entry-exit-type
on-entry-exit-type-select-callback="StockCtrl.selectExitType(type)"
reference="StockCtrl.reference"
display-name="StockCtrl.displayName"
Expand Down Expand Up @@ -70,7 +86,7 @@
style="padding-top : 10px;"
class="text-info"
ng-show="!StockCtrl.movement.exit_type">
<span class="fa fa-info-circle"></span>
<span class="fa fa-info-circle"></span>
<span translate>FORM.INFO.NO_DESTINATION</span>
</p>

Expand All @@ -82,7 +98,7 @@
ng-class="{'btn-primary' : StockCtrl.hasCacheAvailable }"
ng-click="StockCtrl.readCache()"
ng-disabled="!StockCtrl.hasCacheAvailable">
<span class="fa fa-recycle"></span>
<span class="fa fa-recycle"></span>
<span translate>FORM.BUTTONS.RECOVER_ITEMS</span>
</button>
</div>
Expand All @@ -96,7 +112,7 @@
class="btn btn-default"
ng-disabled="!StockCtrl.movement.exit_type"
ng-click="StockCtrl.addItems(StockCtrl.itemIncrement)">
<span class="fa fa-plus-circle"></span>
<span class="fa fa-plus-circle"></span>
<span translate>FORM.BUTTONS.ADD</span>
</button>
</span>
Expand All @@ -111,8 +127,8 @@
</div>

<!-- grid -->
<div id="stock-exit-grid"
ui-grid="StockCtrl.gridOptions"
<div id="stock-exit-grid"
ui-grid="StockCtrl.gridOptions"
style="height: 300px; width: 100%;"
ui-grid-auto-resize
ui-grid-resize-columns>
Expand Down
Loading

0 comments on commit 7812eac

Please sign in to comment.