{% extends "base.html" %} {% block title %}Reward validation · ZaleaHub{% endblock %} {% block content %}
ADMINISTRATION

Reward validation

Validate each 10-coffee milestone, approve the two free cups, and record the physical handover.

How reward processing works

The system checks the customer's saved redemption records against the QR code records. Approval is enabled only when at least the milestone's qualifying total has valid, redeemed QR records assigned to that customer.

After approval, the customer can show the reward to staff. Only after both free cups have been handed over should staff select Mark two cups as claimed. The system records who completed the handover and when.

Milestones

{% for item in items %}
{{ item.customer.name if item.customer else 'Customer unavailable' }} {{ item.customer.email if item.customer else '—' }} {{ item.milestone.qualifying_total }} coffees · Cycle {{ item.milestone.cycle_number }} · 2 free cups {{ item.milestone.status|title }}

Valid QR redemptions: {{ item.validation.valid_total }} · Total redemptions: {{ item.validation.total }} · Created: {{ item.milestone.created_at.strftime('%Y-%m-%d %H:%M UTC') }}

{% if item.milestone.status == 'pending' %} {% if item.validation.valid %}

Validation passed. This milestone is ready for admin approval.

{% else %}

Not ready: the required number of valid QR redemptions has not been confirmed.

{% endif %} {% elif item.milestone.status == 'approved' %}

Approved {{ item.milestone.approved_at.strftime('%Y-%m-%d %H:%M UTC') if item.milestone.approved_at else '' }}. Waiting for staff to hand over both free cups.

{% elif item.milestone.status == 'claimed' %}

Two cups claimed {{ item.milestone.claimed_at.strftime('%Y-%m-%d %H:%M UTC') if item.milestone.claimed_at else '' }} {% if item.claimant %}by {{ item.claimant.name }} ({{ item.claimant.email }}){% endif %}.

{% else %}

Status: {{ item.milestone.status }}.

{% endif %}
{% else %}

No loyalty milestones have been created yet. A milestone appears automatically after the customer's 10th, 20th, 30th, etc. successful QR redemption.

{% endfor %}
{% endblock %}