Skip to content

Commit

Permalink
bump to 2.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Dim145 committed Oct 14, 2024
1 parent 4b80279 commit aacda1b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
58 changes: 30 additions & 28 deletions app/controllers/activities_applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ def show
activity_application.update!(begin_at: new_start_date)
end

activity_application.user.activity_applications = activity_application
.user
.activity_applications
.where(season_id: Season.current_apps_season&.id)
.to_a
.filter{|a|
Abilities::ActivityApplicationAbilities.is_activity_application_concern_any_activity_ref?(a, current_user.activity_refs.pluck(:id))
}
tmp_activities_applications = activity_application
.user
.activity_applications
.where(season_id: Season.current_apps_season&.id)
.to_a
.filter{|a|
Abilities::ActivityApplicationAbilities.is_activity_application_concern_any_activity_ref?(a, current_user.activity_refs.pluck(:id))
}

@activity_application = activity_application.as_json({
include: {
Expand All @@ -155,26 +155,6 @@ def show
},
instruments: {},
adhesions: {},
activity_applications: {
include: {
pre_application_activity: {},
pre_application_desired_activity: {},
activity_application_status: {},
desired_activities: {
include: {
activity_ref: { include: [:activity_ref_kind] },
activity: {
include: {
time_interval: {},
teacher: {},
activity_ref: {},
},
},
},
},
season: {},
},
},
},
},
activity_refs: { include: [:activity_ref_kind] },
Expand Down Expand Up @@ -211,6 +191,28 @@ def show
.user
.family_links_with_user(activity_application.season)

@activity_application["user"]["activity_applications"] = tmp_activities_applications.as_json({
include: {
pre_application_activity: {},
pre_application_desired_activity: {},
activity_application_status: {},
desired_activities: {
include: {
activity_ref: { include: [:activity_ref_kind] },
activity: {
include: {
time_interval: {},
teacher: {},
activity_ref: {},
},
},
},
},
season: {},
},
}
)

respond_to do |format|
format.html do
payer = activity_application.user.get_first_paying_family_member
Expand Down
2 changes: 1 addition & 1 deletion lib/elvis/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Elvis
VERSION = "2.8.4"
VERSION = "2.8.5"
end

0 comments on commit aacda1b

Please sign in to comment.