[feat] negodata: IMK 요청 일괄 반영 — 조회 게이팅·카드 매칭·부가세 통일 모드·기준가 이원 표기·마스킹 해제·이미지 일괄 업로드·초청메일 브랜딩·반응형 정리

This commit is contained in:
minaChoi committed 2026-08-07 11:57:06 +09:00
1 parent 1e966f7121
commit 4ed23c56b8
63 files changed
+2203 -473

No files matched your search

-1
View File
@@ -58,7 +58,6 @@ export interface Branding {
service_name?: string
logo_url?: string
primary_color?: string
email_header?: string
helpdesk?: string[] // 헬프데스크 연락처 — 한 줄 = 담당자 한 명. 비면 연락처 영역을 렌더하지 않는다
}
@@ -46,7 +46,7 @@ export function usePreLoginBranding(): Branding | null {
primary_color: res.primary_color || undefined,
helpdesk: res.helpdesk?.length ? res.helpdesk : undefined,
}
if (!next.service_name && !next.logo_url && !next.helpdesk) return
if (!next.service_name && !next.logo_url && !next.primary_color && !next.helpdesk) return
setBranding(next)
writeCached(next) // 다음 진입에 session_id 가 없어도 이 회사로 보이게 한다
})
@@ -110,7 +110,8 @@ function ItemInfo() {
<div className="flex flex-1 items-start self-stretch overflow-y-auto overflow-x-hidden px-6 min-h-0">
<div className="flex flex-col items-start self-stretch flex-1 gap-2 min-w-0">
{renderRow(fieldLabel('item.code', '상품코드'), item_code)}
{renderRow(fieldLabel('item.price', '단가'), formattedPrice)}
{/* 값은 회사가 고른 협상 기준가(item_price), 호칭은 공급사 화면 고정 용어 — 회사 용어 사전을 타지 않는다. */}
{renderRow('공급가', formattedPrice)}
{renderRow(fieldLabel('item.model_name', '모델명'), item_model_name)}
{renderRow(fieldLabel('item.manufacturer', '제조사'), item_maker_name)}
{renderRow(fieldLabel('item.moq', '최소주문수량'), item_min_order_quantity)}
+3 -2
View File
@@ -1,7 +1,7 @@
import { type ReactNode } from 'react'
import { Logo } from '@/components'
import { useMeQuery } from '@/apis'
import { cn } from '@/lib'
import { cn, useBrandColor } from '@/lib'
// 좌측 폭: list=반응형 비율 / chat=고정폭 단계 축소
const SIDEBAR_WIDTH = {
@@ -44,7 +44,8 @@ export function MainLayout({
header,
children,
}: MainLayoutProps) {
const { data: user } = useMeQuery() // 회사 브랜딩(서비스명/로고) 주입
const { data: user } = useMeQuery() // 회사 브랜딩(서비스명/로고/브랜드 색) 주입
useBrandColor(user?.branding?.primary_color)
const panes = (
<>
<aside className={cn(styles.sidebar, SIDEBAR_WIDTH[sidebarWidth])}>
+1
View File
@@ -4,3 +4,4 @@ export type { ClassValue } from '@/lib/cn'
export { interactive } from '@/lib/interactive'
export { toast } from '@/lib/toast'
export { formatKstDateTime, KST_TIME_ZONE } from '@/lib/datetime'
export { useBrandColor } from '@/lib/useBrandColor'
+29
View File
@@ -0,0 +1,29 @@
import { useEffect } from 'react'
// 회사 브랜드 색(companies.settings.branding.primary_color)을 브랜드 CSS 변수에 적용한다.
// hover/ring/연한 배경은 color-mix 파생으로 만들어 토스풍 톤 관계를 유지하고,
// 색이 없거나 hex 가 아니면(injection 방지) 기본 팔레트(Toss blue)를 그대로 둔다.
const HEX_COLOR = /^#[0-9a-fA-F]{3,8}$/
const DERIVED = {
'--brand-600': (c: string) => c,
'--brand-700': (c: string) => `color-mix(in srgb, ${c} 85%, #000)`,
'--brand-500': (c: string) => `color-mix(in srgb, ${c} 70%, #fff)`,
'--brand-light': (c: string) => `color-mix(in srgb, ${c} 9%, #fff)`,
} as const
export function useBrandColor(color?: string) {
useEffect(() => {
const c = (color ?? '').trim()
if (!HEX_COLOR.test(c)) return
const root = document.documentElement.style
for (const [name, derive] of Object.entries(DERIVED)) {
root.setProperty(name, derive(c))
}
return () => {
for (const name of Object.keys(DERIVED)) {
root.removeProperty(name)
}
}
}, [color])
}
+2
View File
@@ -2,10 +2,12 @@ import { Navigate } from 'react-router'
import { tokenStorage } from '@/apis'
import { Logo } from '@/components'
import { LoginForm, usePreLoginBranding } from '@/features/auth'
import { useBrandColor } from '@/lib'
export function LoginPage() {
// 초청 링크의 session_id(없으면 직전 로그인 캐시)로 회사 브랜딩을 먼저 그린다.
const branding = usePreLoginBranding()
useBrandColor(branding?.primary_color)
// 이미 로그인된 상태면 목록으로
if (tokenStorage.hasToken()) {