salix/modules/order/front/index/index.html

88 lines
3.2 KiB
HTML

<vn-crud-model
vn-id="model"
url="/order/api/Orders"
filter="::$ctrl.filter"
limit="20"
data="orders" auto-load="false">
</vn-crud-model>
<div margin-medium>
<div class="vn-list">
<vn-card pad-medium-h>
<vn-searchbar auto-load="false"
panel="vn-order-search-panel"
model="model"
expr-builder="$ctrl.exprBuilder(param, value)"
auto-load="true"
vn-focus>
</vn-searchbar>
</vn-card>
</div>
<vn-card margin-medium-v pad-medium>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="id" default-order="DESC">Id</vn-th>
<vn-th field="clientFk">Client</vn-th>
<vn-th field="isConfirmed">Confirmed</vn-th>
<vn-th field="sourceApp">Created from</vn-th>
<vn-th field="created">Created</vn-th>
<vn-th field="companyFk">Company</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="order in orders" class="clickable"
ui-sref="order.card.summary({id: {{::order.id}}})">
<vn-td>{{::order.id}}</vn-td>
<vn-td>
<span class="link" ng-click="$ctrl.showDescriptor($event, order.clientFk)">
{{::order.client.name}}
</span>
</vn-td>
<vn-td>
<vn-check
field="order.isConfirmed"
disabled="true">
</vn-check>
</vn-td>
<vn-td>{{::order.sourceApp}}</vn-td>
<vn-td>{{::order.created | date:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>{{::order.company.code}}</vn-td>
<vn-td>
<vn-icon-button
ng-click="$ctrl.preview($event, order)"
vn-tooltip="Preview"
icon="desktop_windows">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
<vn-empty-rows ng-if="model.data === null" translate>
Enter a new search
</vn-empty-rows>
</vn-table>
</vn-card>
<vn-pagination
model="model"
scroll-selector="ui-view">
</vn-pagination>
</div>
<a ui-sref="order.create" vn-bind="+" vn-tooltip="New order" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>
</a>
<vn-client-descriptor-popover vn-id="descriptor"></vn-client-descriptor-popover>
<vn-dialog class="dialog-summary"
vn-id="order-summary-dialog">
<tpl-body>
<vn-order-summary order="$ctrl.order"></vn-order-summary>
</tpl-body>
</vn-dialog>
<vn-dialog
vn-id="summary"
class="dialog-summary summary">
<tpl-body>
<vn-order-summary order="$ctrl.selectedOrder"></vn-order-summary>
</tpl-body>
</vn-dialog>