Skip to content

Commit c7e87c2

Browse files
update limits
1 parent d431dc6 commit c7e87c2

6 files changed

Lines changed: 10 additions & 13 deletions

File tree

app/views/team_mailer/qualified_email.text.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Hi <%= @owner.profile.name %>,
22

3-
Great news! 🎉 <%= @team.name %> has reached 3 members and is now officially qualified for Hack! with achieve by Petra!
3+
Great news! 🎉 <%= @team.name %> has reached the required minimum number of members and is now officially qualified for Hack! with achieve by Petra!
44

55
What's Next?
66
============

packages/admin_dashboard_portal/app/definitions/admin_dashboard_portal/hacker_definition.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
class AdminDashboardPortal::HackerDefinition < ::HackerDefinition
2-
index_page_title "Hackers & Check In"
3-
4-
index_page_description "Validated team hackers can be checked in upon " \
5-
"arrival. Use the 'Check In' action only when needed."
2+
index_page_description "Qalified team hackers can be checked in upon arrival"
63

74
search do |scope, query|
85
scope.joins(:profile)

packages/hackathon/app/definitions/hackathon/team_definition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Hackathon::TeamDefinition < Hackathon::ResourceDefinition
22
display :status, formatter: ->(value) { value.titleize }
33

4-
field :status, description: "3 members are required to qualify"
4+
field :status, description: "#{Hackathon::Team::MINIMUM_TEAM_MEMBERSHIPS} members are required to qualify"
55

66
scope :qualified do |scope|
77
scope.qualified

packages/hackathon/app/interactions/hackathon/teams/export_qualified_team_members_interaction.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Hackathon
44
module Teams
55
class ExportQualifiedTeamMembersInteraction < ResourceInteraction
6-
presents label: "Export Qualified Members to CSV",
6+
presents label: "Export Qualified Teams",
77
icon: Phlex::TablerIcons::Send
88

99
private

packages/hackathon/app/models/hackathon/team.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
class Hackathon::Team < Hackathon::ResourceRecord
2424
dynamic_path_parameter :name
2525

26-
MINIMUM_TEAM_MEMBERSHIPS = 3
27-
MAX_TEAM_MEMBERSHIPS = 5
28-
MAX_TEAM_THRESHOLD = 20
26+
MINIMUM_TEAM_MEMBERSHIPS = 2
27+
MAX_TEAM_MEMBERSHIPS = 4
28+
MAX_TEAM_THRESHOLD = 10
2929

3030
belongs_to :hacker
3131

@@ -55,7 +55,7 @@ def has_minimum_memberships?
5555
# Runs the qualification checks for the team and sends an email to the team
5656
# if they are qualified.
5757
#
58-
# A team is qualified if they have at least 3 members.
58+
# A team is qualified if they have at least {MINIMUM_TEAM_MEMBERSHIPS} members.
5959
def run_qualification_checks
6060
return unless unqualified? && has_minimum_memberships?
6161

packages/hackathon/app/policies/hackathon/team_policy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def read?
1212
# Core attributes
1313

1414
def permitted_attributes_for_create
15-
[:hacker, :name]
15+
[:name, :hacker]
1616
end
1717

1818
def permitted_attributes_for_read
19-
[:hacker, :name, :status]
19+
[:name, :hacker, :status]
2020
end
2121

2222
# Associations

0 commit comments

Comments
 (0)