salix/modules/entry/front/latest-buys/index.html

120 lines
4.3 KiB
HTML
Raw Normal View History

2020-07-20 09:31:47 +00:00
<vn-crud-model
vn-id="model"
url="Entries/latestBuysFilter"
limit="20"
data="buys"
auto-load="true">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
panel="vn-latest-buys-search-panel"
suggested-filter="$ctrl.filterParams"
info="Search buys"
filter="$ctrl.filterParams"
model="model"
auto-state="false">
</vn-searchbar>
</vn-portal>
<!-- <vn-portal slot="topbar">
<vn-searchbar
panel="vn-latest-buys-search-panel"
info="Search buys"
model="model"
auto-state="false">
</vn-searchbar>
</vn-portal> -->
<vn-data-viewer
model="model"
class="vn-mb-xl vn-w-xl">
<vn-card>
<vn-table
model="model"
show-fields="$ctrl.showFields"
vn-smart-table="latestBuys">
<vn-thead>
<vn-tr>
<vn-th shrink
field='Selection'>
<vn-multi-check
model="model">
</vn-multi-check>
</vn-th>
<vn-th shrink field='status'></vn-th>
<vn-th field="id" number>Id</vn-th>
<vn-th field="landed" center>Landed</vn-th>
<vn-th>Reference</vn-th>
<vn-th field="supplierFk">Supplier</vn-th>
<vn-th field="currencyFk" center>Currency</vn-th>
<vn-th field="companyFk" center>Company</vn-th>
<vn-th field="isBooked" center>Booked</vn-th>
<vn-th field="isConfirmed" center>Confirmed</vn-th>
<vn-th field="isOrdered" center>Ordered</vn-th>
<vn-th>Notes</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<a ng-repeat="buy in $ctrl.buys"
class="clickable vn-tr search-result"
ui-sref="buy.card.summary({id: {{::buy.id}}})">
<vn-td shrink>
<vn-check
ng-model="buy.checked"
vn-click-stop>
</vn-check>
</vn-td>
<vn-td shrink>
<vn-icon
ng-show="buy.isInventory"
class="bright"
vn-tooltip="Inventory buy"
icon="icon-inventory">
</vn-icon>
<vn-icon
ng-show="buy.isRaid"
class="bright"
vn-tooltip="Virtual buy"
icon="icon-net">
</vn-icon>
</vn-td>
<vn-td number>{{::buy.size}}</vn-td>
<vn-td center>
<span
class="link"
vn-click-stop="travelDescriptor.show($event, buy.travelFk)">
{{::buy.landed | date:'dd/MM/yyyy'}}
</span>
</vn-td>
<vn-td expand>{{::buy.ref}}</vn-td>
<vn-td expand>{{::buy.supplierName}}</vn-td>
<vn-td center expand>{{::buy.currencyCode}}</vn-td>
<vn-td center expand>{{::buy.companyCode}}</vn-td>
<vn-td center><vn-check ng-model="buy.isBooked" disabled="true"></vn-check></vn-td>
<vn-td center><vn-check ng-model="buy.isConfirmed" disabled="true"></vn-check></vn-td>
<vn-td center><vn-check ng-model="buy.isOrdered" disabled="true"></vn-check></vn-td>
<vn-td shrink>
<vn-icon
ng-if="buy.notes.length"
vn-tooltip="{{::buy.notes}}"
icon="insert_drive_file"
class="bright">
</vn-icon>
</vn-td>
</a>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
<vn-button class="round sm vn-mb-sm"
icon="edit"
ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.edit()"
vn-tooltip="Edit buys"
tooltip-position="left">
</vn-button>
</vn-vertical>
</div>
<vn-travel-descriptor-popover
vn-id="travelDescriptor">
</vn-travel-descriptor-popover>