diff --git a/api/src/chat/chat.service.ts b/api/src/chat/chat.service.ts index 437a9f3..6325c06 100644 --- a/api/src/chat/chat.service.ts +++ b/api/src/chat/chat.service.ts @@ -78,6 +78,7 @@ export class ChatService { } private databaseUrl() { - return this.config.get('FIREBASE_DATABASE_URL')?.replace(/\/$/, '') ?? ''; + const configured = this.config.get('FIREBASE_DATABASE_URL')?.replace(/\/$/, '') ?? ''; + return configured || 'https://sinka-8ec10-default-rtdb.firebaseio.com'; } } diff --git a/docker-compose.yml b/docker-compose.yml index b060e62..efd67d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,7 @@ services: MYSQL_ADMIN_URL: mysql://root:${MYSQL_ROOT_PASSWORD:-root}@mysql:3306 REDIS_URL: redis://redis:6379 UPLOAD_DIR: /data/uploads + FIREBASE_DATABASE_URL: ${FIREBASE_DATABASE_URL:-https://sinka-8ec10-default-rtdb.firebaseio.com} volumes: - sinka_uploads:/data/uploads ports: diff --git a/web/src/components/restricted-shell.tsx b/web/src/components/restricted-shell.tsx index 9def6e3..7775b9a 100644 --- a/web/src/components/restricted-shell.tsx +++ b/web/src/components/restricted-shell.tsx @@ -66,7 +66,7 @@ export function RestrictedShell({ const links = kind === "platform" - ? [{ href: "/admin", label: "Empresas" }] + ? [{ href: "/admin", label: "Clientes" }] : [ { href: basePath, label: "Dashboard" }, { href: `${basePath}/simular`, label: "Simular" }, @@ -86,10 +86,30 @@ export function RestrictedShell({ return (
-
- - Sinka - +
+
+ + Sinka + + +

{user.name}

diff --git a/web/src/components/support-chat.tsx b/web/src/components/support-chat.tsx index 58a1ff8..43ad5e0 100644 --- a/web/src/components/support-chat.tsx +++ b/web/src/components/support-chat.tsx @@ -94,6 +94,11 @@ export function SupportChat({ return (

Chat

+ {user?.kind === "platform" ? ( + + Voltar para clientes + + ) : null}

{heading}

{error ?

{error}

: null}