Skip to content

Commit

Permalink
Update 'assigned volunteers' checklist step
Browse files Browse the repository at this point in the history
Requested via Slack.
  • Loading branch information
kitsuta committed Oct 16, 2024
1 parent 51f7e09 commit 3138004
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions uber/site_sections/shifts_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def staffers(self, session, department_id=None, message=''):

attendees = []
counts = defaultdict(int)
requested_count = 0

if department_id:
department = session.query(Department).filter_by(id=department_id).first()
Expand All @@ -217,6 +218,7 @@ def staffers(self, session, department_id=None, message=''):
dept_filter = [] if department_id == None else [ # noqa: E711
Attendee.dept_memberships.any(department_id=department_id)]
attendees = session.staffers(pending=True).filter(*dept_filter).all()
requested_count = len([a for a in department.unassigned_explicitly_requesting_attendees if a.is_valid])
for attendee in attendees:
if session.admin_has_staffer_access(attendee) or department_id:
attendee.is_dept_head_here = attendee.is_dept_head_of(department_id) if department_id \
Expand All @@ -241,6 +243,7 @@ def staffers(self, session, department_id=None, message=''):
'attendees': attendees,
'emails': ','.join(a.email for a in attendees),
'emails_with_shifts': ','.join([a.email for a in attendees if department_id and a.hours_here]),
'requested_count': requested_count,
'checklist': checklist,
'message': message,
}
Expand Down
6 changes: 5 additions & 1 deletion uber/templates/shifts_admin/staffers.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<ul>
<li>that no one is assigned to your department who shouldn't be, such as problem volunteers from previous years</li>
<li>that no one is missing who you'd expect to be assigned here, such as staffers from previous years</li>
<li>that you have reviewed your department's <a href="../dept_admin/requests?department_id={{ department_id }}" target="_blank">membership requests list</a> and have added any new volunteers you want</li>
</ul>
<input type="submit" value="I Confirm This All Looks Good" />
</form>
Expand All @@ -37,7 +38,10 @@
<span style="font-size:14pt ; font-weight:bold"> Staffers Assigned to This Area</span>
(<a href="mailto:{{ c.ADMIN_EMAIL|email_only }}?bcc={{ emails }}">email these staffers</a>
or <a href="mailto:{{ c.ADMIN_EMAIL|email_only }}?bcc={{ emails_with_shifts }}">email staffers with shifts here</a>)<b>:</b>
<br/> <br/><a href="#attendee_form?id=None" class="btn btn-primary">Add new volunteer</a><br/><br/>
<br/> <br/>
<a href="#attendee_form?id=None" class="btn btn-primary">Add new volunteer</a>
<a href="../dept_admin/requests?department_id={{ department_id }}" class="btn btn-info" target="_blank">Review membership requests{% if requested_count %} ({{ requested_count }}){% endif %}</a>
<br/><br/>

<table class="table table-striped datatable">
<thead><tr>
Expand Down

0 comments on commit 3138004

Please sign in to comment.