Skip to content

Commit

Permalink
Merge pull request #16 from fnf-org/mfl/release-fixes
Browse files Browse the repository at this point in the history
Mfl/release fixes
  • Loading branch information
beingmattlevy authored May 26, 2024
2 parents ef74fdf + 9c4fc88 commit 955a3f0
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'rails', '~> 7.0', '>= 7.0.2.3'
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'

gem 'mysql2', '~> 0.5.3'
gem 'mysql2', '~> 0.5.6'
gem 'puma', '~> 5.0'
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem 'importmap-rails'
Expand Down
10 changes: 8 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ GEM
mini_mime (1.1.2)
minitest (5.15.0)
msgpack (1.5.0)
mysql2 (0.5.3)
mysql2 (0.5.6)
net-imap (0.2.3)
digest
net-protocol
Expand All @@ -165,6 +165,10 @@ GEM
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.3-aarch64-linux)
racc (~> 1.4)
nokogiri (1.13.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.3-x86_64-linux)
racc (~> 1.4)
octicons (17.0.0)
Expand Down Expand Up @@ -265,6 +269,8 @@ GEM
zeitwerk (2.5.4)

PLATFORMS
aarch64-linux
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand All @@ -281,7 +287,7 @@ DEPENDENCIES
jquery-rails (~> 4.4)
kaminari (~> 1.2, >= 1.2.2)
lograge (~> 0.11)
mysql2 (~> 0.5.3)
mysql2 (~> 0.5.6)
octicons_helper
okcomputer
puma (~> 5.0)
Expand Down
12 changes: 10 additions & 2 deletions app/controllers/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ def index
end

def sort
if (User.column_names.include?(params[:sort]) && %w[asc desc].include?(params[:direction]))
"#{params[:sort]} #{params[:direction]}, name"
Rails.logger.info("registrations: params #{params}")

case params[:sort]
when 'Requested Tier'
"role #{params[:direction]}, name"
when 'Approved Tier'
"tier_id #{params[:direction]}, name"
when 'Registered Date'
"created_at #{params[:direction]}, name"
else
:name
end
end

# @deprecated
def sort_direction
%w[asc desc].include?(params[:direction]) ? params[:direction] : "asc"
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/registrations/_registrations.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<th>Requested Tier</th>
<th>Confirmed Planner*</th>
<th>Approved Tier</th>
<th>Tier Approved email Date</th>
<th>Tier Approved Date</th>
<th>Registered Date</th>
<th>Actions</th>
</tr>
Expand Down
16 changes: 8 additions & 8 deletions app/views/registrations/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false">sort...</a>
<ul class="dropdown-menu">
<li><%= sortable 'name', 'a-z', 'asc' %></li>
<li><%= sortable 'name', 'z-a', 'desc' %></li>
<li><%= sortable 'requested_tier', 'a-z', 'asc' %></li>
<li><%= sortable 'requested_tier', 'z-a', 'desc' %></li>
<li><%= sortable 'approved_tier', 'asc', 'asc' %></li>
<li><%= sortable 'approved_tier', 'desc', 'desc' %></li>
<li><%= sortable 'created_at', 'asc', 'asc' %></li>
<li><%= sortable 'created_at', 'desc', 'desc' %></li>
<li><%= sortable 'Name', 'a-z', 'asc' %></li>
<li><%= sortable 'Name', 'z-a', 'desc' %></li>
<li><%= sortable 'Requested Tier', 'a-z', 'asc' %></li>
<li><%= sortable 'Requested Tier', 'z-a', 'desc' %></li>
<li><%= sortable 'Approved Tier', '0-4', 'asc' %></li>
<li><%= sortable 'Approved Tier', '4-0', 'desc' %></li>
<li><%= sortable 'Registered Date', 'first-last', 'asc' %></li>
<li><%= sortable 'Registered Date', 'last-first', 'desc' %></li>
</ul>
</li>

Expand Down
4 changes: 2 additions & 2 deletions app/views/reservations/_reservations.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<th>Price</th>
<th>Total Price</th>
<th>Reservation Date</th>
<th>Payment Received</th>
<th>Payment Amount</th>
<th>Payment Method</th>
<th>Payment received by</th>
<th>Payment received on</th>
<th>Payment received date</th>
<th>Actions</th>
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.8'
version: '3.9'
services:
db:
image: mariadb:10.7.3
Expand Down

0 comments on commit 955a3f0

Please sign in to comment.