Skip to content
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

removed advisors from showing up in waiver logs #823

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
Expand Down
38 changes: 38 additions & 0 deletions huxley/core/migrations/0060_auto_20230228_2230.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by Django 2.2.6 on 2023-02-28 22:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0059_registration_invoices_sent'),
]

operations = [
migrations.AddField(
model_name='committeefeedback',
name='conferences_attended',
field=models.FloatField(blank=True, default=1),
),
migrations.AddField(
model_name='committeefeedback',
name='other_events',
field=models.IntegerField(blank=True, choices=[(0, 'Blank'), (1, 'Delegate Workshop Only'), (2, 'Fall Conference Only'), (3, 'Delegate Workshop and Fall Conference'), (4, 'Neither/I do not know what these are')], default=0),
),
migrations.AddField(
model_name='committeefeedback',
name='outreach_sessions',
field=models.IntegerField(blank=True, choices=[(0, 'Blank'), (1, 'No'), (2, 'Unsure'), (3, 'Yes')], default=0),
),
migrations.AddField(
model_name='committeefeedback',
name='team_format',
field=models.IntegerField(blank=True, choices=[(0, 'Blank'), (1, 'Club'), (2, 'Class'), (3, 'Other/unsure')], default=0),
),
migrations.AlterField(
model_name='committeefeedback',
name='berkeley_perception',
field=models.IntegerField(blank=True, choices=[(0, 'Blank'), (1, 'No'), (2, 'Unsure'), (3, 'Yes')], default=0),
),
]
17 changes: 14 additions & 3 deletions huxley/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ class CommitteeFeedback(models.Model):
(9, 9),
(10, 10), )

LIKELY_CHOICES = ((0, 'Blank'), (1, 'No'),
(2, 'No change/unsure'), (3, 'Yes'))
LIKELY_CHOICES = ((0, 'Blank'), (1, 'No'), (2, 'Unsure'), (3, 'Yes'))

CLUB_OR_CLASS = ((0, 'Blank'), (1, 'Club'), (2, 'Class'), (3, 'Other/unsure'))
DW_OR_FC = ((0, 'Blank'), (1, 'Delegate Workshop Only'), (2, 'Fall Conference Only'), (3,'Delegate Workshop and Fall Conference'), (4, 'Neither/I do not know what these are'))

committee = models.ForeignKey(Committee, on_delete=models.CASCADE)
comment = models.TextField(blank=True, default='')
Expand Down Expand Up @@ -215,7 +217,13 @@ class CommitteeFeedback(models.Model):
berkeley_perception = models.IntegerField(
blank=True, default=0, choices=LIKELY_CHOICES)
money_spent = models.FloatField(blank=True, default=0)

conferences_attended = models.FloatField(blank=True, default=1)
team_format = models.IntegerField(
blank = True, default=0, choices=CLUB_OR_CLASS)
other_events = models.IntegerField(
blank = True, default=0, choices=DW_OR_FC)
outreach_sessions = models.IntegerField(
blank = True, default=0, choices=LIKELY_CHOICES)
def __str__(self):
return str(self.committee.name) + " - Comment " + str(self.id)

Expand Down Expand Up @@ -746,6 +754,9 @@ def process_waiver(cls, waiver):
delegate.save()
return "Successfully confirmed waiver for %s." % delegate.name

#check if advisor
if len(users_list) == 1 and users_list[0].is_advisor():
return "Advisor waiver unneeded."
# log the unmatched waiver
error_waiver_log = WaiverLog(
waiver_unique_id=unique_id,
Expand Down
90 changes: 89 additions & 1 deletion huxley/www/js/components/DelegateCommitteeFeedbackView.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,100 @@ class DelegateCommitteeFeedbackView extends React.Component {
</font>
<br></br>
<NumberInput
placeholder="Number of BMUN sessions attended"
placeholder="Food estimate"
onChange={_handleChange.bind(this, "money_spent")}
value={this.state["money_spent"].toString()}
/>
</label>
</div>
<div>
<br />
<hr />
<br />
<label>
<font size={3}>
<b>
How many MUN conferences have you been to, including this one?
</b>
</font>
<br></br>
<NumberInput
placeholder="Number of conferences attended"
onChange={_handleChange.bind(this, "conferences_attended")}
value={this.state["conferences_attended"]}
/>
</label>
</div>
<div>
<br />
<hr />
<br />
<label>
<font size={3}>
<b>
Is Model UN a club or a class at your school?
</b>
</font>
<br></br>
<select
onChange={_handleChange.bind(this, "team_format")}
value={this.state["team_format"]}
default={0}
>
<option value={0}>-</option>
<option value={1}>Club</option>
<option value={2}>Class</option>
<option value={3}>Other/unsure</option>
</select>
</label>
</div>
<div>
<br />
<hr />
<br />
<label>
<font size={3}>
<b>
Did you attend delegate workshop and/or fall conference?
</b>
</font>
<br></br>
<select
onChange={_handleChange.bind(this, "other_events")}
value={this.state["other_events"]}
default={0}
>
<option value={0}>-</option>
<option value={1}>Delegate Workshop Only</option>
<option value={2}>Fall Conference Only</option>
<option value={3}>Delegate Workshop and Fall Conference</option>
<option value={4}>Neither/I do not know what these are</option>
</select>
</label>
</div>
<div>
<br />
<hr />
<br />
<label>
<font size={3}>
<b>
Did your school have any BMUN outreach sessions?
</b>
</font>
<br></br>
<select
onChange={_handleChange.bind(this, "outreach_sessions")}
value={this.state["outreach_sessions"]}
default={0}
>
<option value={0}>-</option>
<option value={1}>No</option>
<option value={2}>Unsure</option>
<option value={3}>Yes</option>
</select>
</label>
</div>
</div>
);
};
Expand Down