Skip to content

Commit

Permalink
Merge pull request #701 from ChicagoWorldcon/staging
Browse files Browse the repository at this point in the history
2.1.0
  • Loading branch information
Gailbear authored Aug 24, 2022
2 parents 9f1ce0c + d337a9f commit 5fdb55c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
12 changes: 6 additions & 6 deletions app/controllers/reports/program_ops_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def session_minors
filename: "SessionAndMinors-#{Time.now.strftime('%m-%d-%Y')}.xlsx",
disposition: 'attachment'
end

def user_privileges
authorize Person, policy_class: Reports::ProgramOpsReportPolicy

Expand All @@ -111,7 +111,7 @@ def user_privileges
people.each do |person|
worksheet.append_row(
[
person.primary_email,
person.primary_email&.email,
person.published_name,
person.convention_roles.collect{|r| r.role}.join(', '),
person.current_sign_in_at ? FastExcel.date_num(person.current_sign_in_at, person.current_sign_in_at.in_time_zone.utc_offset) : nil,
Expand All @@ -122,7 +122,7 @@ def user_privileges
end

send_data workbook.read_string,
filename: "UserPrivlages-#{Time.now.strftime('%m-%d-%Y')}.xlsx",
filename: "UserPrivileges-#{Time.now.strftime('%m-%d-%Y')}.xlsx",
disposition: 'attachment'
end

Expand Down Expand Up @@ -224,7 +224,7 @@ def sign_up_sessions
end

send_data workbook.read_string,
filename: "SessionRequoringSignup-#{Time.now.strftime('%m-%d-%Y')}.xlsx",
filename: "SessionRequiringSignup-#{Time.now.strftime('%m-%d-%Y')}.xlsx",
disposition: 'attachment'
end

Expand Down Expand Up @@ -256,8 +256,8 @@ def table_tents
pa.person.published_name,
session.description,
session.participant_notes,
session.published_session_assignments.role(moderator).collect{|p| "#{p.person.published_name} (#{p.person.pronouns})" }.join(",\n"),
session.published_session_assignments.role(participant).collect{|p| "#{p.person.published_name} (#{p.person.pronouns})" }.join(",\n")
session.published_session_assignments.role(moderator).collect{|p| "#{p.person.published_name}#{p.person.pronouns && !p.person.pronouns.empty? ? ' (' + p.person.pronouns + ')' : ''}" }.join(",\n"),
session.published_session_assignments.role(participant).collect{|p| "#{p.person.published_name}#{p.person.pronouns && !p.person.pronouns.empty? ? ' (' + p.person.pronouns + ')' : ''}" }.join(",\n")
]
end
end
Expand Down
12 changes: 6 additions & 6 deletions app/javascript/reports/reports_screen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@
</p>
</li>
<li>
<a href="/report/people_reports/mis_matched_envs" target="_blank">Participants with Mismatching Sessions Session Environments and Attendance Types</a>
<a href="/report/people_reports/mis_matched_envs" target="_blank">Participants with Mismatching Session Environments and Attendance Types</a>
<p class="ml-2">
<strong><em>Description</em></strong>: Participants whose attendance type does not match the session environment for sessions they are assigned to, one line per participant and session<br />
<strong><em>Fields</em></strong>: Published name, primary email, attendance type, participant status, session title, session room, session start time, session environment<br />
<strong><em>Session data included</em></strong>: all scheduled sessions<br />
<strong><em>Person data included</em></strong>: moderators and participants with attendance type of &quot;virtual&quot; assigned to session with environment of &quot;hybrid&quot; or &quot;in person&quot;, or with attendance type of &quot;in person&quot; assigned to session with environment of &quot;hybrid&quot; or &quot;virtual&quot;
<strong><em>Person data included</em></strong>: moderators and participants with attendance type of &quot;virtual&quot; assigned to session with environment of &quot;hybrid&quot; or &quot;in person&quot;, or with attendance type of &quot;in person&quot; assigned to session with environment of &quot;virtual&quot;
</p>
</li>

Expand Down Expand Up @@ -350,7 +350,7 @@
</p>
</li>
<li>
<a href="/report/program_ops_reports/session_minors" target="_blank">Session and Minors</a>
<a href="/report/program_ops_reports/session_minors" target="_blank">Sessions and Minors</a>
<p class="ml-2">
<strong><em>Description</em></strong>: Minors participation and attendee age restrictions, one line per session<br />
<strong><em>Fields</em></strong>: Session title, session description, session start time, session room, attendee age restriction, minors participation<br />
Expand All @@ -361,7 +361,7 @@
<a href="/report/program_ops_reports/room_signs" target="_blank">Room Sign Data for Mail Merge</a>
<p class="ml-2">
<strong><em>Description</em></strong>: Room sign data for mail merge, one line per room and day of week<br />
<strong><em>Fields</em></strong>: Room, day of week, sessions (title, start time, description, participant list with moderators)<br />
<strong><em>Fields</em></strong>: Room, day of week, sessions (title, start time, description, moderators, participants)<br />
<strong><em>Session data included</em></strong>: all published sessions<br />
<strong><em>Person data included</em></strong>: moderators, participants
</p>
Expand All @@ -379,14 +379,14 @@
<a href="/report/program_ops_reports/virtual_people" target="_blank">Participant Emails and Virtual Sessions</a>
<p class="ml-2">
<strong><em>Description</em></strong>: List of emails for moderators and participants of published sessions, with indicator about whether they are assigned to any session(s) of environment virtual, one line per participant<br />
<strong><em>Fields</em></strong>: Published name, name, whether person is assigned to a virtual session (y&#8725;n), primary email, other emails<br />
<strong><em>Fields</em></strong>: Published name, name, whether person is assigned to a virtual session (y &#8725; n), primary email, other emails<br />
<strong><em>Session data included</em></strong>: all published sessions<br />
<strong><em>Person data included</em></strong>: moderators and participants
</p>
</li>
</ul>
<div style="clear: both; height: 5rem;">&nbsp;</div>
<span v-if="currentUserIsStaff" class="text-muted font-italic" title="You do not have the right set of permissions to run this report." v-b-tooltip>Participants and Do Not Assign With</span>
<span v-if="currentUserIsStaff" class="text-muted font-italic" title="You do not have the right set of permissions to run this report." v-b-tooltip>User Privileges</span>
<a href="/report/program_ops_reports/user_privileges" target="_blank" v-if="currentUserIsAdmin">User Privileges</a>
<p class="ml-2">
<strong><em>Description</em></strong>: Login (primary email) listing, one line per person<br />
Expand Down
3 changes: 2 additions & 1 deletion app/models/session_area.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ class SessionArea < ApplicationRecord

accepts_nested_attributes_for :area

has_paper_trail versions: { class_name: 'Audit::SessionVersion' }, ignore: [:updated_at, :created_at, :lock_version]
# We do not really need to audo this
# has_paper_trail versions: { class_name: 'Audit::SessionVersion' }, ignore: [:updated_at, :created_at, :lock_version]
end
1 change: 1 addition & 0 deletions app/services/change_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def self.assignments_as_of(session_id:, to:)
def self.assignments_for(session_id:, role_id:, to:)
audits = Audit::SessionVersion
.where_object(session_id: session_id)
.where(item_type: 'SessionAssignment')
.where("created_at <= ?", to)
.order("created_at desc")
grouped_audits = audits.group_by {|a| a.item_id}
Expand Down

0 comments on commit 5fdb55c

Please sign in to comment.