|
|
|
@ -8,17 +8,17 @@ class CompetitionModule < ApplicationRecord
|
|
|
|
|
def module_url
|
|
|
|
|
case module_type
|
|
|
|
|
when "home"
|
|
|
|
|
"/competitions/#{competition.identifier}"
|
|
|
|
|
"/competitions/#{competition.identifier}.json"
|
|
|
|
|
when "inform"
|
|
|
|
|
"/competitions/#{competition.identifier}/informs?status=1"
|
|
|
|
|
"/competitions/#{competition.identifier}/informs.json?status=1"
|
|
|
|
|
when "manual"
|
|
|
|
|
"/competitions/#{competition.identifier}/informs?status=2"
|
|
|
|
|
"/competitions/#{competition.identifier}/informs.json?status=2"
|
|
|
|
|
when "chart"
|
|
|
|
|
"/competitions/#{competition.identifier}/charts"
|
|
|
|
|
"/competitions/#{competition.identifier}/charts.json"
|
|
|
|
|
when "enroll"
|
|
|
|
|
"/competitions/#{competition.identifier}/competition_teams"
|
|
|
|
|
"/competitions/#{competition.identifier}/competition_teams.json"
|
|
|
|
|
else
|
|
|
|
|
url || "/competitions/#{competition.identifier}/md_content?md_content_id=#{competition_module_md_content&.id}"
|
|
|
|
|
url || "/competitions/#{competition.identifier}/md_content.json?md_content_id=#{competition_module_md_content&.id}"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|