From 106ed50361325c8d0507f2777c984fb5efa326a0 Mon Sep 17 00:00:00 2001 From: idrainformatica Date: Thu, 19 Mar 2026 17:12:39 +0100 Subject: [PATCH] Fix frontend --- KnowledgeBaseCline.md | 20 +++++++++---------- backend/app/notifications/telegram.py | 4 ++-- .../tests/integration/test_telegram_real.py | 14 ++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/KnowledgeBaseCline.md b/KnowledgeBaseCline.md index ebe5b10..86d6fc8 100644 --- a/KnowledgeBaseCline.md +++ b/KnowledgeBaseCline.md @@ -10,13 +10,13 @@ Non effettuare test da Browser, ci penso io Questi i container: -pecflow-worker-1 -pecflow-frontend-1 -pecflow-backend-1 -pecflow-nginx-1 -pecflow-db-1 -pecflow-redis-1 -pecflow-minio-1 +pechub-worker-1 +pechub-frontend-1 +pechub-backend-1 +pechub-nginx-1 +pechub-db-1 +pechub-redis-1 +pechub-minio-1 Queste le caselle PEC e i loro parametri IMAP/SMTP che puoi usare per test, non effettuare invii per adesso @@ -36,7 +36,7 @@ Tutto il frontend deve essere in italiano Credenziali admin Ruolo Email Password -Super Admin superadmin@pecflow.it SuperAdmin@PecFlow2026! -Admin (tenant demo) admin@demo.pecflow.it Demo@PecFlow2026! -Operator (tenant demo) operator@demo.pecflow.it Oper@PecFlow2026! +Super Admin superadmin@pechub.it SuperAdmin@PEChub2026! +Admin (tenant demo) admin@demo.pechub.it Demo@PEChub2026! +Operator (tenant demo) operator@demo.pechub.it Oper@PEChub2026! Per accedere all'applicazione usa le credenziali Admin del tenant demo. \ No newline at end of file diff --git a/backend/app/notifications/telegram.py b/backend/app/notifications/telegram.py index 0718368..6d5b507 100644 --- a/backend/app/notifications/telegram.py +++ b/backend/app/notifications/telegram.py @@ -94,7 +94,7 @@ async def send_message( async def send_test_message( bot_token: str, chat_id: str, - channel_name: str = "PecFlow", + channel_name: str = "PEChub", ) -> dict: """ Invia un messaggio di test formattato al canale configurato. @@ -106,7 +106,7 @@ async def send_test_message( ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S") text = ( - f"✅ PecFlow – Test canale Telegram\n\n" + f"✅ PEChub – Test canale Telegram\n\n" f"Il canale {channel_name} è configurato correttamente.\n\n" f"🕐 {ts}" ) diff --git a/backend/tests/integration/test_telegram_real.py b/backend/tests/integration/test_telegram_real.py index 86d4fc6..626df8c 100644 --- a/backend/tests/integration/test_telegram_real.py +++ b/backend/tests/integration/test_telegram_real.py @@ -10,12 +10,12 @@ Testa: 4. Test via NotificationService.test_channel (flusso completo) Eseguire DENTRO il container backend: - docker exec pecflow-backend-1 python \ + docker exec pechub-backend-1 python \ /app/tests/integration/test_telegram_real.py Oppure specificando credenziali manuali via env: docker exec -e TELEGRAM_BOT_TOKEN=xxx -e TELEGRAM_CHAT_ID=-100yyy \ - pecflow-backend-1 python /app/tests/integration/test_telegram_real.py + pechub-backend-1 python /app/tests/integration/test_telegram_real.py """ import asyncio @@ -28,7 +28,7 @@ from datetime import datetime # ─── Variabili d'ambiente ───────────────────────────────────────────────────── os.environ.setdefault("ENCRYPTION_KEY", "6465762d656e6372797074696f6e2d6b65792d6e6f742d666f722d70726f6400") os.environ.setdefault("SECRET_KEY", "dev-secret-key-not-for-production-use-only-for-local-0000000000000") -os.environ.setdefault("DATABASE_URL", "postgresql+asyncpg://pecflow:pecflow_dev_password@db:5432/pecflow") +os.environ.setdefault("DATABASE_URL", "postgresql+asyncpg://pechub:pechub_dev_password@db:5432/pechub") os.environ.setdefault("REDIS_URL", "redis://redis:6379/0") os.environ.setdefault("MINIO_ENDPOINT", "minio:9000") @@ -41,7 +41,7 @@ def _sep(char: str = "─", width: int = 60) -> None: def _banner(bot_token_masked: str, chat_id: str) -> None: _sep("═") - print(" PecFlow – Test Telegram Reale") + print(" PEChub – Test Telegram Reale") _sep("═") print(f" Timestamp : {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") print(f" Bot Token : {bot_token_masked}") @@ -145,7 +145,7 @@ async def test_direct_send(bot_token: str, chat_id: str) -> bool: ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S") text = ( - f"🧪 PecFlow – Test integrazione\n\n" + f"🧪 PEChub – Test integrazione\n\n" f"Test invio diretto via send_message()\n\n" f"🕐 {ts}" ) @@ -201,14 +201,14 @@ async def test_send_test_message(bot_token: str, chat_id: str) -> bool: from app.notifications.telegram import TelegramError, send_test_message - print(" Chiamata: send_test_message(channel_name='Test PecFlow')") + print(" Chiamata: send_test_message(channel_name='Test PEChub')") print() try: result = await send_test_message( bot_token=bot_token, chat_id=chat_id, - channel_name="Test PecFlow", + channel_name="Test PEChub", ) msg_id = result.get("message_id") print(f" ✅ INVIO OK – message_id={msg_id}")