[feat] negodata·공급사포털: 상품 필드 숨김 설정·용어 카탈로그 확장·로그인 전 브랜딩·모바일 대응

- 회사 설정 hidden_fields 신설: 상품 목록·등록폼·엑셀 양식에서 감추고 목표가 후보에서도 제외
- 용어 카탈로그 9→37개(상품·협력사·견적 그룹), 목록·폼·엑셀 헤더 배선
- 엑셀 '최저한도' → '인터넷 최저가' 표기 정정(구양식 헤더는 alias 유지), 공급사 컬럼 검증 유지
- 목표가 산정내역에 적용 모드·숨김 필드 반영, 목표가 상한 라벨에 산식(상품단가×2) 표기
- 공급사 포털: 초청 링크 session_id 로 로그인 전 회사 브랜딩 조회(무인증 엔드포인트), 기본 브랜드 negotium 워드마크, negotium·AI O2O 크레딧 표기
- 목록 테이블 뷰포트 기준 전환·툴바 줄바꿈·협상현황 카드뷰로 모바일/태블릿 대응
- 이용안내 FAQ 탭 추가, 이용안내·회사설정 탭 URL 쿼리 동기화 및 빠른이동 등록
This commit is contained in:
minaChoi committed 2026-07-23 11:29:35 +09:00
1 parent 4927c9184e
commit 0f10b6a70f
43 files changed
+896 -143

No files matched your search

@@ -7,8 +7,11 @@ import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { Typography } from '@/components/ui/typography';
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';
import { useNavigate } from 'react-router';
import { cn } from '@/lib/utils';
import { NotificationBell } from './NotificationBell';
import { GUIDE_TABS, TAB_LABEL, type GuideTab } from '@/features/onboarding/OnboardingGuideModal';
import { SETTINGS_TABS, SETTINGS_TAB_LABEL, type SettingsTab } from '@/features/settings/SettingsView';
import {
LayoutDashboard,
BarChart3,
@@ -26,6 +29,7 @@ import {
ChevronRight,
Menu,
X,
BookOpen,
} from 'lucide-react';
interface LayoutProps {
@@ -82,6 +86,7 @@ const pageLabelMap: Record<PageType, string> = {
export default function Layout({ children, currentPage, setPage, onLogout }: LayoutProps) {
const { user } = useAuth();
const navigate = useNavigate();
const branding = useBranding(); // 회사 설정 브랜딩(서비스명/로고). 미설정 시 기본 NegoData
// 기준일시(오늘) — 로컬 타임존 기준 YYYY-MM-DD
const today = new Date().toLocaleDateString('sv-SE');
@@ -328,6 +333,15 @@ export default function Layout({ children, currentPage, setPage, onLogout }: Lay
setPage(type);
setIsCmdOpen(false);
}}
onSelectGuide={(tab) => {
navigate(`/dashboard?guide=${tab}`);
setIsCmdOpen(false);
}}
onSelectSettings={(tab) => {
navigate(`/settings?tab=${tab}`);
setIsCmdOpen(false);
}}
canSeeSettings={visibleItems.some((i) => i.type === 'SETTINGS')}
/>
{isProfileOpen && <ProfileSheet open onClose={() => setIsProfileOpen(false)} />}
@@ -342,12 +356,18 @@ function CommandMenu({
items,
currentPage,
onSelect,
onSelectGuide,
onSelectSettings,
canSeeSettings,
}: {
open: boolean;
onOpenChange: (open: boolean) => void;
items: MenuItem[];
currentPage: PageType;
onSelect: (type: PageType) => void;
onSelectGuide: (tab: GuideTab) => void;
onSelectSettings: (tab: SettingsTab) => void;
canSeeSettings: boolean;
}) {
const [query, setQuery] = useState('');
@@ -357,6 +377,14 @@ function CommandMenu({
const q = query.trim().toLowerCase();
const filtered = q ? items.filter((i) => i.label.toLowerCase().includes(q)) : items;
// 이용안내 탭도 이동 대상 — 대시보드로 가면서 ?guide=<탭> 을 붙여 해당 탭으로 바로 연다.
const guideEntries = GUIDE_TABS.map((t) => ({ tab: t, label: `이용안내 · ${TAB_LABEL[t]}` }));
const filteredGuides = q ? guideEntries.filter((g) => g.label.toLowerCase().includes(q)) : guideEntries;
// 회사 설정 탭도 이동 대상(최고관리자만 — 메뉴와 같은 게이팅).
const settingsEntries = canSeeSettings
? SETTINGS_TABS.map((t) => ({ tab: t, label: `회사 설정 · ${SETTINGS_TAB_LABEL[t]}` }))
: [];
const filteredSettings = q ? settingsEntries.filter((e) => e.label.toLowerCase().includes(q)) : settingsEntries;
return (
<Dialog open={open} onOpenChange={onOpenChange}>
@@ -380,7 +408,7 @@ function CommandMenu({
/>
</div>
<div className="max-h-72 overflow-y-auto p-1.5">
{filtered.length === 0 ? (
{filtered.length === 0 && filteredGuides.length === 0 && filteredSettings.length === 0 ? (
<Typography variant="muted" className="px-3 py-4 text-xs">
일치하는 메뉴가 없습니다
</Typography>
@@ -407,6 +435,32 @@ function CommandMenu({
);
})
)}
{filteredSettings.map((e) => (
<button
key={e.tab}
type="button"
onClick={() => onSelectSettings(e.tab)}
className="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-3 py-2 text-left transition-colors hover:bg-accent"
>
<Building size={15} className="shrink-0 text-muted-foreground" />
<Typography as="span" variant="small" className="flex-1 truncate">
{e.label}
</Typography>
</button>
))}
{filteredGuides.map((g) => (
<button
key={g.tab}
type="button"
onClick={() => onSelectGuide(g.tab)}
className="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-3 py-2 text-left transition-colors hover:bg-accent"
>
<BookOpen size={15} className="shrink-0 text-muted-foreground" />
<Typography as="span" variant="small" className="flex-1 truncate">
{g.label}
</Typography>
</button>
))}
</div>
</DialogContent>
</Dialog>
@@ -16,12 +16,12 @@ export function PageToolbar({
return (
<div
className={cn(
'flex flex-col gap-2 rounded-lg border border-border bg-card p-3 md:flex-row md:items-center md:justify-between',
'flex flex-col gap-2 rounded-lg border border-border bg-card p-3 lg:flex-row lg:items-center lg:justify-between',
className
)}
>
<div className="flex flex-1 flex-col gap-2 sm:flex-row sm:items-center">{children}</div>
{actions && <div className="flex items-center gap-2">{actions}</div>}
<div className="flex flex-1 flex-col gap-2 sm:flex-row sm:items-center sm:flex-wrap">{children}</div>
{actions && <div className="flex flex-wrap items-center gap-2">{actions}</div>}
</div>
);
}
@@ -97,8 +97,8 @@ export function DataTable<T>({
const detailCols = mobileCols.filter((c) => c !== primaryCol)
return (
<div className={cn("@container border border-border rounded-lg bg-card overflow-hidden", className)}>
<div className="hidden @3xl:block">
<div className={cn("border border-border rounded-lg bg-card overflow-hidden", className)}>
<div className="hidden lg:block overflow-x-auto">
<Table className="w-full text-xs">
<TableHeader>
<TableRow className="bg-muted/50 border-b border-border hover:bg-transparent">
@@ -182,7 +182,7 @@ export function DataTable<T>({
</Table>
</div>
<div className="@3xl:hidden divide-y divide-border">
<div className="lg:hidden divide-y divide-border">
{data.length > 0 ? (
data.map((row) => {
const key = rowKey(row)