From 10aa3d34bc599232af07d8a643c9938be14cb5bf Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Mon, 8 Sep 2025 10:33:01 +0000
Subject: (김준회) 입찰 인터페이스 처리, 자재그룹명 매핑 수정, 자재그룹 뷰
 수정, 부서별 도메인 할당시 동기화 처리, 도메인 부서 할당 다이얼로그 부서목록
 스크롤 처리, 삼성중공업 사용자 global search 개선
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/common/material/material-group-selector.tsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'components/common/material/material-group-selector.tsx')

diff --git a/components/common/material/material-group-selector.tsx b/components/common/material/material-group-selector.tsx
index 580c2db5..69a929f2 100644
--- a/components/common/material/material-group-selector.tsx
+++ b/components/common/material/material-group-selector.tsx
@@ -158,13 +158,13 @@ export function MaterialGroupSelector({
     } else {
       const isAlreadySelected = selectedMaterials.some(
         (selected) => selected.materialGroupCode === material.materialGroupCode && 
-                      selected.materialName === material.materialName
+                      selected.materialGroupDesc === material.materialGroupDesc
       );
 
       if (isAlreadySelected) {
         newSelectedMaterials = selectedMaterials.filter(
           (selected) => !(selected.materialGroupCode === material.materialGroupCode && 
-                         selected.materialName === material.materialName)
+                         selected.materialGroupDesc === material.materialGroupDesc)
         );
       } else {
         if (maxSelections && selectedMaterials.length >= maxSelections) {
@@ -187,7 +187,7 @@ export function MaterialGroupSelector({
     
     const newSelectedMaterials = selectedMaterials.filter(
       (material) => !(material.materialGroupCode === materialToRemove.materialGroupCode && 
-                     material.materialName === materialToRemove.materialName)
+                     material.materialGroupDesc === materialToRemove.materialGroupDesc)
     );
     onMaterialsChange?.(newSelectedMaterials);
   }, [disabled, selectedMaterials, onMaterialsChange]);
@@ -196,7 +196,7 @@ export function MaterialGroupSelector({
   const isMaterialSelected = useCallback((material: MaterialSearchItem) => {
     return selectedMaterials.some(
       (selected) => selected.materialGroupCode === material.materialGroupCode && 
-                    selected.materialName === material.materialName
+                    selected.materialGroupDesc === material.materialGroupDesc
     );
   }, [selectedMaterials]);
 
@@ -217,7 +217,7 @@ export function MaterialGroupSelector({
               ) : (
                 selectedMaterials.map((material) => (
                   <Badge
-                    key={`${material.materialGroupCode}-${material.materialName}`}
+                    key={`${material.materialGroupCode}-${material.materialGroupDesc}`}
                     variant="secondary"
                     className="gap-1 pr-1"
                   >
@@ -285,7 +285,7 @@ export function MaterialGroupSelector({
                       
                       return (
                         <CommandItem
-                          key={`${material.materialGroupCode}-${material.materialName}`}
+                          key={`${material.materialGroupCode}-${material.materialGroupDesc}`}
                           onSelect={() => {
                             if (!isExcluded) {
                               handleMaterialSelect(material);
@@ -313,7 +313,7 @@ export function MaterialGroupSelector({
                               "font-medium",
                               isExcluded && "text-muted-foreground"
                             )}>
-                              {material.materialName}
+                              {material.materialGroupDesc}
                               {isExcluded && (
                                 <span className="ml-2 text-xs bg-red-100 text-red-600 px-2 py-1 rounded">
                                   이미 등록됨
-- 
cgit v1.2.3

