Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/src/Controller/GroupMembersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class GroupMembersController extends StandardController {
protected array $paginate = [
'order' => [
'People.primary_name.name' => 'asc'
'PrimaryName.family' => 'asc'
]
];

Expand Down Expand Up @@ -125,4 +125,5 @@ public function deleted() {

return parent::deleted();
}

}
5 changes: 5 additions & 0 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,11 @@ public function index() {
$query = $query->where(['enrollee_person_id' => $this->request->getQuery('enrollee_person_id')]);
}

// Force a default order if set
if (empty($this->request->getQuery('sort')) && !empty($this->paginate['order'])) {
$query = $query->order($this->paginate['order']);
}

// Fetch the data and paginate
$paginationLimit = $this->getValue(ApplicationStateEnum::PaginationLimit, DEF_SEARCH_LIMIT);
$resultSet = $this->paginate($query, [
Expand Down