From ba8a264c4257a31ad9cac4ef1a1969ec83b8903a Mon Sep 17 00:00:00 2001 From: Ali Karbassi Date: Fri, 12 Jul 2019 16:46:04 -0500 Subject: [PATCH] [Admin] Updated checkin pages --- .../dashboard/session-check-in-mentors.html | 80 +++++++++-------- .../templates/dashboard/session-check-in.html | 88 +++++++++---------- fixtures/05-coderdojochi-mentororder.json | 2 +- fixtures/05-coderdojochi-order.json | 3 +- 4 files changed, 89 insertions(+), 84 deletions(-) diff --git a/coderdojochi/templates/dashboard/session-check-in-mentors.html b/coderdojochi/templates/dashboard/session-check-in-mentors.html index 1226d6f4..71f2714b 100644 --- a/coderdojochi/templates/dashboard/session-check-in-mentors.html +++ b/coderdojochi/templates/dashboard/session-check-in-mentors.html @@ -2,7 +2,7 @@ {% load i18n humanize coderdojochi_extras %} -{% block title %}We All Code Admin - Check in mentors{% endblock %} +{% block title %}Mentor Check In - We All Code{% endblock %} {% block extra_head %} {% endblock %} @@ -37,7 +39,7 @@ {% block content %} {% if active_orders.count %} -
+
@@ -56,7 +58,7 @@

{{ checked_in_orders.count }} of {{ active_orders.count }}

+
{% if active_session %}

Attending Mentors {{ active_orders.count }}

{% else %} @@ -66,32 +68,32 @@

Attended Mentors {{ active_orders.count }}
{% if active_orders.count %} - +
- - - - - - + + + + + + {% if active_session %}{% endif %} - + {% for order in active_orders %} - - + - - - - + + + + {% if active_session %} - {% endif %} - @@ -121,15 +125,17 @@

Attended Mentors {{ active_orders.count }} {% endif %} {% if active_session != True and no_show_orders %} -
+

No Shows {{ no_show_orders.count }}

-

NameEmailPhoneAgeGenderNameEmailPhoneAgeGenderActionCheck-in DateCheck-in Date
{{ forloop.counter|stringformat:"02d" }} + {{ forloop.counter|stringformat:"02d" }} {{ order.mentor.user.first_name }} {{ order.mentor.user.last_name }} {{ order.mentor.user.email }}{{ order.mentor.phone }}--{{ order.mentor.user.email }}{{ order.mentor.phone }}-- +
{% csrf_token %} @@ -103,9 +105,11 @@

Attended Mentors {{ active_orders.count }}

+ {% if order.check_in %} {{ order.check_in }} + {% else %} + - {% endif %}
+
- + + + @@ -138,13 +144,13 @@

No Shows {{ no_show_orders.count }}

{% for order in no_show_orders %} - - - - - + + + + + + + {% endfor %} @@ -155,18 +161,18 @@

No Shows {{ no_show_orders.count }} {% endif %} {% if inactive_orders.count and inactive_orders %} -
+

Cancelled Tickets {{ inactive_orders.count }}

-

Mentor NameNameEmailPhone Age Gender Cancelled Date
{{ forloop.counter|stringformat:"02d" }} - {{ order.mentor.user.first_name }} {{ order.mentor.user.last_name }} - --{{ order.updated_at }}{{ forloop.counter|stringformat:"02d" }}{{ order.mentor.user.first_name }} {{ order.mentor.user.last_name }}{{ order.mentor.user.email }}{{ order.mentor.phone }}--{{ order.updated_at }}
+
- - - - - + + + + + diff --git a/coderdojochi/templates/dashboard/session-check-in.html b/coderdojochi/templates/dashboard/session-check-in.html index c4db1f80..78c88ad4 100644 --- a/coderdojochi/templates/dashboard/session-check-in.html +++ b/coderdojochi/templates/dashboard/session-check-in.html @@ -2,7 +2,7 @@ {% load i18n humanize coderdojochi_extras %} -{% block title %}We All Code Admin - Check in mentors{% endblock %} +{% block title %}Student Check In - We All Code{% endblock %} {% block extra_head %} @@ -114,7 +116,7 @@ {% block content %} {% if active_orders.count %} -
+
@@ -162,7 +164,7 @@

{% endif %} {% if active_orders.count %} -
+
@@ -170,7 +172,7 @@

{% endif %} {% if active_orders.count %} -
+
{% if active_session %} @@ -180,19 +182,19 @@

Attended Students {{ active_orders.count } {% endif %} {% if active_orders.count %} -

Mentor NameAgeGenderCancelled DateMentor NameAgeGenderCancelled Date
+
- - - - - - - - - - + + + + + + + + + + @@ -217,15 +219,9 @@

Attended Students {{ active_orders.count } {% endif %} {% endif %} -

- - + + +
Student NameAgeGuardian NameGuardian EmailGuardian PhoneSchool{% if not active_session %}Checkin Date{% endif %}# A# MStudent NameAgeGuardian NameGuardian EmailGuardian PhoneSchool{% if not active_session %}Checkin Date{% endif %}#A#M
- {{ order.guardian.user.email }} - - {{ order.guardian.phone }} - - {{ order.student.school_name }} - {{ order.guardian.user.email }}{{ order.guardian.phone }}{{ order.student.school_name }} {% if active_session %} {% if not order.check_in %} @@ -253,20 +249,20 @@

Attended Students {{ active_orders.count } {% endif %} {% if active_session != True %} -
+

No Shows {{ no_show_orders.count }}

- +
- - - - - - + + + + + + @@ -291,7 +287,7 @@

No Shows {{ no_show_orders.count }} {% endif %} {% if inactive_orders.count %} -
+

Cancelled Tickets {{ inactive_orders.count }}

@@ -299,24 +295,28 @@

Cancelled Tickets {{ inactive_orders.count

- - - - - - + + + + + + + + + {% for order in inactive_orders %} - + - + + + + diff --git a/fixtures/05-coderdojochi-mentororder.json b/fixtures/05-coderdojochi-mentororder.json index 26dc6677..c6b7a0a8 100644 --- a/fixtures/05-coderdojochi-mentororder.json +++ b/fixtures/05-coderdojochi-mentororder.json @@ -4,7 +4,7 @@ "pk": 1, "fields": { "mentor": 1, - "session": 1, + "session": 2, "check_in": "2016-05-07T10:00:00-06:00", "affiliate": "", "order_number": "", diff --git a/fixtures/05-coderdojochi-order.json b/fixtures/05-coderdojochi-order.json index ac9977e0..c8cb8553 100644 --- a/fixtures/05-coderdojochi-order.json +++ b/fixtures/05-coderdojochi-order.json @@ -8,7 +8,6 @@ "student": 1, "is_active": true, "ip": "", - "check_in": "2016-05-07T10:00:00-06:00", "alternate_guardian": "", "affiliate": "", "order_number": "", @@ -25,7 +24,7 @@ "guardian": 1, "session": 2, "student": 2, - "is_active": true, + "is_active": false, "ip": "", "check_in": "2016-05-07T13:07:35-06:00", "alternate_guardian": "",
Student NameAgeGuardianLast Update Date# A# MStudent NameAgeGuardianLast Update Date#A#M
Student NameAgeGuardianCancelled Date# A# MStudent NameAgeGuardianGuardian EmailGuardian PhoneSchoolCancelled Date#A#M
{{ forloop.counter|stringformat:"02d" }} - {{ order.student.first_name }} {{ order.student.last_name }} - {{ order.student.first_name }} {{ order.student.last_name }} {{ order.student | student_age:session.start_date }} {{ order.guardian.user.first_name }} {{ order.guardian.user.last_name }}{{ order.updated_at }}{{ order.guardian.user.email }}{{ order.guardian.phone }}{{ order.student.school_name }}{{ order.updated_at }} {{ order.num_attended }} {{ order.num_missed }}