diff --git a/app/controllers/concerns/resource_methods.rb b/app/controllers/concerns/resource_methods.rb index 51c639cc8..a558b5253 100644 --- a/app/controllers/concerns/resource_methods.rb +++ b/app/controllers/concerns/resource_methods.rb @@ -692,7 +692,7 @@ def paginated format = params[:format] return false if format == 'xls' || format == 'xlsx' - paginate + params[:perPage]&.to_i || paginate end def derived_col?(col_name:) diff --git a/app/controllers/room_sets_controller.rb b/app/controllers/room_sets_controller.rb index 60ceb6f66..5b8721b81 100644 --- a/app/controllers/room_sets_controller.rb +++ b/app/controllers/room_sets_controller.rb @@ -2,4 +2,8 @@ class RoomSetsController < ResourceController SERIALIZER_CLASS = 'RoomSetSerializer'.freeze POLICY_CLASS = 'RoomSetsPolicy'.freeze POLICY_SCOPE_CLASS = 'RoomSetsPolicy::Scope'.freeze + + def paginate + false + end end diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index 19ed3eddc..810ab0798 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -3,4 +3,8 @@ class RoomsController < ResourceController POLICY_CLASS = 'RoomPolicy'.freeze POLICY_SCOPE_CLASS = 'RoomPolicy::Scope'.freeze DEFAULT_SORTBY = 'rooms.sort_order' + + def paginate + false + end end diff --git a/app/javascript/sessions/room_picker.vue b/app/javascript/sessions/room_picker.vue index 1dfeaadc9..61bf01446 100644 --- a/app/javascript/sessions/room_picker.vue +++ b/app/javascript/sessions/room_picker.vue @@ -21,7 +21,7 @@ export default { }), computed: { roomOptions() { - return [{text: "No room selected", value: null}, ...this.collection.map(r => ({text: r.name, value: r.id}))] + return [{text: "No room selected", value: null}, ...this.collection.sort((a,b) => b.sortorder - a.sortorder).map(r => ({text: r.name, value: r.id}))] } }, mounted() {