From 37b6e53b553127004016cd6795ed446a4752c980 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Dec 2020 15:34:20 -0500 Subject: [PATCH 1/3] add assigned status to model --- hackathons/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hackathons/models.py b/hackathons/models.py index 059a2f5..c248350 100644 --- a/hackathons/models.py +++ b/hackathons/models.py @@ -61,6 +61,7 @@ class Meta: class Sponsorship(models.Model): + ASSIGNED = "assigned" CONTACTED = "contacted" RESPONDED = "responded" CONFIRMED = "confirmed" @@ -68,6 +69,7 @@ class Sponsorship(models.Model): GHOSTED = "ghosted" PAID = "paid" STATUSES = ( + (ASSIGNED, "Assigned"), (CONTACTED, "Contacted"), (RESPONDED, "Responded"), (CONFIRMED, "Confirmed"), From 40f41c97036cd04f424daf555cf9f612008293d9 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Dec 2020 15:45:16 -0500 Subject: [PATCH 2/3] Update views, templates, etc. to reflect existence of Sponsorship.ASSIGNED --- dashboard/views.py | 2 +- hackathons/templates/cards/sponsorship_status.html | 2 ++ hackathons/views/sponsorships.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dashboard/views.py b/dashboard/views.py index 3a21929..6e5f54c 100644 --- a/dashboard/views.py +++ b/dashboard/views.py @@ -100,7 +100,7 @@ def gen_sponsorship_chart(sponsorships, hackathon): for sp in sponsorships: if sp.status in [Sponsorship.CONFIRMED, Sponsorship.PAID]: confirmed_count += 1 - elif sp.status in [Sponsorship.CONTACTED, Sponsorship.RESPONDED]: + elif sp.status in [Sponsorship.ASSIGNED, Sponsorship.CONTACTED, Sponsorship.RESPONDED]: progress_count += 1 elif sp.status in [Sponsorship.DENIED, Sponsorship.GHOSTED]: dead_count += 1 diff --git a/hackathons/templates/cards/sponsorship_status.html b/hackathons/templates/cards/sponsorship_status.html index 1eb4924..177de6b 100644 --- a/hackathons/templates/cards/sponsorship_status.html +++ b/hackathons/templates/cards/sponsorship_status.html @@ -1,6 +1,8 @@ {% if not sponsorship %} Uncontacted +{% elif sponsorship.status == 'assigned' %} + Assigned {% elif sponsorship.status == 'contacted' %} Contacted {% elif sponsorship.status == 'responded' %} diff --git a/hackathons/views/sponsorships.py b/hackathons/views/sponsorships.py index 8428175..acd8a52 100644 --- a/hackathons/views/sponsorships.py +++ b/hackathons/views/sponsorships.py @@ -80,7 +80,7 @@ def fake_sponsorship(company): return [Sponsorship(pk=0, company=c, tier=None, contribution=0) for c in company] confirmed = sponsorship_wrapper("confirmed", [Sponsorship.CONFIRMED, Sponsorship.PAID]) - in_progress = sponsorship_wrapper("in_progress", [Sponsorship.CONTACTED, Sponsorship.RESPONDED]) + in_progress = sponsorship_wrapper("in_progress", [Sponsorship.ASSIGNED, Sponsorship.CONTACTED, Sponsorship.RESPONDED]) dead = sponsorship_wrapper("dead", [Sponsorship.GHOSTED, Sponsorship.DENIED]) uncontacted = company_wrapper("uncontacted") From 282ae133f7923a39b2d35373eb5574f86cd1754e Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Dec 2020 15:50:22 -0500 Subject: [PATCH 3/3] Change sponsorship "Mark Contacted" to "Start Tracking" --- hackathons/templates/cards/sponsorship_table.html | 2 +- hackathons/templates/sponsorship_detail.html | 4 ++-- hackathons/templates/sponsorships_summary.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hackathons/templates/cards/sponsorship_table.html b/hackathons/templates/cards/sponsorship_table.html index e0f75f9..5050fd8 100644 --- a/hackathons/templates/cards/sponsorship_table.html +++ b/hackathons/templates/cards/sponsorship_table.html @@ -104,7 +104,7 @@

{{ card_title }}

{% if faked %} - Mark Contacted + Start Tracking {% else %} diff --git a/hackathons/templates/sponsorship_detail.html b/hackathons/templates/sponsorship_detail.html index 316d894..061b4be 100644 --- a/hackathons/templates/sponsorship_detail.html +++ b/hackathons/templates/sponsorship_detail.html @@ -19,7 +19,7 @@

{{ company.name }}

{% else %}
{% endif %} @@ -34,7 +34,7 @@

Status:  
This company has not been contacted for the current hackathon.
- Press "Mark Contacted" to begin tracking this company as a potential sponsor. + Press "Start Tracking" to begin tracking this company as a potential sponsor.
{% elif no_contacted_employees %}
diff --git a/hackathons/templates/sponsorships_summary.html b/hackathons/templates/sponsorships_summary.html index 756aee8..a6287f0 100644 --- a/hackathons/templates/sponsorships_summary.html +++ b/hackathons/templates/sponsorships_summary.html @@ -55,7 +55,7 @@ {% if faked %} - Mark Contacted + Start Tracking {% else %}