salix/modules/travel/front/extra-community/index.html

190 lines
8.1 KiB
HTML
Raw Permalink Normal View History

2021-05-12 10:11:27 +00:00
<vn-crud-model
2020-11-11 11:34:07 +00:00
vn-id="model"
2020-11-13 08:30:40 +00:00
url="Travels/extraCommunityFilter"
user-params="::$ctrl.defaultFilter"
2020-11-20 14:05:57 +00:00
data="travels"
order="landed ASC, shipped ASC, travelFk, loadPriority, agencyModeFk, supplierName, evaNotes"
2021-05-12 10:11:27 +00:00
limit="20"
auto-load="true">
2020-11-11 11:34:07 +00:00
</vn-crud-model>
2020-11-13 08:30:40 +00:00
<vn-portal slot="topbar">
<vn-searchbar
vn-focus
2020-11-20 14:05:57 +00:00
panel="vn-extra-community-search-panel"
2021-01-19 12:06:10 +00:00
info="Search by travel id or reference"
placeholder="Search by extra community travel"
2020-11-20 14:05:57 +00:00
suggested-filter="$ctrl.defaultFilter"
filter="$ctrl.defaultFilter"
2020-11-13 08:30:40 +00:00
auto-state="false"
model="model">
</vn-searchbar>
</vn-portal>
<vn-card class="travel-list scrollable">
<smart-table
model="model"
options="$ctrl.smartTableOptions">
<slot-actions>
<section>
<vn-tool-bar class="vn-mb-md">
<vn-button
2022-12-21 08:36:31 +00:00
disabled="!travels.length"
icon="picture_as_pdf"
ng-click="$ctrl.showReport()"
vn-tooltip="Open as PDF">
</vn-button>
</vn-tool-bar>
</section>
</slot-actions>
<slot-table>
<table>
<thead>
<tr>
<th field="id" shrink>
<span translate>Id</span>
</th>
2022-10-07 12:35:16 +00:00
<th field="cargoSupplierFk">
<span translate>Supplier</span>
</th>
2022-10-07 12:35:16 +00:00
<th field="agencyModeFk">
2022-09-14 10:45:40 +00:00
<span translate>Agency</span>
</th>
<th field="invoiceAmount">
<span translate>Amount</span>
</th>
<th field="ref">
<span translate>Reference</span>
</th>
<th field="stickers" number>
<span translate>Packages</span>
</th>
2022-10-10 07:21:14 +00:00
<th field="kg" number>
<span translate>Bl. KG</span>
</th>
<th field="loadedKg" number>
<span translate>Phy. KG</span>
</th>
<th field="volumeKg" number>
<span translate>Vol. KG</span>
</th>
<th
field="warehouseOutFk"
translate-attr="{title: 'Warehouse Out'}">
<span translate>Wh. Out</span>
</th>
<th field="shipped">
<span translate>W. Shipped</span>
</th>
<th
field="warehouseInFk"
translate-attr="{title: 'Warehouse In'}">
<span translate>Wh. In</span>
</th>
<th field="landed">
<span translate>W. Landed</span>
</th>
</tr>
</thead>
<tbody
ng-repeat="travel in travels"
class="vn-mb-md"
vn-droppable="$ctrl.onDrop($event)"
ng-attr-id="{{::travel.id}}"
vn-stop-click>
<tr
class="header"
vn-anchor="::{
state: 'travel.card.basicData',
params: {id: travel.id}
}">
<td vn-click-stop>
<span
class="link"
2020-11-20 14:05:57 +00:00
ng-click="travelDescriptor.show($event, travel.id)">
{{::travel.id}}
</span>
</td>
2022-10-10 06:57:41 +00:00
<td class="multi-line" vn-click-stop>
<span
class="link"
ng-click="supplierDescriptor.show($event, travel.cargoSupplierFk)">
{{::travel.cargoSupplierNickname}}
</span>
</td>
<td></td>
2022-10-10 07:21:14 +00:00
<td>{{::travel.agencyModeName}}</td>
<td vn-click-stop>
<vn-td-editable name="reference" expand>
<text>{{travel.ref}}</text>
<field>
<vn-textfield class="dense" vn-focus
ng-model="travel.ref"
on-change="$ctrl.save(travel.id, {ref: value})">
</vn-textfield>
</field>
</vn-td-editable>
</td>
<td number>{{::travel.stickers}}</td>
2022-10-10 07:21:14 +00:00
<td vn-click-stop>
<vn-td-editable name="lockedKg" expand style="text-align: right">
<text number>{{travel.kg}}</text>
<field>
<vn-input-number class="dense" vn-focus
ng-model="travel.kg"
on-change="$ctrl.save(travel.id, {kg: value})"
min="0">
</vn-input-number>
</field>
</vn-td-editable>
</td>
<td number>{{::travel.loadedKg}}</td>
<td number>{{::travel.volumeKg}}</td>
<td expand>{{::travel.warehouseOutName}}</td>
<td expand>{{::travel.shipped | date: 'dd/MM/yyyy'}}</td>
<td expand>{{::travel.warehouseInName}}</td>
<td expand>{{::travel.landed | date: 'dd/MM/yyyy'}}</td>
</tr>
<tr
ng-repeat="entry in travel.entries"
draggable
2020-11-20 14:05:57 +00:00
ng-attr-id="{{::entry.id}}"
ng-click="$event.preventDefault()">
<td>
2020-11-20 14:05:57 +00:00
<span class="link"
ng-click="entryDescriptor.show($event, entry.id)">
{{::entry.id}}
</span>
</td>
2022-10-10 06:57:41 +00:00
<td class="multi-line">
<span
class="link"
ng-click="supplierDescriptor.show($event, entry.supplierFk)">
{{::entry.supplierName}}
</span>
</td>
<td number>{{::entry.invoiceAmount | currency: 'EUR': 2}}</td>
<td></td>
<td class="td-editable">{{::entry.invoiceNumber}}</td>
<td number>{{::entry.stickers}}</td>
<td number></td>
<td number>{{::entry.loadedkg}}</td>
<td number>{{::entry.volumeKg}}</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</slot-table>
</smart-table>
</vn-card>
2020-11-20 14:05:57 +00:00
<vn-travel-descriptor-popover
vn-id="travelDescriptor">
</vn-travel-descriptor-popover>
<vn-entry-descriptor-popover
vn-id="entryDescriptor">
</vn-entry-descriptor-popover>
<vn-supplier-descriptor-popover
vn-id="supplierDescriptor">
</vn-supplier-descriptor-popover>