Changeset - 7fac10241ec7
[Not reviewed]
0 3 0
Joel Addison - 4 years ago 2020-01-10 12:49:17
joel@addison.net.au
Improve attendee reports

Display attendee profile data in normal table without DataTables so
sorting is not applied, causing data to be confusing to read.
Include item quantity in attendee data report for accurate schwag packing.
3 files changed with 29 insertions and 22 deletions:
0 comments (0 inline, 0 general)
pinaxcon/registrasion/models.py
Show inline comments
...
 
@@ -83,2 +83,3 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    company = models.CharField(
 
        verbose_name="Company",
 
        max_length=64,
...
 
@@ -135,2 +136,3 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    country = CountryField(
 
        verbose_name="Country",
 
        default="AU",
...
 
@@ -161,2 +163,3 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    gender = models.CharField(
 
        verbose_name="Gender",
 
        help_text="Gender data will only be used for demographic purposes.",
...
 
@@ -167,2 +170,3 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    children = models.CharField(
 
        verbose_name="Child Ages and Information",
 
        max_length=256,
...
 
@@ -219,2 +223,2 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
        names = wrap(self.name, 15, break_long_words=False)
 
        return names[1] if len(names) > 1 else ''
...
 
\ No newline at end of file
 
        return names[1] if len(names) > 1 else ''
pinaxcon/templates/registrasion/report.html
Show inline comments
...
 
@@ -26,2 +26,9 @@
 
<table class="table table-striped table-reportdata">
 
  <thead>
 
    <tr>
 
      {% for heading in report.headings %}
 
      <th>{{ heading }}</th>
 
      {% endfor %}
 
    </tr>
 
  </thead>
 
{% else %}
...
 
@@ -29,21 +36,12 @@
 
{% endif %}
 
    <thead>
 
        <tr>
 
            {% for heading in report.headings %}
 
            <th>{{ heading }}</th>
 
            {% endfor %}
 
        </tr>
 
    </thead>
 
    <tbody>
 
        {% for line in report.rows %}
 
        <tr>
 
            {% for item in line %}
 
            <td>
 
                {{ item|safe }}
 
            </td>
 
            {% endfor %}
 
        </tr>
 
        {% endfor %}
 
    </tbody>
 
    </table>
 
  <tbody>
 
    {% for line in report.rows %}
 
    <tr>
 
      {% for item in line %}
 
      <td>{{ item|safe }}</td>
 
      {% endfor %}
 
    </tr>
 
    {% endfor %}
 
  </tbody>
 
</table>
 

	
vendor/registrasion/registrasion/reporting/views.py
Show inline comments
...
 
@@ -600,2 +600,4 @@ def attendee(request, form, user_id=None):
 

	
 
    profile_data.insert(1, ("Email", attendee.user.email))
 

	
 
    cart = CartController.for_user(attendee.user)
...
 
@@ -608,3 +610,5 @@ def attendee(request, form, user_id=None):
 

	
 
    reports.append(ListReport("Profile", ["", ""], profile_data))
 
    # No column headings, as this has row headings instead and sorting makes
 
    # everything confusing.
 
    reports.append(ListReport("Profile", None, profile_data))
 

	
...
 
@@ -889,3 +893,3 @@ def attendee_data(request, form, user_id=None):
 

	
 
    headings = ["User ID", "Name", "Email", "Product", "Item Status"]
 
    headings = ["User ID", "Name", "Email", "Product", "Quantity", "Item Status"]
 
    headings.extend(field_names)
...
 
@@ -899,2 +903,3 @@ def attendee_data(request, form, user_id=None):
 
            item.product,
 
            item.quantity,
 
            status_display[item.cart.status],
0 comments (0 inline, 0 general)