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>
This commit is contained in:
26
gogo/templates/admin/usage.html
Normal file
26
gogo/templates/admin/usage.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Potrošnja — Gogo Admin{% endblock %}
|
||||
{% block nav %}{% include "admin/_nav.html" %}{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Potrošnja po salonima — {{ month }}</h1>
|
||||
<div class="card">
|
||||
<table>
|
||||
<tr><th>Salon</th><th>Minute asistenta</th><th>Pozivi</th><th>SMS</th><th>Chat</th>
|
||||
<th>Zahtjevi (mj)</th><th>Procj. trošak (LLM+TTS)</th></tr>
|
||||
{% for r in rows %}
|
||||
<tr>
|
||||
<td><b>{{ r.tenant.name }}</b></td>
|
||||
<td>{{ r.used_minutes }}/{{ r.tenant.included_minutes }}
|
||||
{% if r.over_100 %}<span class="badge rejected">100%+</span>
|
||||
{% elif r.over_80 %}<span class="badge pending">80%+</span>{% endif %}</td>
|
||||
<td>{{ r.calls }}</td>
|
||||
<td>{{ r.sms }}</td>
|
||||
<td>{{ r.chats }}</td>
|
||||
<td>{{ r.requests }}</td>
|
||||
<td>~{{ r.est_cost_km }} KM</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<p class="muted">Procjena troška: {{ cost_note }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user