Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override sorting_name to ignore SAC/CAS prefix in Sektion for hitobito#2673 #621

Merged
merged 2 commits into from
Jun 17, 2024
Merged
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
16 changes: 0 additions & 16 deletions app/helpers/sac_cas/sheet/group/nav_left.rb

This file was deleted.

5 changes: 4 additions & 1 deletion app/models/group/sektion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ class Group::Sektion < ::Group

has_many :sac_section_membership_configs, dependent: :destroy, foreign_key: :group_id

def sorting_name
display_name.delete_prefix('SAC ').delete_prefix('CAS ')
end

def sac_cas_self_registration_url(host)
Groups::SektionSelfRegistrationLink.new(self, host).url
end

end
1 change: 0 additions & 1 deletion lib/hitobito_sac_cas/wagon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class Wagon < Rails::Engine
Dropdown::TableDisplays.prepend SacCas::Dropdown::TableDisplays
Dropdown::GroupEdit.prepend SacCas::Dropdown::GroupEdit
Event::ParticipationButtons.prepend SacCas::Event::ParticipationButtons
Sheet::Group::NavLeft.prepend SacCas::Sheet::Group::NavLeft

admin_item = NavigationHelper::MAIN.find { |item| item[:label] == :admin }
admin_item[:active_for] += %w(cost_centers cost_units)
Expand Down
Loading