Skip to content

Commit

Permalink
fix(inventory): misc ui improvements.
Browse files Browse the repository at this point in the history
This commit:
 1. Adds a red trash icon to the delete option in the inventory list.
 2. Moves the "delete" option to the last option in the inventory list.
 3. Makes the inventory ui-grid always fit on the page.

Closes #2499. Closes #2493.
  • Loading branch information
jniles committed Feb 2, 2018
1 parent 77034be commit dce11ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
3 changes: 1 addition & 2 deletions client/src/modules/inventory/list/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@
<div class="container-fluid">
<div
id="inventoryListGrid"
class="grid-full-height"
ng-class="{'grid-full-height-with-filters': InventoryCtrl.hasCustomFilters}"
class="grid-full-height-with-filters"
ui-grid="InventoryCtrl.gridOptions"
ui-grid-save-state
ui-grid-exporter
Expand Down
26 changes: 14 additions & 12 deletions client/src/modules/inventory/list/templates/action.cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,28 @@
<ul class="dropdown-menu-right" bh-dropdown-menu-auto-dropup uib-dropdown-menu>
<li>
<a href
data-method="edit"
data-edit-metadata="{{ row.entity.code }}"
ng-hide="row.groupHeader" ui-sref="inventory.update({uuid : row.entity.uuid })">
<i class="fa fa-edit"></i> <span translate>FORM.BUTTONS.EDIT</span>
data-method="edit"
data-edit-metadata="{{ row.entity.code }}"
ui-sref="inventory.update({uuid : row.entity.uuid })">
<i class="fa fa-edit"></i> <span translate>FORM.BUTTONS.EDIT</span>
</a>
</li>
<li class="divider"></li>
<li>
<a href
data-method="delete"
data-delete-metadata="{{ row.entity.code }}"
ng-hide="row.groupHeader" ng-click="grid.appScope.remove(row.entity.uuid)">
<i class="fa fa-delete"></i> <span class="text-danger" translate>FORM.BUTTONS.DELETE</span>
<a data-method="invoice" ui-sref="invoiceRegistry({ filters : [{ key : 'inventory_uuid', value : row.entity.uuid, displayValue: row.entity.label }]})" href>
<span class="fa fa-file-text-o"></span> <span translate>PATIENT_REGISTRY.INVOICES</span>
</a>
</li>

<li class="divider"></li>
<li>
<a data-method="invoice" ui-sref="invoiceRegistry({ filters : [{ key : 'inventory_uuid', value : row.entity.uuid, displayValue: row.entity.label }]})" href>
<span class="fa fa-file-text-o"></span> <span translate>PATIENT_REGISTRY.INVOICES</span>
<a
href
data-method="delete"
data-delete-metadata="{{ row.entity.code }}"
ng-hide="row.groupHeader" ng-click="grid.appScope.remove(row.entity.uuid)">
<i class="fa fa-trash-o text-danger"></i> <span class="text-danger" translate>FORM.BUTTONS.DELETE</span>
</a>
</li>

</ul>
</div>

0 comments on commit dce11ed

Please sign in to comment.