fix(WEB): 모바일 반응형 UI 개선 및 개소 정보 수정 모달 추가

- CalendarHeader: 모바일에서 주/월 버튼 2줄 레이아웃으로 분리
- MobileCard: 제목 텍스트 overflow 시 truncate 적용
- DetailActions: 모바일 하단 sticky 버튼 바 overflow 수정
- OrderDetailForm: 모바일 하단 sticky 버튼 바 overflow 수정
- LocationDetailPanel: 오픈사이즈 옆 수정 버튼에 모달 연결
- LocationListPanel: 개소 목록에 수정/삭제 버튼 추가
- LocationEditModal: 개소 정보 수정 팝업 신규 생성

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-01-27 11:28:12 +09:00
parent 6586db4996
commit 55e92bc7b4
8 changed files with 441 additions and 88 deletions

View File

@@ -9,7 +9,7 @@
"use client";
import { useState, useCallback } from "react";
import { Plus, Upload, Download, Trash2 } from "lucide-react";
import { Plus, Upload, Download, Trash2, Pencil } from "lucide-react";
import { toast } from "sonner";
import { Button } from "../ui/button";
@@ -32,6 +32,7 @@ import {
TableRow,
} from "../ui/table";
import { DeleteConfirmDialog } from "../ui/confirm-dialog";
import { LocationEditModal } from "./LocationEditModal";
import type { LocationItem } from "./QuoteRegistrationV2";
import type { FinishedGoods } from "./actions";
@@ -70,6 +71,7 @@ interface LocationListPanelProps {
onSelectLocation: (id: string) => void;
onAddLocation: (location: Omit<LocationItem, "id">) => void;
onDeleteLocation: (id: string) => void;
onUpdateLocation: (locationId: string, updates: Partial<LocationItem>) => void;
onExcelUpload: (locations: Omit<LocationItem, "id">[]) => void;
finishedGoods: FinishedGoods[];
disabled?: boolean;
@@ -85,6 +87,7 @@ export function LocationListPanel({
onSelectLocation,
onAddLocation,
onDeleteLocation,
onUpdateLocation,
onExcelUpload,
finishedGoods,
disabled = false,
@@ -109,6 +112,9 @@ export function LocationListPanel({
// 삭제 확인 다이얼로그
const [deleteTarget, setDeleteTarget] = useState<string | null>(null);
// 수정 모달
const [editTarget, setEditTarget] = useState<LocationItem | null>(null);
// ---------------------------------------------------------------------------
// 핸들러
// ---------------------------------------------------------------------------
@@ -346,17 +352,30 @@ export function LocationListPanel({
<TableCell className="text-center">{loc.quantity}</TableCell>
<TableCell className="text-center">
{!disabled && (
<Button
variant="ghost"
size="icon"
className="h-6 w-6 text-red-500 hover:text-red-600"
onClick={(e) => {
e.stopPropagation();
setDeleteTarget(loc.id);
}}
>
<Trash2 className="h-3 w-3" />
</Button>
<div className="flex items-center justify-center gap-1">
<Button
variant="ghost"
size="icon"
className="h-6 w-6 text-gray-500 hover:text-blue-600"
onClick={(e) => {
e.stopPropagation();
setEditTarget(loc);
}}
>
<Pencil className="h-3 w-3" />
</Button>
<Button
variant="ghost"
size="icon"
className="h-6 w-6 text-red-500 hover:text-red-600"
onClick={(e) => {
e.stopPropagation();
setDeleteTarget(loc.id);
}}
>
<Trash2 className="h-3 w-3" />
</Button>
</div>
)}
</TableCell>
</TableRow>
@@ -521,6 +540,18 @@ export function LocationListPanel({
title="개소 삭제"
description="선택한 개소를 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다."
/>
{/* 개소 정보 수정 모달 */}
<LocationEditModal
open={!!editTarget}
onOpenChange={(open) => !open && setEditTarget(null)}
location={editTarget}
onSave={(locationId, updates) => {
onUpdateLocation(locationId, updates);
setEditTarget(null);
toast.success("개소 정보가 수정되었습니다.");
}}
/>
</div>
);
}