지붕재 할당 팝업 수정
This commit is contained in:
parent
43740eb453
commit
e3f97d20fb
@ -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
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user