Browse Source

[backend] Tri des utilisateurs par ordre alphabétique

dev
Guillaume Bourgeois 5 years ago
parent
commit
9a5c3d5f1e
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      backend/views/distribution/index.php
  2. +2
    -0
      common/models/User.php

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

<div class="form-group"> <div class="form-group">
<label class="control-label" for="select-id-user">Utilisateur</label> <label class="control-label" for="select-id-user">Utilisateur</label>
<select class="form-control" v-model="order.id_user"> <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> </select>
<input v-model="order.username" type="text" class="form-control" placeholder="Ou saisissez ici le nom de l'utilisateur" /> <input v-model="order.username" type="text" class="form-control" placeholder="Ou saisissez ici le nom de l'utilisateur" />
</div> </div>

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

$query->andFilterWhere(['like', 'phone', $params['phone']]); $query->andFilterWhere(['like', 'phone', $params['phone']]);
} }
$query->orderBy('user.lastname ASC, user.name ASC') ;
return $query; return $query;
} }



Loading…
Cancel
Save