feat(WEB): 견적 개소 복제 기능 추가 - 부호 자동 채번
- LocationListPanel에 복제 버튼(Copy 아이콘) 추가 - 복제 시 모든 개소 데이터(bomResult 포함) 복사 - 부호 자동 채번: 같은 접두어의 최대 번호 +1, 자릿수 유지
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useCallback } from "react";
|
||||
import { Plus, Upload, Download, Pencil, Trash2 } from "lucide-react";
|
||||
import { Plus, Upload, Download, Pencil, Trash2, Copy } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
|
||||
import { Button } from "../ui/button";
|
||||
@@ -77,6 +77,7 @@ interface LocationListPanelProps {
|
||||
onSelectLocation: (id: string) => void;
|
||||
onAddLocation: (location: Omit<LocationItem, "id">) => Promise<boolean>;
|
||||
onDeleteLocation: (id: string) => void;
|
||||
onCloneLocation?: (id: string) => void;
|
||||
onUpdateLocation: (locationId: string, updates: Partial<LocationItem>) => void;
|
||||
onExcelUpload: (locations: Omit<LocationItem, "id">[]) => void;
|
||||
finishedGoods: FinishedGoods[];
|
||||
@@ -94,6 +95,7 @@ export function LocationListPanel({
|
||||
onSelectLocation,
|
||||
onAddLocation,
|
||||
onDeleteLocation,
|
||||
onCloneLocation,
|
||||
onUpdateLocation,
|
||||
onExcelUpload,
|
||||
finishedGoods,
|
||||
@@ -523,6 +525,16 @@ export function LocationListPanel({
|
||||
>
|
||||
<Pencil className="h-4 w-4 text-gray-600" />
|
||||
</button>
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onCloneLocation?.(loc.id);
|
||||
}}
|
||||
className="p-1 hover:bg-blue-100 rounded"
|
||||
title="복제"
|
||||
>
|
||||
<Copy className="h-4 w-4 text-blue-500" />
|
||||
</button>
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user