2019-10-02 17:24:42 +00:00
|
|
|
<vn-data-viewer
|
|
|
|
data="data"
|
|
|
|
is-loading="!data"
|
|
|
|
class="vn-w-xs">
|
|
|
|
<vn-card>
|
2019-09-25 18:06:42 +00:00
|
|
|
<vn-table>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr ng-repeat="row in data | orderBy:'warehouse.name'">
|
|
|
|
<vn-td>{{::row.warehouse.name}}</vn-td>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-td shrink>
|
2019-09-25 18:06:42 +00:00
|
|
|
<vn-icon-button
|
|
|
|
icon="delete"
|
|
|
|
translate-attr="{title: 'Delete'}"
|
|
|
|
ng-click="$ctrl.onDelete($index)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
2019-10-02 17:24:42 +00:00
|
|
|
</vn-card>
|
|
|
|
</vn-data-viewer>
|
2019-09-25 18:06:42 +00:00
|
|
|
<vn-float-button
|
|
|
|
icon="add"
|
|
|
|
translate-attr="{title: 'Add'}"
|
|
|
|
vn-bind="+"
|
|
|
|
ng-click="$ctrl.onCreate()"
|
|
|
|
fixed-bottom-right>
|
|
|
|
</vn-float-button>
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="dialog"
|
2019-10-30 15:57:14 +00:00
|
|
|
on-response="$ctrl.onSave($response)">
|
2019-09-25 18:06:42 +00:00
|
|
|
<tpl-body>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-autocomplete
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.selected.warehouseFk"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Warehouses"
|
2019-09-25 18:06:42 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Warehouse">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-vertical>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
2019-10-30 15:57:14 +00:00
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Save</button>
|
2019-09-25 18:06:42 +00:00
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="confirm"
|
|
|
|
message="This item will be deleted"
|
|
|
|
question="Are you sure you want to continue?"
|
2019-10-30 15:57:14 +00:00
|
|
|
on-response="$ctrl.delete($response)">
|
2019-09-25 18:06:42 +00:00
|
|
|
</vn-confirm>
|