Files
gogo-telefon/gogo/templates/admin/tenants.html
Senad Uka 646917c322 M3: chat widget, owner dashboard, super-admin panel
- Embeddable vanilla-JS chat widget (one script tag + tenant public key):
  WebSocket, resumable sessions (24h localStorage token), honeypot + per-IP
  and per-message rate limits, Bosnian UI (§7)
- Session auth (bcrypt + signed cookies), owner accounts + super-admins,
  admin impersonation ('otvori kao salon', §11)
- Owner dashboard (§10, Bosnian): requests with same actions as email,
  call/chat history with transcripts, usage bar; settings for profile,
  working hours (manual + LLM paste-to-parse), services CRUD + 'Zalijepi
  cjenovnik' LLM import with review step, scheduling (Google OAuth free/busy
  read-only + calendar mappings + buffers, partner status), telephony
  (forwarding MMI codes per operator, ring group, worker SIP creds + QR),
  agent voice/price-mode/notes + widget snippet, notifications/SMS templates
- Super-admin panel (§11): tenant CRUD incl. plan/minutes/paid-until,
  partner API config (encrypted secrets), number/SIM registry + assignment,
  connectivity test (live availability + dry-run push), versioned prompt
  template editor with publish/rollback, playground, usage overview, health
- Fixes: WAL + busy_timeout for sqlite tests, no awaits in WS disconnect
  path (deadlock), template publish autoflush bug
- 76 tests green (incl. widget WS e2e booking flow); dashboard, widget and
  admin verified live in a browser against Postgres

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 10:51:57 +02:00

28 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block title %}Saloni — Gogo Admin{% endblock %}
{% block nav %}{% include "admin/_nav.html" %}{% endblock %}
{% block content %}
<h1>Saloni <a class="btn small" style="margin-left:12px" href="/admin/tenants/new">+ Novi salon</a></h1>
<div class="card">
<table>
<tr><th>Salon</th><th>Provajder</th><th>Broj</th><th>Plaćeno do</th><th>Minute (mj)</th><th>Status</th><th></th></tr>
{% for row in rows %}
<tr>
<td><b>{{ row.tenant.name }}</b><br><span class="muted">{{ row.tenant.city }} · {{ row.tenant.slug }}</span></td>
<td>{{ row.tenant.scheduling_provider }}</td>
<td>{{ row.msisdn or '—' }}</td>
<td>{{ row.tenant.paid_until.strftime('%d.%m.%Y.') if row.tenant.paid_until else '—' }}</td>
<td>{{ row.used_minutes }}/{{ row.tenant.included_minutes }}</td>
<td><span class="badge {{ 'confirmed' if row.tenant.status=='active' else 'rejected' }}">{{ row.tenant.status }}</span></td>
<td style="white-space:nowrap">
<a class="btn small ghost" href="/admin/tenants/{{ row.tenant.id }}">Uredi</a>
<form method="post" action="/admin/impersonate/{{ row.tenant.id }}" style="display:inline">
<button class="small">Otvori kao salon</button>
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}