salix/modules/ticket/front/sale-tracking/index.html

72 lines
2.6 KiB
HTML

<vn-crud-model
vn-id="model"
url="/ticket/api/SaleTrackings/listSaleTracking"
link="{ticketFk: $ctrl.$stateParams.id}"
limit="20"
data="sales"
order="itemFk DESC"
auto-load="true">
</vn-crud-model>
<vn-data-viewer model="model">
<vn-card class="vn-w-xl">
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th shrink></vn-th>
<vn-th field="itemFk" number>Item</vn-th>
<vn-th>Description</vn-th>
<vn-th field="quantity" number>Quantity</vn-th>
<vn-th field="originalQuantity" number>Original</vn-th>
<vn-th field="workerFk">Worker</vn-th>
<vn-th field="state">State</vn-th>
<vn-th field="created">Created</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in sales">
<vn-td shrink>
<vn-icon
class="bright"
icon="warning"
ng-if="sale.quantity != sale.originalQuantity"
vn-tooltip="The quantity do not match">
</vn-icon>
</vn-td>
<vn-td number>
<span
ng-click="$ctrl.showItemDescriptor($event, sale.itemFk)"
class="link">
{{sale.itemFk | zeroFill:6}}
</span>
</vn-td>
<vn-td expand>
<vn-fetched-tags
max-length="6"
item="::sale.item"
name="::sale.concept"
sub-name="::sale.item.subName">
</vn-fetched-tags>
</vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
<vn-td number>{{::sale.originalQuantity}}</vn-td>
<vn-td expand>
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, sale.workerFk)">
{{::sale.userNickname | dashIfEmpty}}
</span>
</vn-td>
<vn-td>{{::sale.state}}</vn-td>
<vn-td>{{::sale.created | dateTime: 'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
<vn-item-descriptor-popover vn-id="itemDescriptor"
quicklinks="$ctrl.quicklinks">
</vn-item-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="workerDescriptor"
worker-fk="$ctrl.selectedWorker">
</vn-worker-descriptor-popover>