-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Committee Meetings to Intro Evals Page Pt. 2 #348
base: develop
Are you sure you want to change the base?
Conversation
533fb33
to
a99020e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you did a sed
for renaming things. misses a number of variable names, and I'm worried this might break things in unexpected places, since you're renaming strings in some places too.
all_cm = [{"id": m.id, | ||
"name": m.committee, | ||
"name": m.directorship, | ||
"dt_obj": m.timestamp, | ||
"date": m.timestamp.strftime("%a %m/%d/%Y"), | ||
"attendees": get_meeting_attendees(m.id), | ||
"type": "cm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any plan to update all_cm
or "type": "cm"
?
@@ -414,13 +414,13 @@ def get_seminar_attendees(meeting_id): | |||
TechnicalSeminar.timestamp > start_of_year(), | |||
TechnicalSeminar.approved).all()] | |||
pend_cm = [{"id": m.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this too?
@@ -446,9 +446,9 @@ def get_seminar_attendees(meeting_id): | |||
@attendance_bp.route('/attendance/alter/cm/<cid>', methods=['POST']) | |||
@auth.oidc_auth | |||
@get_user | |||
def alter_committee_attendance(cid, user_dict=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cid
as in committee [meeting] id
?
@@ -510,7 +510,7 @@ def alter_seminar_attendance(sid, user_dict=None): | |||
@attendance_bp.route('/attendance/ts/<sid>', methods=['GET', 'DELETE']) | |||
@auth.oidc_auth | |||
@get_user | |||
def get_cm_attendees(sid, user_dict=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is technical seminar attendance?
@@ -552,28 +552,28 @@ def get_ts_attendees(cid, user_dict=None): | |||
attendees = [{"value": a.uid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this is cm attendance, (and you didn't change the route name), they're reversed
@@ -467,8 +467,8 @@ def member_management_upgrade_user(user_dict=None): | |||
new_acct.eval_date = acct.eval_date | |||
|
|||
db.session.add(new_acct) | |||
for fca in FreshmanCommitteeAttendance.query.filter(FreshmanCommitteeAttendance.fid == fid): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and fca again
spring['committee_meetings'] = len(c_meetings) | ||
spring['req_meetings'] = req_cm(user_dict['account']) | ||
h_meetings = [(m.meeting_id, m.attendance_status) for m in get_hm(user_dict['account'])] | ||
c_meetings = get_directorship_meetings(user_dict['account']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c_meetings?
@@ -35,8 +35,8 @@ def render_template(template_name, user_dict=None, **kwargs): | |||
is_intromember = ldap_is_intromember(user_dict['account']) | |||
is_rtp = ldap_is_rtp(user_dict['account']) | |||
|
|||
cm_review = len(CommitteeMeeting.query.filter( | |||
CommitteeMeeting.approved == False).all()) # pylint: disable=singleton-comparison | |||
cm_review = len(DirectorshipMeeting.query.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cm_review?
@@ -78,13 +78,13 @@ def get_freshman_data(user_name): | |||
if freshman_data is None: | |||
return None | |||
freshman['status'] = freshman_data.freshman_eval_result | |||
# number of committee meetings attended | |||
# number of directorship meetings attended | |||
c_meetings = [m.meeting_id for m in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c_meetings?
@@ -115,27 +115,27 @@ def get_onfloor_members(): | |||
if uid in [members.uid for members in ldap_get_onfloor_members()]] | |||
|
|||
|
|||
def get_cm(member): | |||
def get_directorship_meetings(member): | |||
c_meetings = [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and c_meetings again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the models changes are breaking
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.rename_table('freshman_committee_attendance', 'freshman_directorship_attendance') | ||
op.rename_table('committee_meetings', 'directorship_meetings') | ||
op.rename_table('member_committee_attendance', 'member_directorship_attendance') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.rename_table('freshman_directorship_attendance', 'freshman_committee_attendance') | ||
op.rename_table('directorship_meetings', 'committee_meetings') | ||
op.rename_table('member_directorship_attendance', 'member_committee_attendance') | ||
# ### end Alembic commands ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notably, it looks like this doesn't rename the enum? or any of the column names?
Would keep all information an evals director would want on the intro evals page. Everything else for an intro member's requirements are shown in the table view except for their committee meetings.
Unfucked the old PR, this time featuring screenshots!