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

92 lines
3.6 KiB
HTML

<vn-crud-model
vn-id="model"
url="/api/Orders/filter"
limit="20"
data="orders"
order="landed DESC, clientFk">
</vn-crud-model>
<div class="content-block">
<vn-card class="vn-pa-md vn-w-sm">
<vn-searchbar
panel="vn-order-search-panel"
on-search="$ctrl.onSearch($params)"
info="Search orders by id"
vn-focus>
</vn-searchbar>
</vn-card>
<vn-data-viewer
model="model"
class="vn-my-md vn-mb-xl">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="id" number>Id</vn-th>
<vn-th field="clientFk">Client</vn-th>
<vn-th field="salesPersonFk">Sales person</vn-th>
<vn-th field="isConfirmed" center>Confirmed</vn-th>
<vn-th field="sourceApp">Created from</vn-th>
<vn-th field="created" center>Created</vn-th>
<vn-th field="landed" default-order="DESC" center>Landed</vn-th>
<vn-th field="companyFk">Company</vn-th>
<vn-th center>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="order in orders" class="clickable searchResult"
ui-sref="order.card.summary({id: {{::order.id}}})">
<vn-td number>{{::order.id}}</vn-td>
<vn-td expand>
<span class="link" ng-click="$ctrl.showClientDescriptor($event, order.clientFk)">
{{::order.clientName}}
</span>
</vn-td>
<vn-td expand>
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, order.salesPersonFk)">
{{::order.workerNickname | dashIfEmpty}}
</span>
</vn-td>
<vn-td center>
<vn-check
ng-model="order.isConfirmed"
disabled="true">
</vn-check>
</vn-td>
<vn-td>{{::order.sourceApp}}</vn-td>
<vn-td center>{{::order.created | dateTime: 'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td center>{{::order.landed | date:'dd/MM/yyyy'}}</vn-td>
<vn-td>{{::order.companyCode}}</vn-td>
<vn-td number>{{::order.total | currency: 'EUR': 2 | dashIfEmpty}}</vn-td>
<vn-td shrink>
<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-table>
</vn-card>
</vn-data-viewer>
</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="clientDescriptor">
</vn-client-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">
</vn-worker-descriptor-popover>
<vn-dialog
vn-id="summary"
class="dialog-summary">
<tpl-body>
<vn-order-summary order="$ctrl.selectedOrder"></vn-order-summary>
</tpl-body>
</vn-dialog>
<vn-scroll-up></vn-scroll-up>