Skip to content

Commit

Permalink
Merge pull request #60 from fullstackatbrown/applicant_portal_fixes
Browse files Browse the repository at this point in the history
Applicant portal fixes
  • Loading branch information
charlestang06 authored Dec 5, 2024
2 parents 270784b + 7594209 commit edcaccd
Show file tree
Hide file tree
Showing 20 changed files with 618 additions and 439 deletions.
180 changes: 117 additions & 63 deletions necysc_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from solo.models import SingletonModel



class Applicant(models.Model):
# choices for application status
APP_STATUS_CHOICES = {
Expand Down Expand Up @@ -42,9 +41,9 @@ class Applicant(models.Model):
"AL": "Adult L",
"AX": "Adult XL",
}

# choices for program data
PROGRAM_CHOICES={
PROGRAM_CHOICES = {
"D": "Day",
"ON": "Overnight",
"CIT": "CIT",
Expand All @@ -54,13 +53,14 @@ class Applicant(models.Model):
}

# choices for forms
HEALTH_FORM_RECEIVED_CHOICES={
HEALTH_FORM_RECEIVED_CHOICES = {
"NS": "Not Submitted",
"P": "Pending",
"A": "Approved",
}

user = models.ForeignKey(User, on_delete=models.CASCADE, blank=True, null=True)

user = models.ForeignKey(
User, on_delete=models.CASCADE, blank=True, null=True)

# status data
created_at = models.DateTimeField(auto_now_add=True)
Expand All @@ -69,7 +69,7 @@ class Applicant(models.Model):
app_status = models.CharField(
max_length=1,
choices=APP_STATUS_CHOICES,
default= "I"
default="I"
)
# this should be hidden from the user
health_record_status = models.CharField(
Expand All @@ -79,38 +79,55 @@ class Applicant(models.Model):
)

# personal data
applicant_fname = models.CharField(max_length=200, verbose_name="First Name")
applicant_lname = models.CharField(max_length=200, verbose_name="Last Name")
applicant_chinese_name = models.CharField(max_length=200, blank=True, null=True, verbose_name="Chinese Name") # optional
applicant_fname = models.CharField(
max_length=200, verbose_name="First Name")
applicant_lname = models.CharField(
max_length=200, verbose_name="Last Name")
applicant_chinese_name = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Chinese Name") # optional
applicant_email = models.EmailField(verbose_name="Email")

parent1_fname = models.CharField(max_length=200, verbose_name="Primary Contact First Name")
parent1_lname = models.CharField(max_length=200, verbose_name="Primary Contact Last Name")
parent1_fname = models.CharField(
max_length=200, verbose_name="Primary Contact First Name")
parent1_lname = models.CharField(
max_length=200, verbose_name="Primary Contact Last Name")
parent1_relationship = models.CharField(
max_length=1,
choices=PARENT_RELATIONSHIP_CHOICES,
verbose_name="Primary Contact Relationship"
)
parent1_phone = models.CharField(max_length=15, verbose_name="Primary Contact Phone")
parent1_phone = models.CharField(
max_length=15, verbose_name="Primary Contact Phone")
parent1_email = models.EmailField(verbose_name="Primary Contact Email")
parent1_for_POD = models.BooleanField(verbose_name="Primary Contact as POD")
parent1_for_POD = models.BooleanField(
verbose_name="Primary Contact as POD")

parent2_fname = models.CharField(max_length=200, blank=True, null=True, verbose_name="Secondary Contact First Name") # optional
parent2_lname = models.CharField(max_length=200, blank=True, null=True, verbose_name="Secondary Contact Last Name") # optional
parent2_fname = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Secondary Contact First Name") # optional
parent2_lname = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Secondary Contact Last Name") # optional
parent2_relationship = models.CharField(
max_length=1,
choices=PARENT_RELATIONSHIP_CHOICES,
blank=True, null=True, verbose_name="Secondary Contact Relationship") # optional
parent2_phone = models.CharField(max_length=15, blank=True, null=True, verbose_name="Secondary Contact Phone") # optional
parent2_email = models.EmailField(blank=True, null=True, verbose_name="Secondary Contact Email") # optional
parent2_for_POD = models.BooleanField(blank=True, null=True, verbose_name="Secondary Contact as POD") # optional
blank=True, null=True, verbose_name="Secondary Contact Relationship") # optional
parent2_phone = models.CharField(
max_length=15, blank=True, null=True, verbose_name="Secondary Contact Phone") # optional
parent2_email = models.EmailField(
blank=True, null=True, verbose_name="Secondary Contact Email") # optional
parent2_for_POD = models.BooleanField(
blank=True, null=True, verbose_name="Secondary Contact as POD") # optional

interest_in_POD_lead = models.BooleanField(verbose_name="Interest in POD Lead")
interest_in_POD_lead = models.BooleanField(
verbose_name="Interest in POD Lead")

additional_emergency_contact_fname = models.CharField(max_length=200, blank=True, null=True, verbose_name="Emergency Contact First Name") # optional
additional_emergency_contact_lname = models.CharField(max_length=200, blank=True, null=True, verbose_name="Emergency Contact Last Name") # optional
additional_emergency_contact_relationship = models.CharField(max_length=200, blank=True, null=True, verbose_name="Emergency Contact Relationship") # optional
additional_emergency_contact_phone = models.CharField(max_length=15, blank=True, null=True, verbose_name="Emergency Contact Phone") # optional
additional_emergency_contact_fname = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Emergency Contact First Name") # optional
additional_emergency_contact_lname = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Emergency Contact Last Name") # optional
additional_emergency_contact_relationship = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Emergency Contact Relationship") # optional
additional_emergency_contact_phone = models.CharField(
max_length=15, blank=True, null=True, verbose_name="Emergency Contact Phone") # optional

street_address = models.CharField(max_length=200, verbose_name="Street")
city = models.CharField(max_length=200, verbose_name="City")
Expand All @@ -122,7 +139,8 @@ class Applicant(models.Model):
max_length=1,
choices=SEX_CHOICES,
verbose_name="Gender")
applicant_grade = models.IntegerField(validators=[MinValueValidator(0)], verbose_name="School Grade")
applicant_grade = models.IntegerField(
validators=[MinValueValidator(0)], verbose_name="School Grade")
applicant_shirt_size = models.CharField(
max_length=2,
choices=SHIRT_SIZE_CHOICES,
Expand All @@ -136,13 +154,18 @@ class Applicant(models.Model):
verbose_name="Program"
)
payment_received = models.BooleanField(default=False)
payment_total = models.DecimalField(max_digits=10, decimal_places=2, default=0)
payment_camp = models.DecimalField(max_digits=10, decimal_places=2, default=0)
payment_donation = models.DecimalField(max_digits=10, decimal_places=2, blank=True, null=True, default=0)
payment_pod = models.DecimalField(max_digits=10, decimal_places=2, blank=True, null=True, default=0)
payment_total = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
payment_camp = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
payment_donation = models.DecimalField(
max_digits=10, decimal_places=2, blank=True, null=True, default=0)
payment_pod = models.DecimalField(
max_digits=10, decimal_places=2, blank=True, null=True, default=0)

# other
allowed_pickup_persons = models.CharField(max_length=500, blank=True, null=True)
allowed_pickup_persons = models.CharField(
max_length=500, blank=True, null=True)
financial_aid_requested = models.BooleanField(default=False)
listing_on_weekbook = models.BooleanField(default=False)
camper_contact_email = models.EmailField(blank=True, null=True)
Expand All @@ -151,29 +174,38 @@ class Applicant(models.Model):
available_for_carpool = models.BooleanField(default=False)
referrals = models.CharField(max_length=200, blank=True, null=True)
heard_from = models.CharField(max_length=200, blank=True, null=True)
preferred_roommate = models.CharField(max_length=200, blank=True, null=True)
preferred_roommate = models.CharField(
max_length=200, blank=True, null=True)

# forms
health_form_a_received = models.BooleanField(default=False)
health_form_b_received = models.BooleanField(default=False)
medication_slip_received = models.BooleanField(default=False)
parent1_cori_status = models.CharField(max_length=10, blank=True, null=True)
parent1_sori_status = models.CharField(max_length=10, blank=True, null=True)
parent1_cori_status = models.CharField(
max_length=10, blank=True, null=True)
parent1_sori_status = models.CharField(
max_length=10, blank=True, null=True)
parent1_id_status = models.CharField(max_length=10, blank=True, null=True)
parent2_cori_status = models.CharField(max_length=10, blank=True, null=True)
parent2_sori_status = models.CharField(max_length=10, blank=True, null=True)
parent2_cori_status = models.CharField(
max_length=10, blank=True, null=True)
parent2_sori_status = models.CharField(
max_length=10, blank=True, null=True)
parent2_id_status = models.CharField(max_length=10, blank=True, null=True)
camper_cori_status = models.CharField(max_length=10, blank=True, null=True)
camper_sori_status = models.CharField(max_length=10, blank=True, null=True)
camper_id_status = models.CharField(max_length=10, blank=True, null=True)
camp_rule_agreement = models.BooleanField(default=False)
liability_agreement = models.BooleanField(default=False)

# medical data
insurance_provider = models.CharField(max_length=200, blank=True, null=True, verbose_name="Health Insurance Provider")
subscriber_name = models.CharField(max_length=200, blank=True, null=True, verbose_name="Insurance Subscriber Name")
primary_physician_name = models.CharField(max_length=200, blank=True, null=True, verbose_name="Physician Name")
primary_physician_phone = models.CharField(max_length=15, blank=True, null=True, verbose_name="Physician Phone")
insurance_provider = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Health Insurance Provider")
subscriber_name = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Insurance Subscriber Name")
primary_physician_name = models.CharField(
max_length=200, blank=True, null=True, verbose_name="Physician Name")
primary_physician_phone = models.CharField(
max_length=15, blank=True, null=True, verbose_name="Physician Phone")

# grant permission to questions - if left false contact guardian(s)
grant_hospital_permission = models.BooleanField(default=False)
Expand All @@ -184,80 +216,102 @@ class Applicant(models.Model):
grant_skin_treatment_permission = models.BooleanField(default=False)

allergies = models.BooleanField(default=False)
allergies_description = models.CharField(max_length=200, blank=True, null=True)
initial_for_allergy_treatment = models.CharField(max_length=200, blank=True, null=True)
allergies_description = models.CharField(
max_length=200, blank=True, null=True)
initial_for_allergy_treatment = models.CharField(
max_length=200, blank=True, null=True)
epi_pen_prescribed = models.BooleanField(default=False)

social_emotional_concerns = models.CharField(max_length=200, blank=True, null=True)


social_emotional_concerns = models.CharField(
max_length=200, blank=True, null=True)

wear_glasses = models.BooleanField(default=False)
wear_contacts = models.BooleanField(default=False)
wear_hearing_aids = models.BooleanField(default=False)

medication = models.BooleanField(default=False)
medication_description = models.CharField(max_length=200, blank=True, null=True)
medication_description = models.CharField(
max_length=200, blank=True, null=True)

opt_out_activities = models.CharField(
max_length=200, blank=True, null=True)

opt_out_activities = models.CharField(max_length=200, blank=True, null=True)

# hidden in form
medical_comments = models.CharField(max_length=200, blank=True, null=True)

signature = models.CharField(max_length=200, blank=True, null=True)


# registration

# TODO: hidden in form
group_id = models.CharField(max_length=200, blank=True, null=True, default="0")
group_id = models.CharField(
max_length=200, blank=True, null=True, default="0")
room_id = models.CharField(max_length=200, blank=True, null=True)
internal_comments = models.CharField(max_length=200, blank=True, null=True)


class ApplicantHealth(Applicant):
class Meta:
proxy = True
app_label = Applicant._meta.app_label
verbose_name = "Applicant Health Info"


class CampDirectory(Applicant):
class Meta:
proxy = True
app_label = Applicant._meta.app_label
verbose_name = "Camp Directory"


class POD(Applicant):
class Meta:
proxy = True
app_label = Applicant._meta.app_label
verbose_name = "Parent On Duty"
verbose_name = "Parent On Duty"


class CarpoolApplicant(Applicant):
class Meta:
proxy = True
app_label = Applicant._meta.app_label
verbose_name = "Carpool Directory"


class CamperReferral(Applicant):
class Meta:
proxy = True
app_label = Applicant._meta.app_label
verbose_name = "Camper Referral"


class RoomateRequest(Applicant):
class Meta:
proxy = True
app_label = Applicant._meta.app_label
verbose_name = "Roomate Request"


class GlobalData(SingletonModel):
day_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
ON_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
EA_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
CIT_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
day_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
ON_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
EA_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
CIT_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
# refers to both counselor and ra cost
RA_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
OPs_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
POD_camp_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0)
RA_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
OPs_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)
POD_camp_cost = models.DecimalField(
max_digits=10, decimal_places=2, default=0)

def __str__(self):
return "Global Data Settings"

class Meta:
verbose_name = "Global Data"
verbose_name_plural = "Global Data"


5 changes: 3 additions & 2 deletions necysc_app/static/necysc_app/about.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.hero-section {
background-image: url("./images/programs_hero.jpg");
background-image: url("./images/necyscbannerimage.jpg");
}

h1, h4{
h1,
h4 {
color: #4e598c;
}
Binary file added necysc_app/static/necysc_app/images/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit edcaccd

Please sign in to comment.