{% extends "base.html" %} {% import 'components/macros.html' as ui %} {% block title %}Admin Dashboard{% endblock %} {% block head_extra %} {% endblock %} {% block content %}

{{ brand_name }} Sales - Admin

Logout
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% endwith %}

Workflow Automation Command Center

Coordinate recurring work, reorder drafts, approvals, reports, recovery, and branch-aware automation from one operational control surface.

Automation Command {{ ui.button('Workflow Rules', '/workflows') }} {{ ui.button('Reorder Drafts', '/restock') }} {{ ui.button('Scheduled Exports', '/reports/exports') }} {{ ui.button('Operations Mode', '/operations-mode') }} {{ ui.button('Offline Continuity', '/offline-continuity') }}
{% if is_server_owner %}

Verification Route Controls

Server-owner switches for the verification paths. They are deactivated by default.

{% for route in verification_routes %}
{{ route.label }} {{ 'Active' if route.enabled else 'Deactivated' }}

{{ route.description }}

{% endfor %}

Email uses SMTP settings; SMS uses Africa's Talking. Configure global verification credentials in Server Verification Controls.

{% endif %} {% if is_server_owner %}

Self-Healing Data Agent

{% if self_healing_health %} {% set health_color = '#4ade80' if self_healing_health.status == 'healed' else ('#fbbf24' if self_healing_health.status in ['restore_required', 'no_checkpoint'] else '#94a3b8') %}

Status: {{ self_healing_health.status|replace('_', ' ')|title }}

Last check: {{ self_healing_health.checked_at }}. The agent saves full database backups and data-vault snapshots, restores missing data automatically, and keeps sold-product stock deductions when the latest post-sale checkpoint is valid.

{% if self_healing_health.guidance %}
    {% for item in self_healing_health.guidance %}
  • {{ item }}
  • {% endfor %}
{% endif %} {% else %}

The agent is preparing its first health report. Create a backup after confirming your current inventory and sales.

{% endif %} {% if self_healing_notifications %}

Recent Agent Notices

{% for notice in self_healing_notifications %}
{{ notice.title }}

{{ notice.message }}

{% if notice.guidance %}
{{ notice.guidance }}
{% endif %}
{% endfor %} {% endif %} {% if ai_product_memory %}

AI Product Memory

Last saved: {{ ai_product_memory.updated_at }}. The agent remembers {{ ai_product_memory.analysis.product_count }} product/service record(s), {{ ai_product_memory.analysis.customer_count }} customer record(s), and checks what is working or lagging.

{% if ai_product_memory.analysis.challenges %}
    {% for item in ai_product_memory.analysis.challenges[:4] %}
  • {{ item }}
  • {% endfor %}
{% endif %} {% endif %}
{% endif %} {% if is_server_owner %}

Admin Control Center

{{ ui.button('Inventory', '/inventory') }} {{ ui.button('POS', '/sales') }} {{ ui.button('Users & Cashiers', '/cashiers') }} {{ ui.button('Add Admin', '/register-admin') }} {{ ui.button('Branches', '/admin/branches') }} {{ ui.button('Enterprise Branches', '/enterprise/branches') }} {{ ui.button('POS Acceleration', '/pos-acceleration') }} {{ ui.button('Governance Command', '/organizational-governance') }} {{ ui.button('Memory Intelligence', '/operational-memory') }} {{ ui.button('Enterprise Experience', '/enterprise-experience') }} {{ ui.button('Payment Methods', '/payment-methods') }} {{ ui.button('App Usage Payment', '/admin/app-billing/pay') }} {{ ui.button('Receipt Delivery APIs', '/admin/receipt-delivery') }} {{ ui.button('Support Center', '/support') }} {{ ui.button('Alerts', '/alerts') }} {{ ui.button('Analytics', '/analytics') }} {{ ui.button('Branch Analytics', '/analytics/branches') }} {{ ui.button('AI Help', '/ai-help') }} {{ ui.button('AI CSV Agent', '/ai-csv-agent') }} {{ ui.button('Barcode Hub', '/barcode') }} {{ ui.button('Scan Intelligence', '/barcode/intelligence') }} {{ ui.button('Training Mode', '/barcode/training') }} {% if is_server_owner %} {{ ui.button('Operations Center', '/operations-center', 'secondary') }} {{ ui.button('Onboarding', '/onboarding', 'secondary') }} {{ ui.button('Trust Checks', '/trust', 'secondary') }} {{ ui.button('Business Insights', '/business-retention', 'secondary') }} {{ ui.button('Business Activity', '/business-activity', 'secondary') }} {{ ui.button('Customer Success', '/customer-success', 'secondary') }} {{ ui.button('Playbooks', '/playbooks', 'secondary') }} {{ ui.button('Feedback Loop', '/product-feedback', 'secondary') }} {{ ui.button('Retention Engine', '/retention-engine', 'secondary') }} {{ ui.button('Growth', '/growth', 'secondary') }} {{ ui.button('Automation Command', '/automation', 'secondary') }} {{ ui.button('Procurement', '/procurement', 'secondary') }} {{ ui.button('Customer Intelligence', '/customer-intelligence', 'secondary') }} {{ ui.button('Workflows', '/workflows', 'secondary') }} {{ ui.button('Governance Command', '/organizational-governance', 'secondary') }} {{ ui.button('Operational Memory', '/operational-memory', 'secondary') }} {{ ui.button('Experience Center', '/enterprise-experience', 'secondary') }} {{ ui.button('AI Dashboard', '/ai', 'secondary') }} {{ ui.button('AI Recommendations', '/recommendations', 'secondary') }} {{ ui.button('Backup Center', '/backup', 'secondary') }}
{{ ui.button('Cloud & Updates', '/cloud', 'secondary') }} {{ ui.button('Real-World Mode', '/operations-mode', 'secondary') }} {{ ui.button('Reliability', '/reliability', 'secondary') }} {{ ui.button('System Trust', '/system-trust', 'secondary') }} {{ ui.button('Commercial Billing', '/commercial-billing', 'secondary') }} {{ ui.button('System Operations', '/admin/system-operations', 'secondary') }} {{ ui.button('Platform Trust', '/platform-trust', 'secondary') }} {{ ui.button('Data Governance', '/data-governance', 'secondary') }} {{ ui.button('Org Governance', '/organizational-governance', 'secondary') }} {{ ui.button('Business Memory', '/operational-memory', 'secondary') }} {{ ui.button('Trust Indicators', '/enterprise-experience', 'secondary') }} {{ ui.button('Security Maturity', '/security-maturity', 'secondary') }} {{ ui.button('Cost Control', '/cost-management', 'secondary') }} {{ ui.button('Feature Focus', '/focus-engine', 'secondary') }} {{ ui.button('Deployment Helper', '/devops-assistant', 'secondary') }} {{ ui.button('Check Updates', '/cloud/updates', 'secondary') }} {{ ui.button('Documentation', '/documentation', 'secondary') }} {{ ui.button('Refresh Docs', '/documentation?refresh=1', 'secondary') }} {{ ui.button('Gvelo DOC', '/gvelo-doc', 'secondary') }} {{ ui.button('Official IP Archive', '/admin/agents/official-ip-archive', 'secondary') }}
Readiness Check Health Check {{ ui.button('User Reports', '/admin/user-reports', 'secondary') }} {{ ui.button('Server Dashboard', '/server/dashboard', 'secondary') }} {{ ui.button('Registered Shops', '/server/shops', 'secondary') }} {{ ui.button('Shop Registry', '/admin/shops', 'secondary') }} {{ ui.button('Maintainability', '/maintainability', 'secondary') }} {{ ui.button('Scaling Discipline', '/scaling', 'secondary') }} {{ ui.button('Incident Center', '/observability', 'secondary') }} {{ ui.button('Incident Diagnostics', '/observability', 'secondary') }} {% if is_server_owner %} {{ ui.button('Billing & Pricing', '/admin/app-billing', 'secondary') }} {% endif %} {{ ui.button('Plugin Manager', '/admin/plugins', 'secondary') }} {{ ui.button('Company Ops', '/company-operations', 'secondary') }} {{ ui.button('Company Metrics', '/company-metrics', 'secondary') }} {{ ui.button('Product Analytics', '/product-analytics', 'secondary') }} {{ ui.button('Product Intelligence', '/product-intelligence', 'secondary') }} {{ ui.button('Market Validation', '/market-validation', 'secondary') }} {{ ui.button('Pilot Monitor', '/pilot-program', 'secondary') }} {{ ui.button('Experience Center', '/experience', 'secondary') }} {{ ui.button('Demo QR Gateway', '/demo/qr?campaign=admin-dashboard', 'secondary') }} {{ ui.button('Demo AI Agent', '/demo/agent', 'secondary') }} {{ ui.button('Demo Intelligence Ecosystem', '/demo-ai/', 'secondary') }} {{ ui.button('Demo System', '/demo-system', 'secondary') }} {{ ui.button('Growth Engine', '/growth-engine', 'secondary') }} {{ ui.button('Distribution', '/distribution', 'secondary') }} {{ ui.button('Deployment Discipline', '/deployment-discipline', 'secondary') }} {{ ui.button('Deployment Trust', '/deployment-trust', 'secondary') }} {{ ui.button('Trust Engine', '/trust-engine', 'secondary') }} {{ ui.button('Internal Ops', '/internal-operations', 'secondary') }} {{ ui.button('Operations Runbooks', '/operations-runbooks', 'secondary') }} {% endif %}
{% endif %}

๐Ÿ“Š Sales Overview

Total Sales
{{ formatted_sales }}
Products
{{ products }}
Low Stock (โ‰ค5)
{{ low_stock }}
Out of Stock
{{ out_of_stock }}
Customers
{{ customers }}
Net Profit
{{ formatted_profit }}

๐Ÿš€ Performance

Today's Sales
{{ daily.count }}
Today's Revenue
{{ formatted_daily_amount }}
Weekly Sales
{{ weekly.count }}
Weekly Revenue
{{ formatted_weekly_amount }}
{% if app_billing_summary %}

๐Ÿ’ณ App Subscription

{% if app_billing_summary.is_billing_exempt %}

App usage payments paused.

The server owner has paused app usage billing for this shop. Sales will not be blocked by app subscription payment checks.

{% elif app_billing_summary.has_subscription %}

Subscription saved.

Payment details are saved for due-date billing. Next billing date: {{ app_billing_summary.next_billing_date }}.

{{ ui.button('Manage Payment Details', '/admin/app-billing/pay') }} {% elif app_billing_summary.is_free_trial %}

First month is free. Subscribe before {{ app_billing_summary.billing_starts_at.strftime('%Y-%m-%d') if app_billing_summary.billing_starts_at else app_billing_summary.next_billing_date }} so selling continues smoothly after the trial.

Trial Days Left
{{ app_billing_summary.trial_days_left }}
Monthly Price
{{ formatted_regular_amount }}
{{ ui.button('Subscribe Before Due Date', '/admin/app-billing/pay') }} {{ ui.button('Enter Payment Details', '/admin/app-billing/pay', 'secondary') }} {% else %}

App usage payment is due.

Amount due: {{ formatted_amount_due }}.

{{ ui.button('Pay Or Subscribe', '/admin/app-billing/pay') }} {% endif %}
{% endif %} {% if recent_sales %}

๐Ÿ“… Recent Sales (Last 7 Days)

{% for sale in recent_sales %} {% endfor %}
Date Transactions Amount
{{ sale.date }} {{ sale.count }} {{ currency_symbol }}{{ "{:,.2f}".format(sale.amount|float) }}
{% endif %}

๐Ÿ‘ค Add Cashier

Add new cashiers to manage sales on the POS system.

๐Ÿท๏ธ Business Name

Update your business name shown across receipts and login screen.

๐Ÿงพ Cashier Dashboard Controls

{% if cashiers %} {% for cashier in cashiers %} {% endfor %}
NameUsernameEmailPhoneAction
{{ cashier[1] }} {{ cashier[2] }} {{ cashier[3] }} {{ cashier[4] }}
{% else %}

No cashiers available.

{% endif %}

๐Ÿ“ข Cashier Announcement

Send an update message to all cashiers. It appears in their Updates / Entertainment panel.

{% if is_server_owner %}

๐ŸŽฌ Server Tutorial Publisher

Post tutorial videos that go directly to admins or cashiers after updates.

Active videos: Admin {{ tutorial_counts.get('admin', 0) }}, Cashier {{ tutorial_counts.get('cashier', 0) }}.

{% endif %}

๐Ÿ—‘๏ธ Sales Cleanup

Archive or delete old sales records to optimize database performance.

โš ๏ธ Deleted records cannot be recovered. Archive important data before cleanup.

New fraud alert detected. Open Alerts now.
{% endblock %}