Skip to content

Commit 22fb937

Browse files
make event customizations global
1 parent 0f8b3d1 commit 22fb937

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

packages/admin_dashboard_portal/app/definitions/admin_dashboard_portal/hackathon/event_definition.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,4 @@ class AdminDashboardPortal::Hackathon::EventDefinition < ::Hackathon::EventDefin
66
collection: false
77

88
scope :published
9-
10-
# Make each field take full row (vertical layout)
11-
display :title, wrapper: {class: "col-span-full"}
12-
display :description, wrapper: {class: "col-span-full"}
13-
display :event_type, wrapper: {class: "col-span-full"}
14-
display :scheduled_at, wrapper: {class: "col-span-full"}
15-
display :duration, wrapper: {class: "col-span-full"}
16-
display :meeting_link, wrapper: {class: "col-span-full"}
17-
display :video_url, wrapper: {class: "col-span-full"}
18-
display :status, wrapper: {class: "col-span-full"}
199
end

packages/admin_dashboard_portal/app/policies/admin_dashboard_portal/hackathon/event_policy.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@ def permitted_attributes_for_update
1111
super
1212
end
1313
end
14-
15-
def permitted_attributes_for_index
16-
[:title, :event_type, :scheduled_at, :status]
17-
end
1814
end

packages/hackathon/app/definitions/hackathon/event_definition.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@ class Hackathon::EventDefinition < Hackathon::ResourceDefinition
66

77
scope :upcoming
88
scope :past
9+
10+
# Make each field take full row (vertical layout)
11+
display :title, wrapper: {class: "col-span-full"}
12+
display :description, wrapper: {class: "col-span-full"}
13+
display :event_type, wrapper: {class: "col-span-full"}
14+
display :scheduled_at, wrapper: {class: "col-span-full"}
15+
display :duration, wrapper: {class: "col-span-full"}
16+
display :meeting_link, wrapper: {class: "col-span-full"}
17+
display :video_url, wrapper: {class: "col-span-full"}
18+
display :status, wrapper: {class: "col-span-full"}
919
end

packages/hackathon/app/policies/hackathon/event_policy.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def permitted_attributes_for_read
1919
[:title, :description, :event_type, :scheduled_at, :duration, :meeting_link, :video_url, :status]
2020
end
2121

22+
def permitted_attributes_for_index
23+
[:title, :event_type, :scheduled_at, :status]
24+
end
25+
2226
# Associations
2327

2428
def permitted_associations

0 commit comments

Comments
 (0)