refs #5066 sorted without CONCAT, order=false
This commit is contained in:
parent
eaffd61579
commit
dfebb3b307
|
@ -18,7 +18,7 @@ module.exports = Self => {
|
|||
|
||||
Self.sorted = async warehouseFk => {
|
||||
return Self.rawSql(`
|
||||
SELECT v.id, v.warehouseFk, CONCAT(v.numberPlate, ' - ', w.name) as description
|
||||
SELECT v.id, v.warehouseFk, v.numberPlate, w.name
|
||||
FROM vehicle v
|
||||
JOIN warehouse w ON w.id = v.warehouseFk
|
||||
ORDER BY v.warehouseFk = ? DESC, w.id, v.numberPlate ASC;
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
<div class="text-secondary text-caption">{{::name}}</div>
|
||||
</tpl-item>
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
<vn-autocomplete vn-one class="dense"
|
||||
label="Vehicle"
|
||||
ng-model="$ctrl.route.vehicleFk"
|
||||
data="$ctrl.vehicles"
|
||||
show-field="description"
|
||||
order="order"
|
||||
show-field="numberPlate"
|
||||
value-field="id"
|
||||
label="Vehicle"
|
||||
vn-name="vehicle">
|
||||
order="false">
|
||||
<tpl-item>{{::numberPlate}} - {{::name}}</tpl-item>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
Loading…
Reference in New Issue