지붕재 할당 팝업 수정

This commit is contained in:
hyojun.choi 2025-03-14 12:37:26 +09:00
parent 43740eb453
commit e3f97d20fb

View File

@ -446,12 +446,10 @@ export function useRoofAllocationSetting(id) {
* 지붕재 변경 * 지붕재 변경
*/ */
const handleChangeRoofMaterial = (value, index) => { const handleChangeRoofMaterial = (value, index) => {
const selectedIndex = roofMaterials.findIndex((roof) => roof.selected)
const selectedRoofMaterial = roofMaterials.find((roof) => roof.roofMatlCd === value.id) const selectedRoofMaterial = roofMaterials.find((roof) => roof.roofMatlCd === value.id)
const newRoofList = currentRoofList.map((roof, idx) => { const newRoofList = currentRoofList.map((roof, idx) => {
if (idx === index) { if (idx === index) {
return { ...selectedRoofMaterial } return { ...selectedRoofMaterial, selected: roof.selected }
} }
return roof return roof
}) })