refs #5066 sorted without CONCAT, order=false

This commit is contained in:
Carlos Satorres 2023-05-31 10:04:34 +02:00
parent eaffd61579
commit dfebb3b307
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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>