ticket & order index fixes #1422 & #1423
gitea/salix/dev This commit has test failures Details

This commit is contained in:
Joan Sanchez 2019-05-14 08:13:04 +02:00
parent 18d0aa9282
commit 790577acaf
5 changed files with 13 additions and 19 deletions

View File

@ -150,10 +150,7 @@ module.exports = Self => {
stmts.push(` stmts.push(`
DROP TEMPORARY TABLE DROP TEMPORARY TABLE
tmp.order, tmp.order,
tmp.orderTotal`); tmp.orderTotal,
stmts.push(
`DROP TEMPORARY TABLE
tmp.filter`); tmp.filter`);
let sql = ParameterizedSQL.join(stmts, ';'); let sql = ParameterizedSQL.join(stmts, ';');

View File

@ -3,6 +3,7 @@
url="/api/Orders/filter" url="/api/Orders/filter"
limit="20" limit="20"
data="orders" data="orders"
order="landed DESC, clientFk"
auto-load="false"> auto-load="false">
</vn-crud-model> </vn-crud-model>
<div class="content-block"> <div class="content-block">
@ -22,15 +23,15 @@
auto-load="false"> auto-load="false">
<vn-thead> <vn-thead>
<vn-tr> <vn-tr>
<vn-th field="id" default-order="DESC" number>Id</vn-th> <vn-th field="id" number>Id</vn-th>
<vn-th field="clientFk">Client</vn-th> <vn-th field="clientFk">Client</vn-th>
<vn-th field="clientFk">Sales person</vn-th> <vn-th field="clientFk">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="sourceApp">Created from</vn-th>
<vn-th field="created" center>Created</vn-th> <vn-th field="created" center>Created</vn-th>
<vn-th field="created" center>Landed</vn-th> <vn-th field="landed" default-order="DESC" center>Landed</vn-th>
<vn-th field="companyFk">Company</vn-th> <vn-th field="companyFk">Company</vn-th>
<vn-th field="total" center>Total</vn-th> <vn-th center>Total</vn-th>
</vn-tr> </vn-tr>
</vn-thead> </vn-thead>
<vn-tbody> <vn-tbody>

View File

@ -8,19 +8,20 @@
<vn-label-value label="Nickname" <vn-label-value label="Nickname"
value="{{$ctrl.summary.address.nickname}}"> value="{{$ctrl.summary.address.nickname}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Confirmed"
value="{{$ctrl.summary.isConfirmed}}">
</vn-label-value>
<vn-label-value label="Warehouse" <vn-label-value label="Warehouse"
value="{{$ctrl.summary.sourceApp}}"> value="{{$ctrl.summary.sourceApp}}">
</vn-label-value> </vn-label-value>
<vn-check label="Confirmed" disabled="true"
field="$ctrl.summary.isConfirmed">
</vn-check>
{{$ctrl.summary.isConfirmed}}
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-label-value label="Created" <vn-label-value label="Created"
value="{{$ctrl.summary.created | dateTime: 'dd/MM/yyyy HH:mm'}}"> value="{{$ctrl.summary.created | dateTime: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Confirmed" <vn-label-value label="Confirmed"
value="{{$ctrl.summary.confirmed | dateTime: 'dd/MM/yyyy'}}"> value="{{$ctrl.summary.confirmed | dateTime: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Address" <vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}"> value="{{$ctrl.formattedAddress}}">

View File

@ -3,7 +3,7 @@
url="/ticket/api/Tickets/filter" url="/ticket/api/Tickets/filter"
limit="20" limit="20"
data="tickets" data="tickets"
order="shipped ASC, clientFk" order="shipped DESC, clientFk"
auto-load="false"> auto-load="false">
</vn-crud-model> </vn-crud-model>
<div class="content-block"> <div class="content-block">
@ -42,14 +42,14 @@
<vn-th></vn-th> <vn-th></vn-th>
<vn-th field="id" number>Id</vn-th> <vn-th field="id" number>Id</vn-th>
<vn-th field="salesPerson">Salesperson</vn-th> <vn-th field="salesPerson">Salesperson</vn-th>
<vn-th field="shipped">Date</vn-th> <vn-th field="shipped" default-order="DESC">Date</vn-th>
<vn-th>Hour</vn-th> <vn-th>Hour</vn-th>
<vn-th field="nickname">Alias</vn-th> <vn-th field="nickname">Alias</vn-th>
<vn-th field="province">Province</vn-th> <vn-th field="province">Province</vn-th>
<vn-th field="state" >State</vn-th> <vn-th field="state" >State</vn-th>
<vn-th field="agencyMode">Agency</vn-th> <vn-th field="agencyMode">Agency</vn-th>
<vn-th field="warehouse">Warehouse</vn-th> <vn-th field="warehouse">Warehouse</vn-th>
<vn-th field="invoice">Invoice</vn-th> <vn-th field="refFk">Invoice</vn-th>
<vn-th number>Total</vn-th> <vn-th number>Total</vn-th>
<vn-th></vn-th> <vn-th></vn-th>
</vn-tr> </vn-tr>

View File

@ -61,11 +61,6 @@ export default class Controller {
this.daysOnward = buildDate; this.daysOnward = buildDate;
} }
defaultFilter() {
this.buildFilterDates();
this.$scope.ticketSearchbar.filter = Object.assign({}, {mine: true, from: this.today, to: this.daysOnward});
}
onSearch(params) { onSearch(params) {
if (params) { if (params) {
if (params.scopeDays) { if (params.scopeDays) {