client greuge order by shipped and amount #1431

This commit is contained in:
Joan Sanchez 2019-05-16 09:24:13 +02:00
parent 417dc511f5
commit 1ae2512169
2 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,7 @@
filter="::$ctrl.filter" filter="::$ctrl.filter"
link="{clientFk: $ctrl.$stateParams.id}" link="{clientFk: $ctrl.$stateParams.id}"
limit="20" limit="20"
data="greuges" auto-load="false"> data="greuges" auto-load="true">
</vn-crud-model> </vn-crud-model>
<mg-ajax <mg-ajax
path="/client/api/greuges/{{$ctrl.$stateParams.id}}/sumAmount" path="/client/api/greuges/{{$ctrl.$stateParams.id}}/sumAmount"
@ -20,7 +20,7 @@
</div> </div>
</vn-horizontal> </vn-horizontal>
<vn-vertical> <vn-vertical>
<vn-table model="model"> <vn-table model="model" auto-load="false">
<vn-thead> <vn-thead>
<vn-tr> <vn-tr>
<vn-th field="shipped" default-order="DESC">Date</vn-th> <vn-th field="shipped" default-order="DESC">Date</vn-th>

View File

@ -6,12 +6,13 @@ class Controller {
this.filter = { this.filter = {
include: [ include: [
{ {
relation: "greugeType", relation: 'greugeType',
scope: { scope: {
fields: ["id", "name"] fields: ['id', 'name']
} }
} }
] ],
order: 'shipped DESC, amount'
}; };
} }
} }