client greuge order by shipped and amount #1431

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

View File

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

View File

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