Merge pull request 'dev' (#440) from dev into prd-deploy
Reviewed-on: #440
This commit is contained in:
commit
a9732eb571
@ -799,17 +799,19 @@ export default function CircuitTrestleSetting({ id }) {
|
|||||||
onFold={() => setIsFold(!isFold)}
|
onFold={() => setIsFold(!isFold)}
|
||||||
/>
|
/>
|
||||||
<WithDraggable.Body>
|
<WithDraggable.Body>
|
||||||
<div style={{ display: isFold ? 'none' : 'block' }}>
|
<div style={{ display: !(tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY) && isFold ? 'none' : 'block' }}>
|
||||||
<div className="roof-module-tab">
|
<div style={{ display: tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && isFold ? 'none' : 'block' }}>
|
||||||
<div className={`module-tab-bx act`}>{getMessage('modal.circuit.trestle.setting.power.conditional.select')}</div>
|
<div className="roof-module-tab">
|
||||||
<span className={`tab-arr ${tabNum === 2 ? 'act' : ''}`}></span>
|
<div className={`module-tab-bx act`}>{getMessage('modal.circuit.trestle.setting.power.conditional.select')}</div>
|
||||||
<div className={`module-tab-bx ${tabNum === 2 ? 'act' : ''}`}>
|
<span className={`tab-arr ${tabNum === 2 ? 'act' : ''}`}></span>
|
||||||
{getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')})
|
<div className={`module-tab-bx ${tabNum === 2 ? 'act' : ''}`}>
|
||||||
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation')}({getMessage('modal.circuit.trestle.setting.step.up.allocation')})
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && <PowerConditionalSelect {...powerConditionalSelectProps} />}
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.AUTO && <PowerConditionalSelect {...powerConditionalSelectProps} />}
|
||||||
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
{tabNum === 1 && allocationType === ALLOCATION_TYPE.PASSIVITY && (
|
||||||
<PassivityCircuitAllocation {...passivityProps} ref={passivityCircuitAllocationRef} />
|
<PassivityCircuitAllocation {...passivityProps} ref={passivityCircuitAllocationRef} isFold={isFold} />
|
||||||
)}
|
)}
|
||||||
{tabNum === 2 && <StepUp {...stepUpProps} onInitialize={handleStepUpInitialize} />}
|
{tabNum === 2 && <StepUp {...stepUpProps} onInitialize={handleStepUpInitialize} />}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
||||||
import { POLYGON_TYPE } from '@/common/common'
|
import { POLYGON_TYPE } from '@/common/common'
|
||||||
import { useMasterController } from '@/hooks/common/useMasterController'
|
import { useMasterController } from '@/hooks/common/useMasterController'
|
||||||
import { useModule } from '@/hooks/module/useModule'
|
|
||||||
import { useCircuitTrestle } from '@/hooks/useCirCuitTrestle'
|
import { useCircuitTrestle } from '@/hooks/useCirCuitTrestle'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
@ -11,7 +10,7 @@ import { fontSelector } from '@/store/fontAtom'
|
|||||||
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
import { circuitNumDisplaySelector } from '@/store/settingAtom'
|
import { circuitNumDisplaySelector } from '@/store/settingAtom'
|
||||||
import { useContext, useEffect, useState } from 'react'
|
import { useContext, useEffect, useState } from 'react'
|
||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilValue } from 'recoil'
|
||||||
import { normalizeDigits } from '@/util/input-utils'
|
import { normalizeDigits } from '@/util/input-utils'
|
||||||
|
|
||||||
export default function PassivityCircuitAllocation(props) {
|
export default function PassivityCircuitAllocation(props) {
|
||||||
@ -22,6 +21,7 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
getOptYn: getApiProps,
|
getOptYn: getApiProps,
|
||||||
getUseModuleItemList: getSelectedModuleList,
|
getUseModuleItemList: getSelectedModuleList,
|
||||||
getSelectModelList: getSelectModelList,
|
getSelectModelList: getSelectModelList,
|
||||||
|
isFold,
|
||||||
} = props
|
} = props
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -497,73 +497,77 @@ export default function PassivityCircuitAllocation(props) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="properties-setting-wrap outer">
|
<div className="properties-setting-wrap outer">
|
||||||
<div className="setting-tit">{getMessage('modal.circuit.trestle.setting.circuit.allocation')}</div>
|
<div style={{ display: isFold ? 'none' : 'block' }}>
|
||||||
<div className="module-table-box mb10">
|
<div className="setting-tit">{getMessage('modal.circuit.trestle.setting.circuit.allocation')}</div>
|
||||||
<div className="module-table-inner">
|
<div className="module-table-box mb10">
|
||||||
<div className="bold-font mb10">{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity')}</div>
|
<div className="module-table-inner">
|
||||||
<div className="normal-font mb15">{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.info')}</div>
|
<div className="bold-font mb10">{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity')}</div>
|
||||||
<div className="roof-module-table overflow-y">
|
<div className="normal-font mb15">{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.info')}</div>
|
||||||
{header && (
|
<div className="roof-module-table overflow-y">
|
||||||
<table>
|
{header && (
|
||||||
<thead>
|
<table>
|
||||||
<tr>
|
<thead>
|
||||||
{header.map((header, index) => (
|
<tr>
|
||||||
<th key={'header' + index}>{header.name}</th>
|
{header.map((header, index) => (
|
||||||
|
<th key={'header' + index}>{header.name}</th>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{rows.map((row, index) => (
|
||||||
|
<tr key={'row' + index}>
|
||||||
|
{header.map((header, i) => (
|
||||||
|
<td className="al-c" key={'rowcell' + i}>
|
||||||
|
{typeof row[header.prop] === 'number'
|
||||||
|
? (row[header.prop] ?? 0).toLocaleString('ko-KR', { maximumFractionDigits: 4 })
|
||||||
|
: (row[header.prop] ?? 0)}
|
||||||
|
</td>
|
||||||
|
))}
|
||||||
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{rows.map((row, index) => (
|
|
||||||
<tr key={'row' + index}>
|
|
||||||
{header.map((header, i) => (
|
{header.map((header, i) => (
|
||||||
<td className="al-c" key={'rowcell' + i}>
|
<td className="al-c" key={'footer' + i}>
|
||||||
{typeof row[header.prop] === 'number'
|
{footer[header.prop]}
|
||||||
? (row[header.prop] ?? 0).toLocaleString('ko-KR', { maximumFractionDigits: 4 })
|
|
||||||
: (row[header.prop] ?? 0)}
|
|
||||||
</td>
|
</td>
|
||||||
))}
|
))}
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
</tbody>
|
||||||
<tr>
|
</table>
|
||||||
{header.map((header, i) => (
|
)}
|
||||||
<td className="al-c" key={'footer' + i}>
|
</div>
|
||||||
{footer[header.prop]}
|
|
||||||
</td>
|
|
||||||
))}
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="module-table-box mb10">
|
||||||
<div className="module-table-box mb10">
|
<div className="module-table-inner">
|
||||||
<div className="module-table-inner">
|
<div className="hexagonal-wrap">
|
||||||
<div className="hexagonal-wrap">
|
<div className="hexagonal-item">
|
||||||
<div className="hexagonal-item">
|
<div className="bold-font">
|
||||||
<div className="bold-font">{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.selected.power.conditional')}</div>
|
{getMessage('modal.circuit.trestle.setting.circuit.allocation.passivity.selected.power.conditional')}
|
||||||
</div>
|
|
||||||
<div className="hexagonal-item">
|
|
||||||
{selectedModels.map((model, index) => (
|
|
||||||
<div className="d-check-radio pop mb10" key={'model' + index}>
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name="radio01"
|
|
||||||
id={`ra0${index + 1}`}
|
|
||||||
value={model}
|
|
||||||
checked={selectedPcs?.id === model.id}
|
|
||||||
onChange={() => setSelectedPcs(model)}
|
|
||||||
/>
|
|
||||||
<label htmlFor={`ra0${index + 1}`}>
|
|
||||||
{model.goodsNo} (
|
|
||||||
{getMessage(
|
|
||||||
'modal.circuit.trestle.setting.circuit.allocation.passivity.circuit.info',
|
|
||||||
managementState?.coldRegionFlg === '1' ? [model.serMinQty, model.serColdZoneMaxQty] : [model.serMinQty, model.serMaxQty],
|
|
||||||
)}
|
|
||||||
)
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
</div>
|
||||||
|
<div className="hexagonal-item">
|
||||||
|
{selectedModels.map((model, index) => (
|
||||||
|
<div className="d-check-radio pop mb10" key={'model' + index}>
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="radio01"
|
||||||
|
id={`ra0${index + 1}`}
|
||||||
|
value={model}
|
||||||
|
checked={selectedPcs?.id === model.id}
|
||||||
|
onChange={() => setSelectedPcs(model)}
|
||||||
|
/>
|
||||||
|
<label htmlFor={`ra0${index + 1}`}>
|
||||||
|
{model.goodsNo} (
|
||||||
|
{getMessage(
|
||||||
|
'modal.circuit.trestle.setting.circuit.allocation.passivity.circuit.info',
|
||||||
|
managementState?.coldRegionFlg === '1' ? [model.serMinQty, model.serColdZoneMaxQty] : [model.serMinQty, model.serMaxQty],
|
||||||
|
)}
|
||||||
|
)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,8 +21,8 @@ export default function SizeSetting(props) {
|
|||||||
const { resizeSurfaceShapeBatch } = useSurfaceShapeBatch({})
|
const { resizeSurfaceShapeBatch } = useSurfaceShapeBatch({})
|
||||||
const widthRef = useRef(null)
|
const widthRef = useRef(null)
|
||||||
const heightRef = useRef(null)
|
const heightRef = useRef(null)
|
||||||
const [width, setWidth] = useState(target?.originWidth ? (target.originWidth * 10) : 0)
|
const [width, setWidth] = useState(target?.originWidth ? target.originWidth * 10 : (target.width * 10).toFixed(0))
|
||||||
const [height, setHeight] = useState(target?.originHeight ? (target.originHeight * 10) : 0)
|
const [height, setHeight] = useState(target?.originHeight ? target.originHeight * 10 : (target.height * 10).toFixed(0))
|
||||||
// const { initEvent } = useEvent()
|
// const { initEvent } = useEvent()
|
||||||
// const { initEvent } = useContext(EventContext)
|
// const { initEvent } = useContext(EventContext)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user