{% extends "base.html" %} {% block title %}Mobile Phones - Queensway Europe Telco Portal{% endblock %} {% block content %}

{% include "icons/phone.svg" %} Mobile Phones Orange

{% if session.role == 'admin' %} {% endif %}
{% include "icons/collection.svg" %}
{{ stats.total }}
Total Phones
{% include "icons/exclamation-triangle.svg" %}
{{ stats.expiring_soon }}
Expiring Soon
{% include "icons/calendar-x.svg" %}
{{ stats.expired }}
Expired
{% include "icons/calendar-check.svg" %}
{{ stats.eligible_now }}
Eligible Now
{% include "icons/building.svg" %}
{{ stats.headoffice }}
QWE Headoffice · {{ stats.headoffice_pct }}%
{% include "icons/shop.svg" %}
{{ stats.restaurant }}
KFC Restaurant · {{ stats.restaurant_pct }}%
{% include "icons/patch-check.svg" %}
{{ stats.verified }}
Verified
{% include "icons/patch-exclamation.svg" %}
{{ stats.not_verified }}
Not Verified
{% macro sort_link(field, label) -%} {% set next_dir = 'desc' if sort == field and direction == 'asc' else 'asc' %} {%- endmacro %} {{ sort_link('phone_number', 'Phone Number') }} {{ sort_link('current_owner', 'Current Owner') }} {{ sort_link('plan', 'Plan') }} {{ sort_link('contract_expiration', 'Contract Expiration') }} {{ sort_link('eligible_for_replacement', 'Eligibility for Replacement') }} {{ sort_link('venue', 'Venue') }} {{ sort_link('verified', 'Verified') }} {{ sort_link('comment', 'Comment') }} {% if session.role == 'admin' %}{% endif %} {% for p in phones %} {% if session.role == 'admin' %} {% endif %} {% else %} {% endfor %}
{{ label }} {% if sort == field %} {{ '▲' if direction == 'asc' else '▼' }} {% else %} ↕ {% endif %} Actions
{{ p.phone_number }} {{ p.current_owner or "" }} {{ p.plan or "" }} {% if p.contract_expiration %} {% if p.contract_expiration < today %} Expired {% elif (p.contract_expiration - today).days <= 60 %} Expiring soon {% endif %} {{ p.contract_expiration.strftime("%d-%m-%Y") }} {% endif %} {% if not p.eligible_for_replacement or p.eligible_for_replacement <= today %} Eligible now {% else %} From {{ p.eligible_for_replacement.strftime("%d-%m-%Y") }} {% endif %} {% if p.venue %}{{ p.venue }}{% endif %} {% if p.verified == "Yes" %} Yes {% elif p.verified == "No" %} No {% endif %} {{ p.comment or "" }}
No phones yet.
{% endblock %} {% block scripts %} {% endblock %}