Skip to content

Commit

Permalink
Merge pull request #140 from ChicagoWorldcon/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
balen authored May 27, 2022
2 parents 5793c97 + bbbc31d commit 57d507b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/concerns/resource_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:)
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/room_sets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions app/controllers/rooms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion app/javascript/sessions/room_picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 57d507b

Please sign in to comment.