-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
89 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
app/decorators/web/admin/activity_lines/lider/ya_lider/participant_decorator.rb
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
app/decorators/web/admin/activity_lines/lider/ya_lider/stage_decorator.rb
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
app/decorators/web/admin/activity_lines/lider/ya_lider_decorator.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class TeamForm < ApplicationReform | ||
properties :title, :member_id, :description, :state, :user_ids, :school, :municipality, :type, :team_id, :publicity, | ||
:state_event | ||
:state_event, :project_type, :project_id | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
module Web::Admin::TeamsHelper | ||
def team_types | ||
team_types = t('activerecord.attributes.team.types') | ||
types = {} | ||
team_types.each do |key, value| | ||
types[value] = "Team::#{key.to_s.capitalize}" | ||
team_types.reduce({}) do |types, value| | ||
types.merge! value[1] => "Team::#{value[0].to_s.capitalize}" | ||
end | ||
types | ||
end | ||
|
||
def team_types_name(type) | ||
t("activerecord.attributes.team.types.#{type.split(':').last.downcase}") | ||
end | ||
|
||
def teams_hash(teams) | ||
teams_hash = {} | ||
teams.each do |team| | ||
teams_hash[team.full_title] = team.id | ||
teams.reduce({}) do |teams_hash, team| | ||
teams_hash.merge! team.full_title => team.id | ||
end | ||
end | ||
|
||
def projects_hash(projects) | ||
projects.reduce({}) do |hash, project| | ||
hash.merge! project.title => project.id | ||
end | ||
teams_hash | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
class Team::Committee < Team | ||
validates :title, presence: true | ||
belongs_to :project, polymorphic: true | ||
|
||
extend Enumerize | ||
enumerize :project_type, in: [ 'ActivityLines::Lider::YaLider' ] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AddProjectIdToTeams < ActiveRecord::Migration | ||
def change | ||
add_column :teams, :project_id, :integer | ||
add_column :teams, :project_type, :text | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters