From 11b29b45e377851af95d44825e0d28700700166a Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Fri, 7 Aug 2026 13:45:23 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20negodata=C2=B7frontend=C2=B7backend:=20?= =?UTF-8?q?=ED=9A=8C=EC=82=AC=EB=B3=84=20=EB=B8=8C=EB=9E=9C=EB=93=9C=20?= =?UTF-8?q?=EC=83=89(primary=5Fcolor)=20=EA=B8=B0=EB=8A=A5=20=EC=A0=84?= =?UTF-8?q?=EB=A9=B4=20=EC=A0=9C=EA=B1=B0=20=E2=80=94=20=ED=8E=B8=EC=A7=91?= =?UTF-8?q?=20UI=20=EC=97=86=EC=9D=B4=20=EA=B0=92=EB=A7=8C=20=EB=82=A8?= =?UTF-8?q?=EC=95=84=20=EC=A0=81=EC=9A=A9=EB=90=98=EB=8D=98=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84=20=EC=A0=95=EB=A6=AC(=ED=8F=AC=ED=84=B8=C2=B7?= =?UTF-8?q?=EB=A9=94=EC=9D=BC=C2=B7=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B0=94=20?= =?UTF-8?q?=EC=83=89=20=EC=86=94=EB=A3=A8=EC=85=98=20=EA=B3=A0=EC=A0=95,?= =?UTF-8?q?=20=EC=8B=9C=EB=93=9C=C2=B7=EC=9D=91=EB=8B=B5=20=ED=95=84?= =?UTF-8?q?=EB=93=9C=20=EC=A0=9C=EA=B1=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/router/v1/auth/protocol.py | 1 - backend/services/auth_service.py | 1 - frontend/src/apis/auth/auth.type.ts | 2 -- .../auth/hooks/usePreLoginBranding.ts | 3 +- frontend/src/layouts/MainLayout.tsx | 5 ++-- frontend/src/lib/index.ts | 1 - frontend/src/lib/useBrandColor.ts | 29 ------------------- frontend/src/pages/LoginPage.tsx | 4 +-- negodata/backend/services/email.py | 14 ++------- .../tests/test_invite_email_preview.py | 12 ++++---- .../front/src/components/layout/Layout.tsx | 6 +--- .../src/features/settings/SettingsView.tsx | 10 ++----- .../front/src/features/settings/catalog.ts | 3 +- .../features/settings/useCompanySettings.ts | 3 +- scripts/imk-company-settings.json | 3 +- 15 files changed, 19 insertions(+), 78 deletions(-) delete mode 100644 frontend/src/lib/useBrandColor.ts diff --git a/backend/router/v1/auth/protocol.py b/backend/router/v1/auth/protocol.py index a4d3d21..74bd60a 100644 --- a/backend/router/v1/auth/protocol.py +++ b/backend/router/v1/auth/protocol.py @@ -72,5 +72,4 @@ class Res_HidePopup(Res_WebPacketProtocol): class Res_SessionBranding(Res_WebPacketProtocol): service_name: str = Field("", description="회사 서비스명(companies.settings.branding.service_name). 미설정 시 빈 값") logo_url: str = Field("", description="회사 로고 URL") - primary_color: str = Field("", description="브랜드 색상(hex)") helpdesk: list = Field(default_factory=list, description="헬프데스크 연락처 줄 목록(companies.settings.branding.helpdesk). 한 줄 = 담당자 한 명") diff --git a/backend/services/auth_service.py b/backend/services/auth_service.py index 4862af8..12d874e 100644 --- a/backend/services/auth_service.py +++ b/backend/services/auth_service.py @@ -279,7 +279,6 @@ class AuthService: branding = branding or {} res.service_name = branding.get("service_name") or "" res.logo_url = branding.get("logo_url") or "" - res.primary_color = branding.get("primary_color") or "" res.helpdesk = branding.get("helpdesk") or [] return res diff --git a/frontend/src/apis/auth/auth.type.ts b/frontend/src/apis/auth/auth.type.ts index 1654294..ec40986 100644 --- a/frontend/src/apis/auth/auth.type.ts +++ b/frontend/src/apis/auth/auth.type.ts @@ -57,7 +57,6 @@ export interface RefreshTokenResponse { export interface Branding { service_name?: string logo_url?: string - primary_color?: string helpdesk?: string[] // 헬프데스크 연락처 — 한 줄 = 담당자 한 명. 비면 연락처 영역을 렌더하지 않는다 } @@ -66,7 +65,6 @@ export interface SessionBrandingResponse { result: ApiResult service_name: string logo_url: string - primary_color: string helpdesk?: string[] } diff --git a/frontend/src/features/auth/hooks/usePreLoginBranding.ts b/frontend/src/features/auth/hooks/usePreLoginBranding.ts index 932735a..aa1c16b 100644 --- a/frontend/src/features/auth/hooks/usePreLoginBranding.ts +++ b/frontend/src/features/auth/hooks/usePreLoginBranding.ts @@ -43,10 +43,9 @@ export function usePreLoginBranding(): Branding | null { const next: Branding = { service_name: res.service_name || undefined, logo_url: res.logo_url || undefined, - primary_color: res.primary_color || undefined, helpdesk: res.helpdesk?.length ? res.helpdesk : undefined, } - if (!next.service_name && !next.logo_url && !next.primary_color && !next.helpdesk) return + if (!next.service_name && !next.logo_url && !next.helpdesk) return setBranding(next) writeCached(next) // 다음 진입에 session_id 가 없어도 이 회사로 보이게 한다 }) diff --git a/frontend/src/layouts/MainLayout.tsx b/frontend/src/layouts/MainLayout.tsx index 4809727..68097a4 100644 --- a/frontend/src/layouts/MainLayout.tsx +++ b/frontend/src/layouts/MainLayout.tsx @@ -1,7 +1,7 @@ import { type ReactNode } from 'react' import { Logo } from '@/components' import { useMeQuery } from '@/apis' -import { cn, useBrandColor } from '@/lib' +import { cn } from '@/lib' // 좌측 폭: list=반응형 비율 / chat=고정폭 단계 축소 const SIDEBAR_WIDTH = { @@ -44,8 +44,7 @@ export function MainLayout({ header, children, }: MainLayoutProps) { - const { data: user } = useMeQuery() // 회사 브랜딩(서비스명/로고/브랜드 색) 주입 - useBrandColor(user?.branding?.primary_color) + const { data: user } = useMeQuery() // 회사 브랜딩(서비스명/로고) 주입 — 색은 솔루션 고정 const panes = ( <>