- 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>
51 lines
2.1 KiB
HTML
51 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Asistent — {{ owner.tenant.name }}{% endblock %}
|
||
{% block nav %}{% include "dashboard/_nav.html" %}{% endblock %}
|
||
{% block content %}
|
||
<h1>Virtuelni asistent</h1>
|
||
|
||
<form method="post" action="/dash/agent">
|
||
<div class="grid2">
|
||
<div class="card">
|
||
<h2>Glas i cijene</h2>
|
||
<label>Glas asistenta</label>
|
||
<select name="tts_voice">
|
||
{% for v in voices %}
|
||
<option value="{{ v.id }}" {{ 'selected' if t.tts_voice==v.id }}>{{ v.label }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
<label>Kako asistent odgovara na pitanja o cijenama</label>
|
||
<select name="price_mode">
|
||
<option value="exact" {{ 'selected' if t.price_mode=='exact' }}>Kaže tačnu cijenu</option>
|
||
<option value="range" {{ 'selected' if t.price_mode=='range' }}>Kaže raspon (od–do)</option>
|
||
<option value="on_request" {{ 'selected' if t.price_mode=='on_request' }}>„Cijene na upit"</option>
|
||
</select>
|
||
</div>
|
||
<div class="card">
|
||
<h2>Napomene za asistenta</h2>
|
||
<p class="muted">Činjenice o salonu koje asistent smije reći klijentima
|
||
(npr. „parking iza zgrade", „ne primamo djecu ispod 7 godina").</p>
|
||
<textarea name="agent_notes" style="min-height:120px">{{ t.agent_notes }}</textarea>
|
||
</div>
|
||
</div>
|
||
<button>Sačuvaj</button>
|
||
</form>
|
||
|
||
<div class="card" style="margin-top:20px">
|
||
<h2>Chat widget za vašu web stranicu</h2>
|
||
<p class="muted">Zalijepite ovaj red koda pred kraj <code><body></code> taga vaše
|
||
stranice (ili ga pošaljite onome ko vam održava web):</p>
|
||
<pre><script src="{{ base_url }}/widget.js" data-gogo-key="{{ t.widget_public_key }}" async></script></pre>
|
||
<p class="muted">Isprobajte razgovor na <a href="/widget-demo/{{ t.widget_public_key }}" target="_blank">demo stranici</a>.</p>
|
||
</div>
|
||
|
||
<div class="card">
|
||
<h2>Pozdravna poruka</h2>
|
||
<p class="muted">Pozdrav i ponašanje asistenta održava Gogo tim centralno — uvijek uključuje
|
||
obavještenje o snimanju razgovora. Trenutni pozdrav:</p>
|
||
<blockquote style="border-left:3px solid var(--brand);margin:8px 0;padding:4px 14px;color:var(--muted)">
|
||
{{ greeting }}
|
||
</blockquote>
|
||
</div>
|
||
{% endblock %}
|