Compare commits

..

No commits in common. "6c6e5845ef0341b4125f19d16837ddcddaefbd86" and "ce7c90eb6fcc307d6278bfd00d7a47919f3a4dcd" have entirely different histories.

2 changed files with 15 additions and 32 deletions

View File

@ -39,7 +39,7 @@ export default function QSelectBox({
if (showKey !== '' && !value) {
//value showKey
// return options[0][showKey]
return title !== '' ? title : getMessage('selectbox.title')
return title
} else if (showKey !== '' && value) {
//value sourceKey targetKey

View File

@ -66,12 +66,12 @@ export const Orientation = forwardRef((props, ref) => {
useEffect(() => {
if (selectedSurfaceType) {
console.log(roughnessCodes, selectedSurfaceType)
setInputRoughness(roughnessCodes.find((code) => code.clCode === managementState?.surfaceTypeValue))
setInputRoughness(roughnessCodes.find((code) => code.clCode === moduleSelectionData.common.illuminationTp))
}
}, [selectedSurfaceType])
useEffect(() => {
if (standardWindSpeed) setInputStandardWindSpeed(windSpeedCodes.find((code) => code.clCode === managementState?.standardWindSpeedId))
if (standardWindSpeed) setInputStandardWindSpeed(windSpeedCodes.find((code) => code.clCode === moduleSelectionData.common.stdWindSpeed))
}, [standardWindSpeed])
useEffect(() => {
@ -181,35 +181,11 @@ export const Orientation = forwardRef((props, ref) => {
}
const handleChangeModule = (e) => {
resetRoofs()
setSelectedModules(e)
}
const handleChangeRoughness = (e) => {
resetRoofs()
setInputRoughness(e)
}
const handleChangeInstallHeight = (e) => {
resetRoofs()
setInputInstallHeight(e)
}
const handleChangeStandardWindSpeed = (e) => {
resetRoofs()
setInputStandardWindSpeed(e)
}
const handleChangeVerticalSnowCover = (e) => {
resetRoofs()
setInputVerticalSnowCover(e)
}
const resetRoofs = () => {
const newRoofs = addedRoofs.map((roof) => {
return {
...roof,
lengthBase: null,
raftBaseCd: null,
trestleMkrCd: null,
constMthdCd: null,
constTp: null,
@ -225,6 +201,7 @@ export const Orientation = forwardRef((props, ref) => {
}
})
setRoofs(newRoofs)
setSelectedModules(e)
}
return (
@ -382,7 +359,10 @@ export const Orientation = forwardRef((props, ref) => {
targetKey={'clCode'}
sourceKey={'clCode'}
showKey={'clCodeNm'}
onChange={(e) => handleChangeRoughness(e)}
onChange={(e) => {
console.log('🚀 ~ handleChangeModule ~ inputRoughness:', e)
setInputRoughness(e)
}}
/>
)}
</div>
@ -394,7 +374,7 @@ export const Orientation = forwardRef((props, ref) => {
type="text"
className="input-origin block"
value={inputInstallHeight}
onChange={(e) => handleChangeInstallHeight(e.target.value)}
onChange={(e) => setInputInstallHeight(e.target.value)}
/>
</div>
<span className="thin">m</span>
@ -410,7 +390,10 @@ export const Orientation = forwardRef((props, ref) => {
targetKey={'clCode'}
sourceKey={'clCode'}
showKey={'clCodeNm'}
onChange={(e) => handleChangeStandardWindSpeed(e)}
onChange={(e) => {
console.log('🚀 ~ handleChangeModule ~ inputStandardWindSpeed:', e)
setInputStandardWindSpeed(e)
}}
/>
)}
</div>
@ -422,7 +405,7 @@ export const Orientation = forwardRef((props, ref) => {
type="text"
className="input-origin block"
value={inputVerticalSnowCover}
onChange={(e) => handleChangeVerticalSnowCover(e.target.value)}
onChange={(e) => setInputVerticalSnowCover(e.target.value)}
/>
</div>
<span className="thin">cm</span>