columns moved and no refresh on stateState changes

This commit is contained in:
Carlos Jimenez Ruiz 2021-02-03 17:01:43 +01:00
parent ddc1456bb0
commit 532cb582cf
4 changed files with 8 additions and 11 deletions

View File

@ -197,6 +197,7 @@ module.exports = Self => {
t.id,
t.shipped,
CAST(DATE(t.shipped) AS CHAR) AS shippedDate,
HOUR(t.shipped) AS shippedHour,
t.nickname,
t.refFk,
t.routeFk,

View File

@ -18,12 +18,12 @@
<vn-th field="salesPersonFk" class="expendable">Salesperson</vn-th>
<vn-th field="shipped">Date</vn-th>
<vn-th>Hour</vn-th>
<vn-th field="hour" shrink>Closure</vn-th>
<vn-th field="nickname">Alias</vn-th>
<vn-th field="provinceFk" class="expendable">Province</vn-th>
<vn-th field="stateFk" >State</vn-th>
<vn-th field="zoneFk">Zone</vn-th>
<vn-th field="warehouseFk">Warehouse</vn-th>
<vn-th field="hour" shrink>Closure</vn-th>
<vn-th number>Total</vn-th>
<vn-th></vn-th>
</vn-tr>
@ -86,6 +86,7 @@
</span>
</vn-td>
<vn-td>{{::ticket.shipped | date: 'HH:mm'}}</vn-td>
<vn-td shrink>{{::ticket.zoneLanding | date: 'HH:mm'}}</vn-td>
<vn-td>
<span
title="{{::ticket.nickname}}"
@ -118,7 +119,6 @@
</span>
</vn-td>
<vn-td>{{::ticket.warehouse}}</vn-td>
<vn-td shrink>{{::ticket.zoneLanding | date: 'HH:mm'}}</vn-td>
<vn-td number>
<span class="chip {{$ctrl.totalPriceColor(ticket)}}">
{{::ticket.total | currency: 'EUR': 2}}

View File

@ -2,7 +2,7 @@
vn-id="model"
url="Tickets/filter"
limit="20"
order="shipped DESC, zoneHour DESC, zoneMinute DESC, clientFk">
order="shipped DESC, shippedHour ASC, zoneLanding ASC">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar

View File

@ -54,18 +54,14 @@ class Controller extends Summary {
}
setOkState() {
let params = {};
if (this.$params.id)
params = {ticketFk: this.$params.id};
if (!this.$params.id)
params = {ticketFk: this.ticket.id};
const params = {ticketFk: 'id' in this.ticket ? this.ticket.id : this.$params.id};
params.code = 'OK';
this.$http.post(`TicketTrackings/changeState`, params)
.then(() => this.reload())
.then(() => {
if ('id' in this.$params) this.reload();
})
.then(() => {
this.vnApp.showSuccess(this.$t('Data saved!'));
});