diff --git a/auctions/models.py b/auctions/models.py index d8b4169..39b0266 100755 --- a/auctions/models.py +++ b/auctions/models.py @@ -1090,6 +1090,10 @@ def total_unsold_lots(self): def total_lots(self): return self.lots_qs.exclude(banned=True).count() + @property + def number_of_lots_with_scanned_qr(self): + return self.lots_qs.filter(pageview__source__icontains="qr", auction__pk=self.pk).distinct().count() + @property def labels_qs(self): lots = self.lots_qs.exclude(banned=True) @@ -1110,7 +1114,7 @@ def percent_unsold_lots(self): @property def template_lot_link(self): - """Not directly used in templates, use template_lot_link_first_column and template_lot_link_seperate_column instead""" + """Not directly used in templates, use template_lot_link_first_column and template_lot_link_separate_column instead""" if timezone.now() > self.lot_submission_start_date: result = f"View lots" else: @@ -1123,7 +1127,7 @@ def template_lot_link_first_column(self): return mark_safe(f'
{self.template_lot_link}
') @property - def template_lot_link_seperate_column(self): + def template_lot_link_separate_column(self): """Shown on big screens only""" return mark_safe(f'{self.template_lot_link}') @@ -2971,7 +2975,8 @@ def full_lot_link(self): @property def qr_code(self): """Full domain name URL used to for QR codes""" - return f"{self.full_lot_link}?src=qr" + current_site = Site.objects.get_current() + return f"https://{current_site.domain}{reverse('lot_by_pk_qr', kwargs={'pk': self.pk})}" @property def seller_string(self): diff --git a/auctions/tables.py b/auctions/tables.py index 7fe87f2..5c27c65 100644 --- a/auctions/tables.py +++ b/auctions/tables.py @@ -1,6 +1,5 @@ import django_tables2 as tables from django.urls import reverse -from django.utils import formats from django.utils.safestring import mark_safe from .models import Auction, AuctionTOS, Lot @@ -171,17 +170,17 @@ class AuctionHTMxTable(tables.Table): hide_string = "d-md-table-cell d-none" auction = tables.Column(accessor="title", verbose_name="Auction") - date = tables.Column(accessor="date_start", verbose_name="Status") + date = tables.Column(accessor="date_start", verbose_name="Starts") lots = tables.Column( - accessor="template_lot_link_seperate_column", + accessor="template_lot_link_separate_column", verbose_name="Lots", orderable=False, attrs={"th": {"class": hide_string}, "cell": {"class": hide_string}}, ) - def render_date(self, value, record): - localized_date = formats.date_format(record.template_date_timestamp, use_l10n=True) - return mark_safe(f"{record.template_status}{localized_date}{record.ended_badge}") + # def render_date(self, value, record): + # localized_date = formats.date_format(record.template_date_timestamp, use_l10n=True) + # return mark_safe(f"{record.template_status}{localized_date}{record.ended_badge}") def render_auction(self, value, record): auction = record diff --git a/auctions/templates/all_lots.html b/auctions/templates/all_lots.html index d7f4b0d..b6fc50e 100755 --- a/auctions/templates/all_lots.html +++ b/auctions/templates/all_lots.html @@ -54,7 +54,7 @@

{% endif %} {% if view == "mywonlots" %} Lots you've won -
Export CSV +
Export my won lots CSV {% endif %} {% endif %}

diff --git a/auctions/templates/auction_stats.html b/auctions/templates/auction_stats.html index 9964afe..1deeda0 100755 --- a/auctions/templates/auction_stats.html +++ b/auctions/templates/auction_stats.html @@ -232,6 +232,10 @@

User engagement

Seller payout${{ auction.total_to_sellers|floatformat:2 }} + + Lots with a scanned QR code{{ auction.number_of_lots_with_scanned_qr }} + + diff --git a/auctions/templates/auction_users.html b/auctions/templates/auction_users.html index fcdcf48..9d4e999 100755 --- a/auctions/templates/auction_users.html +++ b/auctions/templates/auction_users.html @@ -21,7 +21,10 @@ {% for chunk in auction.paypal_invoice_chunks %} PayPal Invoice CSV {% if auction.paypal_invoice_chunks|length > 1 %} #{{chunk}}{% endif %} {% endfor %} - {% if not auction.paypal_invoice_chunks|length %} No PayPal invoices{% endif %} + {% if not auction.paypal_invoice_chunks|length %} No PayPal invoices + {% else %} + Paypal Batch Invoice Upload + {% endif %} PayPal invoice help diff --git a/auctions/templates/auctions/auction_lot_admin.html b/auctions/templates/auctions/auction_lot_admin.html index ccdcac0..086bf64 100644 --- a/auctions/templates/auctions/auction_lot_admin.html +++ b/auctions/templates/auctions/auction_lot_admin.html @@ -8,7 +8,7 @@ {% include 'auction_ribbon.html' %} This is a list of items for sale in your auction. Click a lot name to edit it. {% if auction.is_online %}You probably don't need to use this page; users will add their own lots to this auction{% else %}To add new lots, go to the users page and click add lots under the appropriate user.{% endif %}
{% if not auction.is_online %} Set winners{% endif %} - Export CSV + Export lot CSV See user view
diff --git a/auctions/templates/auctions/dynamic_set_lot_winner.html b/auctions/templates/auctions/dynamic_set_lot_winner.html index 8fca205..ee32fc7 100755 --- a/auctions/templates/auctions/dynamic_set_lot_winner.html +++ b/auctions/templates/auctions/dynamic_set_lot_winner.html @@ -4,6 +4,37 @@ {% block extra_js %}