refactor order index
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Bernat Exposito Domenech 2020-06-17 13:25:12 +02:00
parent 686203db18
commit f1b26133cf
4 changed files with 7 additions and 6 deletions

View File

@ -625,7 +625,7 @@ export default {
}, },
ordersIndex: { ordersIndex: {
searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr', searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
firstSearchResultTotal: 'vn-order-index vn-card > vn-table > div > vn-tbody vn-tr vn-td:nth-child(9)', firstSearchResultTotal: 'vn-order-index vn-card > vn-table > div > vn-tbody vn-tr vn-td:nth-child(7)',
searchResultDate: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)', searchResultDate: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)',
searchResultAddress: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)', searchResultAddress: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)',
searchButton: 'vn-searchbar vn-icon[icon="search"]', searchButton: 'vn-searchbar vn-icon[icon="search"]',

View File

@ -156,6 +156,7 @@ module.exports = Self => {
c.name clientName, c.name clientName,
c.salesPersonFk, c.salesPersonFk,
u.nickname workerNickname, u.nickname workerNickname,
u.name name,
co.code companyCode co.code companyCode
FROM hedera.order o FROM hedera.order o
LEFT JOIN address a ON a.id = o.address_id LEFT JOIN address a ON a.id = o.address_id

View File

@ -13,10 +13,8 @@
<vn-th field="clientFk">Client</vn-th> <vn-th field="clientFk">Client</vn-th>
<vn-th field="salesPersonFk">Sales person</vn-th> <vn-th field="salesPersonFk">Sales person</vn-th>
<vn-th field="isConfirmed" center>Confirmed</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="created" center>Created</vn-th>
<vn-th field="landed" default-order="DESC" center>Landed</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-th center>Total</vn-th>
</vn-tr> </vn-tr>
</vn-thead> </vn-thead>
@ -37,7 +35,7 @@
<span <span
vn-click-stop="workerDescriptor.show($event, order.salesPersonFk)" vn-click-stop="workerDescriptor.show($event, order.salesPersonFk)"
class="link" > class="link" >
{{::order.workerNickname | dashIfEmpty}} {{::order.name | dashIfEmpty}}
</span> </span>
</vn-td> </vn-td>
<vn-td center> <vn-td center>
@ -46,10 +44,8 @@
disabled="true"> disabled="true">
</vn-check> </vn-check>
</vn-td> </vn-td>
<vn-td>{{::order.sourceApp}}</vn-td>
<vn-td center>{{::order.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td> <vn-td center>{{::order.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td center>{{::order.landed | date:'dd/MM/yyyy'}}</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 number>{{::order.total | currency: 'EUR': 2 | dashIfEmpty}}</vn-td>
<vn-td shrink> <vn-td shrink>
<vn-icon-button <vn-icon-button

View File

@ -11,6 +11,9 @@
<vn-check label="Confirmed" disabled="true" <vn-check label="Confirmed" disabled="true"
ng-model="$ctrl.summary.isConfirmed"> ng-model="$ctrl.summary.isConfirmed">
</vn-check> </vn-check>
<vn-label-value label="Company"
value="{{$ctrl.summary.address.companyFk}}">
</vn-label-value>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-label-value label="Created" <vn-label-value label="Created"
@ -21,6 +24,7 @@
</vn-label-value> </vn-label-value>
<vn-label-value label="Address" <vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}"> value="{{$ctrl.formattedAddress}}">
</vn-label-value>
<vn-label-value label="Phone" <vn-label-value label="Phone"
value="{{$ctrl.summary.address.phone}}"> value="{{$ctrl.summary.address.phone}}">
</vn-label-value> </vn-label-value>