Sfoglia il codice sorgente

[backend] Tri des utilisateurs par ordre alphabétique

refactoring
parent
commit
9a5c3d5f1e
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. +1
    -1
      backend/views/distribution/index.php
  2. +2
    -0
      common/models/User.php

+ 1
- 1
backend/views/distribution/index.php Vedi File

@@ -449,7 +449,7 @@ $this->setPageTitle('Distributions') ;
<div class="form-group">
<label class="control-label" for="select-id-user">Utilisateur</label>
<select class="form-control" v-model="order.id_user">
<option v-for="user in users" :value="user.id_user">{{ user.name +' '+ user.lastname }}</option>
<option v-for="user in users" :value="user.id_user">{{ user.lastname +' '+ user.name }}</option>
</select>
<input v-model="order.username" type="text" class="form-control" placeholder="Ou saisissez ici le nom de l'utilisateur" />
</div>

+ 2
- 0
common/models/User.php Vedi File

@@ -337,6 +337,8 @@ class User extends ActiveRecordCommon implements IdentityInterface
$query->andFilterWhere(['like', 'phone', $params['phone']]);
}
$query->orderBy('user.lastname ASC, user.name ASC') ;
return $query;
}


Loading…
Annulla
Salva