-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1329 from SplitTime/oveson/service-form-for-produ…
…ction Set up service form in My Stuff
- Loading branch information
Showing
24 changed files
with
361 additions
and
222 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# frozen_string_literal: true | ||
|
||
class MyStuffController < ApplicationController | ||
before_action :authenticate_user! | ||
before_action :set_presenter | ||
|
||
def index | ||
end | ||
|
||
def events | ||
render partial: "events", locals: { presenter: @presenter } | ||
end | ||
|
||
def event_series | ||
render partial: "event_series", locals: { presenter: @presenter } | ||
end | ||
|
||
def interests | ||
render partial: "interests", locals: { presenter: @presenter } | ||
end | ||
|
||
def live_updates | ||
render partial: "live_updates", locals: { presenter: @presenter } | ||
end | ||
|
||
def organizations | ||
render partial: "organizations", locals: { presenter: @presenter } | ||
end | ||
|
||
def results | ||
render partial: "results", locals: { presenter: @presenter } | ||
end | ||
|
||
def service_requirements | ||
render partial: "service_requirements", locals: { presenter: @presenter } | ||
end | ||
|
||
private | ||
|
||
def set_presenter | ||
@presenter = MyStuffPresenter.new(current_user) | ||
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
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
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 +1 @@ | ||
<%= render "lottery_entrant_with_tickets", record: @lottery_entrant %> | ||
<%= render "lottery_entrant_with_tickets", presenter: LotteryEntrantPresenter.new(@lottery_entrant) %> |
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,9 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_event_series_card"> | ||
<% presenter.recent_event_series(10).each do |series| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to series.name, organization_event_series_path(series.organization, series) %></strong> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
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,9 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_events_card"> | ||
<% presenter.recent_event_groups(20).each do |event_group| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to event_group.name, event_group_path(event_group) %></strong> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
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,9 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_interests_card"> | ||
<% presenter.interests.each do |person| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to person.full_name, person_path(person) %></strong> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
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,9 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_live_updates_card"> | ||
<% presenter.watch_efforts.each do |effort| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to "#{effort.full_name} at #{effort.event_name}", effort_path(effort) %></strong> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
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,16 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_organizations_card"> | ||
<% presenter.owned_organizations.each do |organization| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to organization.name, organization_path(organization) %></strong> | ||
<span class="badge bg-secondary">Owner</span> | ||
</h4> | ||
<% end %> | ||
<% presenter.steward_organizations.each do |organization| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to organization.name, organization_path(organization) %></strong> | ||
<span class="badge bg-secondary">Steward</span> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
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,9 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_results_card"> | ||
<% presenter.recent_user_efforts(20).each do |effort| %> | ||
<h4 class="card-text"> | ||
<strong><%= link_to effort.event_name, effort_path(effort) %></strong> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
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,9 @@ | ||
<%# locals: (presenter:) %> | ||
|
||
<turbo-frame id="my_stuff_service_requirements_card"> | ||
<% presenter.lottery_entrants.each do |lottery_entrant| %> | ||
<h4 class="card-text fw-bold"> | ||
<%= link_to lottery_entrant.lottery.name, organization_lottery_entrant_service_detail_path(lottery_entrant.organization, lottery_entrant.lottery, lottery_entrant) %> | ||
</h4> | ||
<% end %> | ||
</turbo-frame> |
Oops, something went wrong.