refactor(WEB): 공통 훅(useDeleteDialog, useStatsLoader) 및 CRUD 서비스 추출
- useDeleteDialog 훅 추출로 삭제 다이얼로그 로직 공통화 - useStatsLoader 훅 추출로 통계 로딩 패턴 공통화 - create-crud-service 유틸 추가 - 차량관리/견적/출고/검사 등 리스트 컴포넌트 간소화 - RankManagement actions 정리 - 프로덕션 로거 불필요 출력 제거 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* - 자재 투입 목록: 토글 (쉐브론 아이콘 + 텍스트)
|
||||
*/
|
||||
|
||||
import { useState, useCallback } from 'react';
|
||||
import { useState, useCallback, memo } from 'react';
|
||||
import { ChevronDown, ChevronUp, Pencil, Trash2, ImageIcon } from 'lucide-react';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -43,7 +43,7 @@ interface WorkItemCardProps {
|
||||
onInspectionToggle?: (itemId: string, checked: boolean) => void;
|
||||
}
|
||||
|
||||
export function WorkItemCard({
|
||||
export const WorkItemCard = memo(function WorkItemCard({
|
||||
item,
|
||||
onStepClick,
|
||||
onEditMaterial,
|
||||
@@ -230,7 +230,7 @@ export function WorkItemCard({
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// ===== 스크린 전용: 절단정보 =====
|
||||
function ScreenCuttingInfo({ width, sheets }: { width: number; sheets: number }) {
|
||||
|
||||
Reference in New Issue
Block a user