[chore] 작업분 일괄: logs.sh 컨테이너 메뉴화 · dbeaver 초기화 SQL · landing 운영 compose · negodata/front eslint 도입 · 업로드 샘플 CSV

This commit is contained in:
minaChoi committed 2026-07-24 18:45:46 +09:00
1 parent 9fb4a52c56
commit bacf6271df
20 files changed
+2428 -30

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
// 최소 게이트 — 전체 스타일 린트가 아니라, tsc 가 못 잡는 런타임 크래시 버그만 막는다.
// 도입 계기: QuotationDetailSheet 에서 로컬 const canManage 가 동명 import 를 가려
// zustand 셀렉터가 TDZ 참조 → 프로덕션 크래시(Cannot access 'k' before initialization).
// 그 케이스는 순환 타입 추론으로 tsc --noEmit 도 통과했다.
import tseslint from 'typescript-eslint';
import reactHooks from 'eslint-plugin-react-hooks';
export default tseslint.config({
files: ['src/**/*.{ts,tsx}'],
ignores: ['src/api/generated/**'],
languageOptions: {
parser: tseslint.parser,
},
plugins: {
'@typescript-eslint': tseslint.plugin,
'react-hooks': reactHooks,
},
rules: {
// 훅 호출 순서 위반은 런타임 크래시라 error, deps 누락은 기존 코드가 많아 warn.
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
// 선언보다 위에서 변수를 쓰는 것(TDZ) 차단. 함수/타입 호이스팅은 안전하므로 허용.
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, classes: false, typedefs: false, enums: false, variables: true },
],
// 상위 스코프(import 포함) 이름을 가리는 재선언 차단.
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
},
});
+899
View File
File diff suppressed because it is too large. Load diff
+5 -2
View File
@@ -5,10 +5,10 @@
"type": "module",
"scripts": {
"dev": "vite --port=3000 --host=0.0.0.0",
"build": "vite build",
"build": "tsc --noEmit && eslint src && vite build",
"preview": "vite preview",
"clean": "rm -rf dist server.js",
"lint": "tsc --noEmit",
"lint": "tsc --noEmit && eslint src",
"orval": "orval --config ./orval.config.ts"
},
"dependencies": {
@@ -50,10 +50,13 @@
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.21",
"esbuild": "^0.25.0",
"eslint": "^10.7.0",
"eslint-plugin-react-hooks": "^7.1.1",
"orval": "^7.3.0",
"tailwindcss": "^4.1.14",
"tsx": "^4.21.0",
"typescript": "~5.8.2",
"typescript-eslint": "^8.65.0",
"vite": "^6.2.3"
}
}
+5 -5
View File
@@ -60,7 +60,7 @@ function ChartContainer({
);
}
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
function ChartStyle({ id, config }: { id: string; config: ChartConfig }) {
const colorConfig = Object.entries(config).filter(([, c]) => c.theme || c.color);
if (!colorConfig.length) return null;
@@ -85,11 +85,11 @@ ${colorConfig
}}
/>
);
};
}
const ChartTooltip = RechartsPrimitive.Tooltip;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TooltipContentProps = {
active?: boolean;
payload?: any[];
@@ -214,7 +214,7 @@ const ChartLegend = RechartsPrimitive.Legend;
type LegendContentProps = {
className?: string;
hideIcon?: boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
payload?: any[];
verticalAlign?: 'top' | 'bottom' | 'middle';
nameKey?: string;
@@ -251,7 +251,7 @@ function ChartLegendContent({
}
// payload 항목에서 config 매칭 키를 찾는다(shadcn 원본 로직).
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getPayloadConfigFromPayload(config: ChartConfig, payload: any, key: string) {
if (typeof payload !== 'object' || payload === null) return undefined;
@@ -9,7 +9,7 @@ type PhoneInputProps = Omit<React.ComponentProps<typeof Input>, 'value' | 'onCha
onChange?: (value: string) => void; // 숫자만으로 방출
};
export const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(function PhoneInput(
export const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(function PhoneInputInner(
{ value = '', onChange, ...props },
ref,
) {
@@ -123,4 +123,6 @@ function MarkButton({
);
}
const Divider = () => <span className="mx-1 h-4 w-px bg-border" />;
function Divider() {
return <span className="mx-1 h-4 w-px bg-border" />;
}
@@ -384,13 +384,13 @@ export function QuotationCreateModal({
{/* Steps indicator — 스텝 수는 유형에 따라 3(경매)/4(협상) */}
<div className="shrink-0 flex items-center justify-between gap-2 py-4 border-b border-border/40 text-muted-foreground">
{steps.map((label, i) => {
{steps.map((stepLabel, i) => {
const n = i + 1;
return (
<div key={label} className="flex items-center gap-2 min-w-0">
<div key={stepLabel} className="flex items-center gap-2 min-w-0">
{i > 0 && <ArrowRight size={14} className="shrink-0" />}
<button type="button" onClick={() => setStep(n)} className="cursor-pointer hover:opacity-75 transition-opacity truncate">
<Typography as="span" variant="body" className={`font-semibold ${step === n ? 'text-primary' : 'text-muted-foreground'}`}>{n}. {label}</Typography>
<Typography as="span" variant="body" className={`font-semibold ${step === n ? 'text-primary' : 'text-muted-foreground'}`}>{n}. {stepLabel}</Typography>
</button>
</div>
);
@@ -78,10 +78,10 @@ export function QuotationDetailSheet({
// 프론트 1차 차단이며, 실제 보안은 백엔드가 동일 스코프로 강제해야 함(버튼 숨김만으론 우회 가능).
const myUserId = useAuthStore((s) => s.user?.userId);
const isSuperAdmin = useAuthStore((s) => canManage(s.user?.role));
const canManage = !!myUserId && (quotation.user_id === myUserId || isSuperAdmin);
const canNotify = canManage; // 초청 메일 발송/재발송
const canMutate = !!myUserId && (quotation.user_id === myUserId || isSuperAdmin);
const canNotify = canMutate; // 초청 메일 발송/재발송
// 직접 낙찰 = 개찰(낙찰자 미정 마감) 견적에서만. 후보(투찰한 협상완료 협력사) 유무는 표에서 판정.
const canAward = canManage && chainRoundState(quotation) === 'opened';
const canAward = canMutate && chainRoundState(quotation) === 'opened';
// 협상 세션·사용 카드는 견적 단위, 채팅은 선택 세션 단위로 서버에서 읽는다.
// 세션은 협상 진행으로 계속 바뀌므로 탭 복귀 시 재조회한다. 카드는 생성 후 불변이라 끄둔다.
const sessionsQuery = useGetQuotationSessions(qtId, {
@@ -102,7 +102,7 @@ export function QuotationDetailSheet({
const { rounds: chainRounds, isLoading: chainLoading } = useQuotationChain(quotation.number);
const maxRound = chainRounds.length ? Math.max(...chainRounds.map((r) => r.round)) : (quotation.round ?? 1);
const isLatestRound = (quotation.round ?? 1) >= maxRound;
const canRegenerate = canManage && !chainLoading && quotation.status === QuotationStatus.CLOSED && isLatestRound;
const canRegenerate = canMutate && !chainLoading && quotation.status === QuotationStatus.CLOSED && isLatestRound;
const [selectedSessionId, setSelectedSessionId] = useState<string | null>(null);
const effectiveSessionId = selectedSessionId ?? serverSessions[0]?.session_id ?? null;
@@ -183,13 +183,13 @@ export function QuotationDetailSheet({
{/* 마감 버튼은 항상 노출하되, 본인/최고관리자가 아니거나 마감 가능한 상태가 아니면 비활성화한다. */}
{(() => {
const alreadyClosed = quotation.status === QuotationStatus.CLOSED;
const canClose = canManage && !alreadyClosed;
const canClose = canMutate && !alreadyClosed;
return (
<button
onClick={() => onCloseQuotation(quotation.qt_id ?? '', q_name)}
disabled={!canClose}
title={
!canManage
!canMutate
? '본인이 생성한 견적만 마감할 수 있습니다.'
: alreadyClosed
? '이미 마감된 견적입니다.'