[chore] 작업분 일괄: logs.sh 컨테이너 메뉴화 · dbeaver 초기화 SQL · landing 운영 compose · negodata/front eslint 도입 · 업로드 샘플 CSV
This commit is contained in:
1 parent
9fb4a52c56
commit
bacf6271df
20 files changed
+2428
-30
No files matched your search
@@ -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
|
||||
? '이미 마감된 견적입니다.'
|
||||
|
||||
Reference in new issue
Block a user