{% extends "base_authenticated.html" %} {% block title %}Dashboard - QR Code Management{% endblock %} {% block extra_head %} {% endblock %} {% block content %}

Welcome back, {{ session.full_name }}!

Manage your QR codes organized by projects

{% if session.role == 'admin' %}

{{ qr_codes|length }}

Total QR Codes

{{ qr_codes|selectattr('active_status', 'equalto', True)|list|length }}

Active QR Codes

{{ qr_codes|selectattr('active_status', 'equalto', False)|list|length }}

Inactive QR Codes

{{ projects|length if projects else 0 }}

Total Projects

{% endif %}
{% if projects %}
{% for project in projects %} {% set project_qr_codes = qr_codes|selectattr('project_id', 'equalto', project.id)|list %}

{{ project.name }}

{% if project.description %}

{{ project.description }}

{% endif %}
{{ project_qr_codes|length }} QR Code{{ 's' if project_qr_codes|length != 1 else '' }}
{{ 'Active' if project.active_status else 'Inactive' }}
{% if project_qr_codes %}
{% for qr in project_qr_codes %}
QR Code for {{ qr.name }}

{{ qr.name }}

{{ qr.location }}
{% if qr.location_address %}
{{ qr.location_address }}
{% endif %}
{{ get_qr_code_checkin_count(qr.id) }} check-ins
{% if qr.qr_url %}
{{ qr.qr_url }}
{% endif %} {{ 'Active' if qr.active_status else 'Inactive' }}
{% if session.role == 'admin' %} {% endif %}
{% endfor %}
{% else %}

No QR Codes in this Project

Create your first QR code for this project

Create QR Code
{% endif %}
{% endfor %}
{% endif %} {% set unassigned_qr_codes = qr_codes|selectattr('project_id', 'equalto', None)|list %} {% if unassigned_qr_codes %}

Unassigned QR Codes

{{ unassigned_qr_codes|length }} QR Code{{ 's' if unassigned_qr_codes|length != 1 else '' }}
{% for qr in unassigned_qr_codes %}
QR Code for {{ qr.name }}

{{ qr.name }}

{{ qr.location }}
{% if qr.location_address %}
{{ qr.location_address }}
{% endif %}
{{ get_qr_code_checkin_count(qr.id) }} check-ins
{% if qr.qr_url %}
{{ qr.qr_url[:50] }}{% if qr.qr_url|length > 50 %}...{% endif %}
{% endif %}
{{ 'Active' if qr.active_status else 'Inactive' }}
{% if session.role == 'admin' %} {% endif %}
{% endfor %}
{% endif %} {% if not projects and not qr_codes %}

Welcome to Your QR Code Dashboard

Get started by creating your first project and QR codes to organize your digital assets effectively.

{% if session.role == 'admin' %} Create Project {% endif %} Create QR Code
{% endif %}
{% endblock %} {% block extra_scripts %} {% endblock %}