generalbots/bottemplates/crm/attendance.gbai/attendance.gbdialog/view-queue.bas
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00

43 lines
1.1 KiB
QBasic

PARAM status AS STRING LIKE "waiting" DESCRIPTION "Filtrar por status: waiting, active, all" OPTIONAL
DESCRIPTION "Ver a fila de atendimento: quem está aguardando, há quanto tempo, e por qual canal."
IF NOT status THEN
status = "waiting"
END IF
queue = GET "/api/attendance/queue?status=" + status
item_count = UBOUND(queue)
IF item_count = 0 THEN
TALK "✅ Fila vazia! Nenhum cliente aguardando."
RETURN
END IF
TALK "📋 **Fila de Atendimento — " + item_count + " cliente(s)**"
TALK ""
FOR EACH item IN queue
channel_icon = "💬"
IF item.channel = "whatsapp" THEN
channel_icon = "📱"
ELSE IF item.channel = "telegram" THEN
channel_icon = "✈️"
ELSE IF item.channel = "email" THEN
channel_icon = "📧"
END IF
TALK "---"
TALK channel_icon + " **" + item.user_name + "** via " + item.channel
TALK "⏱️ Aguardando há " + item.wait_time
TALK "💬 Última mensagem: " + item.last_message
IF item.assigned_to THEN
TALK "👤 Atendente: " + item.assigned_to
END IF
TALK "🔗 Session: " + item.session_id
NEXT item
RETURN queue