Merge pull request '[1216] 모듈에 시리즈 추가 - 시리즈가 존재하지 않는 모듈존재' (#340) from dev into prd-deploy
Reviewed-on: #340
This commit is contained in:
commit
1393422a4a
@ -71,6 +71,11 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
],
|
||||
}
|
||||
|
||||
const allOption = {
|
||||
moduleSerCd: 'ALL',
|
||||
moduleSerNm: getMessage("board.sub.total") || 'ALL'
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (basicSetting.roofSizeSet == '3') {
|
||||
restoreModuleInstArea()
|
||||
@ -95,6 +100,8 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
if (currentSeries && (!selectedModuleSeries || selectedModuleSeries.moduleSerCd !== currentSeries.moduleSerCd)) {
|
||||
setSelectedModuleSeries(currentSeries)
|
||||
}
|
||||
}else{
|
||||
setSelectedModuleSeries(allOption)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -235,7 +242,8 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
filtered = moduleList
|
||||
} else {
|
||||
// 특정 시리즈 선택 시 해당 시리즈 모듈만 표시
|
||||
filtered = moduleList.filter(module => module.moduleSerCd === e.moduleSerCd)
|
||||
//filtered = moduleList.filter(module => module.moduleSerCd === e.moduleSerCd)
|
||||
filtered = moduleList.filter(module => module && module.moduleSerCd && module.moduleSerCd === e.moduleSerCd)
|
||||
}
|
||||
|
||||
setFilteredModuleList(filtered)
|
||||
@ -324,11 +332,6 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
})
|
||||
|
||||
// "전체" 옵션을 맨 앞에 추가
|
||||
const allOption = {
|
||||
moduleSerCd: 'ALL',
|
||||
moduleSerNm: getMessage("board.sub.total") || 'ALL'
|
||||
}
|
||||
|
||||
const seriesList = [allOption, ...mappedSeries]
|
||||
setModuleSeriesList(seriesList)
|
||||
|
||||
@ -436,16 +439,16 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
<div className="outline-form mb10">
|
||||
<span>{getMessage('modal.module.basic.setting.module.series.setting')}</span>
|
||||
<div className="grid-select">
|
||||
{moduleSeriesList.length > 0 && (
|
||||
<div className="grid-select">
|
||||
<QSelectBox
|
||||
options={moduleSeriesList}
|
||||
options={moduleSeriesList.length > 0 ? moduleSeriesList : [allOption]}
|
||||
value={selectedModuleSeries}
|
||||
targetKey={'moduleSerCd'}
|
||||
sourceKey={'moduleSerCd'}
|
||||
showKey={'moduleSerNm'}
|
||||
onChange={(e) => handleChangeModuleSeries(e)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="outline-form mb10">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user