bonamin 3da316ef9b feat(connect): Phase 5 — stats snapshot push to cloud
Adds _push_stats_snapshot() to cloud_sync.py. Every 5 minutes
(piggybacked on the existing _connect_loop push tick alongside the
menu snapshot) it queries the local DB and POSTs a JSON stats blob
to POST /api/remote/snapshot (site API key auth).

Stats collected:
  - open_tables: count of open/partially_paid POS orders
  - today_revenue: sum of active+paid item prices on orders
    closed today
  - today_orders: count of paid/closed POS orders today
  - online_orders_pending: online orders awaiting acceptance
  - online_orders_today: all online orders opened today
  - current_shift: active waiter shift info (waiter_id, started_at)
    if a business day is open; null otherwise
  - as_of: UTC timestamp of the snapshot

The remote manager dashboard reads this via
GET /api/remote/sites/{id}/snapshot (manager JWT).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 00:17:28 +03:00
Description
No description provided
Readme 1.6 MiB
Languages
JavaScript 75.1%
Python 23.5%
CSS 0.9%
Shell 0.4%