Merge branch 'dev' into feature/jaeyoung

# Conflicts:
#	src/hooks/common/useRoofFn.js
This commit is contained in:
Jaeyoung Lee 2025-02-13 16:45:55 +09:00
commit 32bce54c1e
20 changed files with 364 additions and 263 deletions

View File

@ -74,7 +74,7 @@ export default function Estimate({}) {
const objectRecoil = useRecoilValue(floorPlanObjectState) const objectRecoil = useRecoilValue(floorPlanObjectState)
const currentPid = searchParams.get('pid') const currentPid = searchParams.get('pid')
// //
const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(currentPid) const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(currentPid, false)
const { selectedPlan } = usePlan() const { selectedPlan } = usePlan()
@ -465,6 +465,10 @@ export default function Estimate({}) {
//Pricing //Pricing
const handlePricing = async (showPriceCd) => { const handlePricing = async (showPriceCd) => {
//todo: YJSS swalFire
if (estimateContextState.estimateType === 'YJSS') {
return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
}
const param = { const param = {
saleStoreId: session.storeId, saleStoreId: session.storeId,
sapSalesStoreCd: session.custCd, sapSalesStoreCd: session.custCd,
@ -483,7 +487,7 @@ export default function Estimate({}) {
}) })
if (!pass) { if (!pass) {
//Pricing . Pricing . //Pricing . Pricing .
return swalFire({ return swalFire({
text: getMessage('estimate.detail.showPrice.pricingBtn.noItemId'), text: getMessage('estimate.detail.showPrice.pricingBtn.noItemId'),
type: 'alert', type: 'alert',
@ -581,7 +585,6 @@ export default function Estimate({}) {
//PKG input //PKG input
const onChangePkgAsp = (value) => { const onChangePkgAsp = (value) => {
if (estimateContextState.estimateType === 'YJSS') { if (estimateContextState.estimateType === 'YJSS') {
// let newValue = value.replace(/[^0-9.]/g, '')
let newValue = (value || '0').replace(/[^0-9.]/g, '') let newValue = (value || '0').replace(/[^0-9.]/g, '')
if (newValue.length > 1) { if (newValue.length > 1) {
newValue = newValue.replace(/(^0+)/, '') newValue = newValue.replace(/(^0+)/, '')
@ -605,8 +608,6 @@ export default function Estimate({}) {
let totVolKw = estimateContextState.totVolKw * 1000 let totVolKw = estimateContextState.totVolKw * 1000
let pkgTotPrice = parseFloat(pkgAsp?.replaceAll(',', '')) * totVolKw * 1000 let pkgTotPrice = parseFloat(pkgAsp?.replaceAll(',', '')) * totVolKw * 1000
// pkgAsp = formatNumberWithComma(parseFloat(pkgAsp).toFixed(2))
setEstimateContextState({ setEstimateContextState({
pkgAsp: pkgAsp, pkgAsp: pkgAsp,
pkgTotPrice: pkgTotPrice.toFixed(2), pkgTotPrice: pkgTotPrice.toFixed(2),
@ -687,6 +688,10 @@ export default function Estimate({}) {
// / // /
const onChangeDisplayItem = (itemId, dispOrder, index) => { const onChangeDisplayItem = (itemId, dispOrder, index) => {
//todo: YJSS swalFire
if (estimateContextState.estimateType === 'YJSS') {
return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
}
const param = { const param = {
itemId: itemId, itemId: itemId,
coldZoneFlg: estimateContextState?.coldRegionFlg, coldZoneFlg: estimateContextState?.coldRegionFlg,
@ -740,8 +745,6 @@ export default function Estimate({}) {
return { ...item, ...updates, saleTotPrice: '' } return { ...item, ...updates, saleTotPrice: '' }
} else { } else {
if (estimateContextState.estimateType === 'YJSS') { if (estimateContextState.estimateType === 'YJSS') {
// return { ...item, ...updates, salePrice: '', saleTotPrice: '' }
//
if (updates.pkgMaterialFlg === '1') { if (updates.pkgMaterialFlg === '1') {
return { ...item, ...updates, showSalePrice: updates.salePrice } return { ...item, ...updates, showSalePrice: updates.salePrice }
} else { } else {
@ -1272,7 +1275,7 @@ export default function Estimate({}) {
</th> </th>
<td colSpan={3}> <td colSpan={3}>
<div className="radio-wrap"> <div className="radio-wrap">
<div className="d-check-radio light mr10"> {/* <div className="d-check-radio light mr10">
<input <input
type="radio" type="radio"
name="estimateType" name="estimateType"
@ -1286,7 +1289,7 @@ export default function Estimate({}) {
}} }}
/> />
<label htmlFor="YJSS">{getMessage('estimate.detail.estimateType.yjss')}</label> <label htmlFor="YJSS">{getMessage('estimate.detail.estimateType.yjss')}</label>
</div> </div> */}
<div className="d-check-radio light"> <div className="d-check-radio light">
<input <input
type="radio" type="radio"
@ -1295,7 +1298,8 @@ export default function Estimate({}) {
value={'YJOD'} value={'YJOD'}
checked={estimateContextState?.estimateType === 'YJOD' ? true : false} checked={estimateContextState?.estimateType === 'YJOD' ? true : false}
onChange={(e) => { onChange={(e) => {
setHandlePricingFlag(true) //todo: YJSS
// setHandlePricingFlag(true)
setEstimateContextState({ estimateType: e.target.value }) setEstimateContextState({ estimateType: e.target.value })
}} }}
/> />
@ -1576,10 +1580,10 @@ export default function Estimate({}) {
</div> </div>
<div className="esimate-wrap"> <div className="esimate-wrap">
<div className="estimate-list-wrap one"> <div className="estimate-list-wrap one">
<div className="estimate-box"> {/* <div className="estimate-box">
<div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.totAmount')}</div> <div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.totAmount')}</div>
<div className="estimate-name blue">{convertNumberToPriceDecimal(estimateContextState?.totAmount)}</div> <div className="estimate-name blue">{convertNumberToPriceDecimal(estimateContextState?.totAmount)}</div>
</div> </div> */}
<div className="estimate-box"> <div className="estimate-box">
<div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.totVolKw')}</div> <div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.totVolKw')}</div>
<div className="estimate-name blue">{convertNumberToPriceDecimalToFixed(estimateContextState?.totVolKw, 2)}</div> <div className="estimate-name blue">{convertNumberToPriceDecimalToFixed(estimateContextState?.totVolKw, 2)}</div>
@ -1599,7 +1603,7 @@ export default function Estimate({}) {
</div> </div>
</div> </div>
{/* YJOD면 아래영역 숨김 */} {/* YJOD면 아래영역 숨김 */}
<div className="common-table bt-able" style={{ display: estimateContextState?.estimateType === 'YJSS' ? '' : 'none' }}> {/* <div className="common-table bt-able" style={{ display: estimateContextState?.estimateType === 'YJSS' ? '' : 'none' }}>
<table> <table>
<colgroup> <colgroup>
<col style={{ width: '160px' }} /> <col style={{ width: '160px' }} />
@ -1634,7 +1638,7 @@ export default function Estimate({}) {
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div> */}
{/* 제품정보 끝 */} {/* 제품정보 끝 */}
{/* 가격표시영역시작 */} {/* 가격표시영역시작 */}
<div className="estimate-product-option"> <div className="estimate-product-option">

View File

@ -2,7 +2,7 @@
import { useEffect, useState, useContext, useRef } from 'react' import { useEffect, useState, useContext, useRef } from 'react'
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import { useAxios } from '@/hooks/useAxios' import { useAxios } from '@/hooks/useAxios'
import Select, { components } from 'react-select' import Select from 'react-select'
import { SessionContext } from '@/app/SessionProvider' import { SessionContext } from '@/app/SessionProvider'
import { isEmptyArray, isObjectNotEmpty } from '@/util/common-utils' import { isEmptyArray, isObjectNotEmpty } from '@/util/common-utils'
import { useEstimateController } from '@/hooks/floorPlan/estimate/useEstimateController' import { useEstimateController } from '@/hooks/floorPlan/estimate/useEstimateController'
@ -11,7 +11,7 @@ export default function EstimateCopyPop({ planNo, setEstimateCopyPopupOpen }) {
const { getMessage } = useMessage() const { getMessage } = useMessage()
const { get } = useAxios() const { get } = useAxios()
const { handleEstimateCopy, estimateContextState } = useEstimateController(planNo) const { handleEstimateCopy, estimateContextState } = useEstimateController(planNo, true)
const { session } = useContext(SessionContext) const { session } = useContext(SessionContext)
@ -282,7 +282,6 @@ export default function EstimateCopyPop({ planNo, setEstimateCopyPopupOpen }) {
type="text" type="text"
className="input-light" className="input-light"
required required
// defaultValue={estimateContextState?.charger}
defaultValue={session?.userNm} defaultValue={session?.userNm}
onChange={(e) => { onChange={(e) => {
setCopyReceiveUser(e.target.value) setCopyReceiveUser(e.target.value)

View File

@ -354,6 +354,11 @@ export default function CanvasMenu(props) {
// //
const handleEstimateReset = () => { const handleEstimateReset = () => {
//todo: YJSS swalFire
if (estimateRecoilState.estimateType === 'YJSS') {
return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
}
swalFire({ swalFire({
text: getMessage('estimate.detail.reset.confirmMsg'), text: getMessage('estimate.detail.reset.confirmMsg'),
type: 'confirm', type: 'confirm',
@ -584,8 +589,6 @@ export default function CanvasMenu(props) {
></button> ></button>
{/*<button className="btn04" onClick={() => setShowCanvasSettingModal(true)}></button>*/} {/*<button className="btn04" onClick={() => setShowCanvasSettingModal(true)}></button>*/}
<button className="btn04" onClick={handlePopup}></button> <button className="btn04" onClick={handlePopup}></button>
<button className="btn05"></button>
<button className="btn06"></button>
</div> </div>
<div className="size-control"> <div className="size-control">
<button <button

View File

@ -178,7 +178,11 @@ export default function CircuitTrestleSetting({ id }) {
...params, ...params,
pcsItemList: getSelectedPcsItemList(), pcsItemList: getSelectedPcsItemList(),
}).then((res) => { }).then((res) => {
setTabNum(2) if (res?.result.resultCode === 'S' && res?.data) {
setTabNum(2)
} else {
swalFire({ text: getMessage('common.message.send.error') })
}
}) })
} else { } else {
swalFire({ swalFire({

View File

@ -56,9 +56,19 @@ export default function StepUp(props) {
// } // }
useEffect(() => { useEffect(() => {
console.log(allocationType)
if (allocationType === 'auto') { if (allocationType === 'auto') {
//
canvas
.getObjects()
.filter((obj) => obj.name === POLYGON_TYPE.MODULE)
.forEach((module) => {
module.circuit = null
module.circuitNumber = null
module.pcsItemId = null
})
canvas.renderAll()
// PCS // PCS
fetchAutoStepUpData() fetchAutoStepUpData()
} else { } else {

View File

@ -234,19 +234,38 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, set
<tr> <tr>
<th>{getMessage('modal.placement.initial.setting.roof.angle.setting')}</th> <th>{getMessage('modal.placement.initial.setting.roof.angle.setting')}</th>
<td> <td>
<div className="pop-form-radio"> <div className="pop-form-radio place">
{currentRoof && {currentRoof &&
roofAngleSetArray.map((item) => ( roofAngleSetArray.map((item, index) => (
<div className="d-check-radio pop" key={item.id}> <div className="outline-form">
<input <span>
type="radio" <div className="d-check-radio pop" key={item.id}>
id={item.id} <input
name={item.name} type="radio"
value={item.value} id={item.id}
checked={currentRoof?.roofAngleSet === item.value} name={item.name}
onChange={(e) => setCurrentRoof({ ...currentRoof, roofAngleSet: e.target.value })} value={item.value}
/> checked={currentRoof?.roofAngleSet === item.value}
<label htmlFor={item.id}>{getMessage(item.message)}</label> onChange={(e) => setCurrentRoof({ ...currentRoof, roofAngleSet: e.target.value })}
/>
<label htmlFor={item.id}>{getMessage(item.message)}</label>
</div>
</span>
<div className="input-grid mr5">
<input
type="number"
className="input-origin block"
defaultValue={4}
readOnly={currentRoof?.roofAngleSet !== item.value}
value={index === 0 ? currentRoof?.pitch : currentRoof?.angle}
onChange={(e) =>
index === 0
? setCurrentRoof({ ...currentRoof, pitch: e.target.value })
: setCurrentRoof({ ...currentRoof, angle: e.target.value })
}
/>
</div>
<span className="thin">{index === 0 ? '寸' : '度'}</span>
</div> </div>
))} ))}
</div> </div>

View File

@ -344,11 +344,9 @@ export default function StuffDetail() {
if (objectNo) { if (objectNo) {
setManagementState({}) setManagementState({})
setEditMode('EDIT') setEditMode('EDIT')
if (objectNo.substring(0, 1) !== 'T') { setIsGlobalLoading(true)
// ..
setIsFormValid(true)
}
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => { promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
setIsGlobalLoading(false)
if (res.status === 200) { if (res.status === 200) {
if (res?.data?.createSaleStoreId === 'T01') { if (res?.data?.createSaleStoreId === 'T01') {
if (session?.storeId !== 'T01') { if (session?.storeId !== 'T01') {
@ -362,6 +360,10 @@ export default function StuffDetail() {
} else if (res.data.surfaceType === 'Ⅱ') { } else if (res.data.surfaceType === 'Ⅱ') {
surfaceTypeValue = '2' surfaceTypeValue = '2'
} }
// 0
if (res.data.installHeight === '0') {
res.data.installHeight = ''
}
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue }) setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
} else { } else {
setIsGlobalLoading(false) setIsGlobalLoading(false)
@ -1022,8 +1024,6 @@ export default function StuffDetail() {
const _receiveUser = watch('receiveUser') const _receiveUser = watch('receiveUser')
//objectName: '', // //objectName: '', //
const _objectName = watch('objectName') const _objectName = watch('objectName')
// objectNameOmit: '', //
const _objectNameOmit = watch('objectNameOmit')
// saleStoreId: '', //1 ID // saleStoreId: '', //1 ID
const _saleStoreId = watch('saleStoreId') const _saleStoreId = watch('saleStoreId')
// 2 // 2
@ -1051,12 +1051,11 @@ export default function StuffDetail() {
if (!formData.receiveUser || formData.receiveUser.trim().length === 0) { if (!formData.receiveUser || formData.receiveUser.trim().length === 0) {
errors.receiveUser = true errors.receiveUser = true
} }
if (!formData.objectName || formData.objectName.trim().length === 0) { if (!formData.objectName || formData.objectName.trim().length === 0) {
errors.objectName = true errors.objectName = true
} }
if (!formData.objectNameOmit) {
errors.objectNameOmit = true
}
if (!formData.saleStoreId) { if (!formData.saleStoreId) {
errors.saleStoreId = true errors.saleStoreId = true
} }
@ -1102,9 +1101,7 @@ export default function StuffDetail() {
if (!formData.objectName || formData.objectName.trim().length === 0) { if (!formData.objectName || formData.objectName.trim().length === 0) {
errors.objectName = true errors.objectName = true
} }
if (!formData.objectNameOmit) {
errors.objectNameOmit = true
}
if (!formData.saleStoreId) { if (!formData.saleStoreId) {
errors.saleStoreId = true errors.saleStoreId = true
} }
@ -1144,7 +1141,6 @@ export default function StuffDetail() {
}, [ }, [
_receiveUser, _receiveUser,
_objectName, _objectName,
_objectNameOmit,
_saleStoreId, _saleStoreId,
_otherSaleStoreId, _otherSaleStoreId,
_zipNo, _zipNo,
@ -1165,7 +1161,7 @@ export default function StuffDetail() {
const onSearchDesignRequestPopOpen = () => { const onSearchDesignRequestPopOpen = () => {
const saleStoreId = form.watch('saleStoreId') const saleStoreId = form.watch('saleStoreId')
if (saleStoreId === '') { if (saleStoreId === '') {
swalFire({ text: getMessage('stuff.planReqPopup.error.message2'), type: 'alert' }) swalFire({ text: getMessage('stuff.planReqPopup.error.message2'), type: 'alert', icon: 'warning' })
} else { } else {
setShowDesignRequestButtonValid(true) setShowDesignRequestButtonValid(true)
} }
@ -1175,7 +1171,7 @@ export default function StuffDetail() {
const onSearchWindSpeedPopOpen = () => { const onSearchWindSpeedPopOpen = () => {
const prefName = form.watch('prefName') const prefName = form.watch('prefName')
if (prefName === '') { if (prefName === '') {
swalFire({ text: getMessage('stuff.windSelectPopup.error.message1'), type: 'alert' }) swalFire({ text: getMessage('stuff.windSelectPopup.error.message1'), type: 'alert', icon: 'warning' })
} else { } else {
setShowWindSpeedButtonValid(true) setShowWindSpeedButtonValid(true)
} }
@ -1203,54 +1199,10 @@ export default function StuffDetail() {
const formData = form.getValues() const formData = form.getValues()
let errors = {} let errors = {}
let fieldNm let fieldNm
//
if (!formData.receiveUser || formData.receiveUser.trim().length === 0) { //
fieldNm = getMessage('stuff.detail.receiveUser') if (!formData.installHeight) {
errors = fieldNm fieldNm = getMessage('stuff.detail.installHeight')
}
//
if (!formData.objectName || formData.objectName.trim().length === 0) {
fieldNm = getMessage('stuff.detail.objectStatusId')
errors = fieldNm
}
//
if (!formData.objectNameOmit) {
fieldNm = getMessage('stuff.detail.objectNameOmit')
errors = fieldNm
}
//1
if (!formData.saleStoreId) {
fieldNm = getMessage('stuff.detail.saleStoreId')
errors = fieldNm
}
//
if (!formData.zipNo) {
fieldNm = getMessage('stuff.detail.zipNo')
errors = fieldNm
}
//
if (!formData.address) {
fieldNm = getMessage('stuff.detail.address')
errors = fieldNm
}
//
if (!formData.prefId || formData.prefId === '0') {
fieldNm = getMessage('stuff.detail.prefId')
errors = fieldNm
}
//
if (!formData.areaId) {
fieldNm = getMessage('stuff.detail.areaId')
errors = fieldNm
}
//
if (!formData.standardWindSpeedId) {
fieldNm = getMessage('stuff.detail.standardWindSpeedId')
errors = fieldNm
}
//
if (!formData.verticalSnowCover) {
fieldNm = getMessage('stuff.detail.verticalSnowCover')
errors = fieldNm errors = fieldNm
} }
@ -1259,14 +1211,63 @@ export default function StuffDetail() {
fieldNm = getMessage('stuff.detail.surfaceType') fieldNm = getMessage('stuff.detail.surfaceType')
errors = fieldNm errors = fieldNm
} }
//
if (!formData.installHeight) { //
fieldNm = getMessage('stuff.detail.installHeight') if (!formData.verticalSnowCover) {
fieldNm = getMessage('stuff.detail.verticalSnowCover')
errors = fieldNm
}
//
if (!formData.standardWindSpeedId) {
fieldNm = getMessage('stuff.detail.standardWindSpeedId')
errors = fieldNm
}
//
if (!formData.areaId) {
fieldNm = getMessage('stuff.detail.areaId')
errors = fieldNm
}
//
if (!formData.address) {
fieldNm = getMessage('stuff.detail.address')
errors = fieldNm
}
//
if (!formData.prefId || formData.prefId === '0') {
fieldNm = getMessage('stuff.detail.prefId')
errors = fieldNm
}
//
if (!formData.zipNo) {
fieldNm = getMessage('stuff.detail.zipNo')
errors = fieldNm
}
//1
if (!formData.saleStoreId) {
fieldNm = getMessage('stuff.detail.saleStoreId')
errors = fieldNm
}
//
if (!formData.objectName || formData.objectName.trim().length === 0) {
fieldNm = getMessage('stuff.detail.objectStatusId')
errors = fieldNm
}
//
if (!formData.receiveUser || formData.receiveUser.trim().length === 0) {
fieldNm = getMessage('stuff.detail.receiveUser')
errors = fieldNm errors = fieldNm
} }
if (Object.keys(errors).length > 0) { if (Object.keys(errors).length > 0) {
return swalFire({ text: getMessage('stuff.detail.save.valierror3', [errors]), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.save.valierror3', [errors]), type: 'alert', icon: 'warning' })
} }
const apiUrl = '/api/object/save-object' const apiUrl = '/api/object/save-object'
@ -1306,10 +1307,10 @@ export default function StuffDetail() {
let height = params.installHeight let height = params.installHeight
if (snow === '0') { if (snow === '0') {
return swalFire({ text: getMessage('stuff.detail.save.valierror1'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.save.valierror1'), type: 'alert', icon: 'warning' })
} }
if (height === '0') { if (height === '0') {
return swalFire({ text: getMessage('stuff.detail.save.valierror2'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.save.valierror2'), type: 'alert', icon: 'warning' })
} }
if (managementState) { if (managementState) {
@ -1363,29 +1364,29 @@ export default function StuffDetail() {
delete params_sort.workName delete params_sort.workName
if (Object.entries(detail_sort).toString() === Object.entries(params_sort).toString()) { if (Object.entries(detail_sort).toString() === Object.entries(params_sort).toString()) {
return swalFire({ text: getMessage('stuff.detail.noChgData'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.noChgData'), type: 'alert', icon: 'warning' })
} }
} }
if (params?.receiveUser !== '') { if (params?.receiveUser !== '') {
if (params?.receiveUser.trim().length > 10) { if (params?.receiveUser.trim().length > 10) {
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
} }
} }
// 2 otherSaleStoreId // 2 otherSaleStoreId
if (session.storeLvl !== '1') { if (session.storeLvl !== '1') {
if (params.saleStoreLevel === '1') { if (params.saleStoreLevel === '1') {
return swalFire({ text: getMessage('stuff.detail.tempSave.message3'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.tempSave.message3'), type: 'alert', icon: 'warning' })
} }
} }
if (editMode === 'NEW') { if (editMode === 'NEW') {
setIsGlobalLoading(true)
await promisePost({ url: apiUrl, data: params }) await promisePost({ url: apiUrl, data: params })
.then((res) => { .then((res) => {
setIsGlobalLoading(true)
// //
setIsGlobalLoading(false)
if (res.status === 201) { if (res.status === 201) {
setIsGlobalLoading(false)
setFloorPlanObjectNo({ floorPlanObjectNo: res?.data?.objectNo }) setFloorPlanObjectNo({ floorPlanObjectNo: res?.data?.objectNo })
swalFire({ swalFire({
text: getMessage('stuff.detail.save'), text: getMessage('stuff.detail.save'),
@ -1397,17 +1398,16 @@ export default function StuffDetail() {
} }
}) })
.catch((error) => { .catch((error) => {
console.log('error::::::', error)
setIsGlobalLoading(false) setIsGlobalLoading(false)
console.log('error::::::', error)
}) })
} else { } else {
// PUT // PUT
setIsGlobalLoading(true)
await promisePut({ url: apiUrl, data: params }) await promisePut({ url: apiUrl, data: params })
.then((res) => { .then((res) => {
setIsGlobalLoading(true) setIsGlobalLoading(false)
if (res.status === 201) { if (res.status === 201) {
setIsGlobalLoading(false)
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo }) setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
swalFire({ swalFire({
text: getMessage('stuff.detail.save'), text: getMessage('stuff.detail.save'),
@ -1426,8 +1426,8 @@ export default function StuffDetail() {
} }
}) })
.catch((error) => { .catch((error) => {
console.log('error::::::', error)
setIsGlobalLoading(false) setIsGlobalLoading(false)
console.log('error::::::', error)
}) })
} }
} }
@ -1474,26 +1474,26 @@ export default function StuffDetail() {
if (session.storeLvl !== '1') { if (session.storeLvl !== '1') {
// 1 2 saleStoreLevel = 1 // 1 2 saleStoreLevel = 1
if (params.saleStoreLevel === '1') { if (params.saleStoreLevel === '1') {
return swalFire({ text: getMessage('stuff.detail.tempSave.message3'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.tempSave.message3'), type: 'alert', icon: 'warning' })
} }
} }
// //
if (params?.receiveUser !== '') { if (params?.receiveUser !== '') {
if (params?.receiveUser.trim().length > 10) { if (params?.receiveUser.trim().length > 10) {
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert' }) return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
} }
} }
const apiUrl = '/api/object/save-object' const apiUrl = '/api/object/save-object'
if (objectNo) { if (objectNo) {
setIsGlobalLoading(true)
await promisePut({ url: apiUrl, data: params }) await promisePut({ url: apiUrl, data: params })
.then((res) => { .then((res) => {
setIsGlobalLoading(true) setIsGlobalLoading(false)
if (res.status === 201) { if (res.status === 201) {
setIsGlobalLoading(false)
swalFire({ swalFire({
text: getMessage('stuff.detail.tempSave.message1'), text: getMessage('stuff.detail.tempSave.message0'),
type: 'alert', type: 'alert',
confirmFn: () => { confirmFn: () => {
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false }) router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
@ -1506,13 +1506,13 @@ export default function StuffDetail() {
console.log('error::::::', error) console.log('error::::::', error)
}) })
} else { } else {
setIsGlobalLoading(true)
await promisePost({ url: apiUrl, data: params }) await promisePost({ url: apiUrl, data: params })
.then((res) => { .then((res) => {
setIsGlobalLoading(true) setIsGlobalLoading(false)
if (res.status === 201) { if (res.status === 201) {
setIsGlobalLoading(false)
swalFire({ swalFire({
text: getMessage('stuff.detail.tempSave.message1'), text: getMessage('stuff.detail.tempSave.message0'),
type: 'alert', type: 'alert',
confirmFn: () => { confirmFn: () => {
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false }) router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
@ -1521,8 +1521,8 @@ export default function StuffDetail() {
} }
}) })
.catch((error) => { .catch((error) => {
console.log('error::::::', error)
setIsGlobalLoading(false) setIsGlobalLoading(false)
console.log('error::::::', error)
}) })
} }
} }
@ -1676,15 +1676,15 @@ export default function StuffDetail() {
{getMessage('stuff.detail.required')} {getMessage('stuff.detail.required')}
</div> </div>
<div className="left-unit-box"> <div className="left-unit-box">
{!isFormValid ? ( {/* {!isFormValid ? ( */}
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}> <Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')} {getMessage('stuff.detail.btn.tempSave')}
</Button> </Button>
) : ( {/* ) : ( */}
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}> <Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')} {getMessage('stuff.detail.btn.save')}
</Button> </Button>
)} {/* )} */}
<button <button
type="button" type="button"
className="btn-origin grey" className="btn-origin grey"
@ -2184,15 +2184,15 @@ export default function StuffDetail() {
</table> </table>
</div> </div>
<div className="sub-right-footer"> <div className="sub-right-footer">
{!isFormValid ? ( {/* {!isFormValid ? ( */}
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}> <Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')} {getMessage('stuff.detail.btn.tempSave')}
</Button> </Button>
) : ( {/* ) : ( */}
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}> <Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')} {getMessage('stuff.detail.btn.save')}
</Button> </Button>
)} {/* )} */}
<button <button
type="button" type="button"
className="btn-origin grey" className="btn-origin grey"
@ -2238,15 +2238,15 @@ export default function StuffDetail() {
) : ( ) : (
<> <>
<div className="left-unit-box"> <div className="left-unit-box">
{!isFormValid ? ( {/* {!isFormValid ? ( */}
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}> <Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')} {getMessage('stuff.detail.btn.tempSave')}
</Button> </Button>
) : ( {/* ) : ( */}
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}> <Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')} {getMessage('stuff.detail.btn.save')}
</Button> </Button>
)} {/* )} */}
<button <button
type="button" type="button"
className="btn-origin grey" className="btn-origin grey"
@ -2833,15 +2833,15 @@ export default function StuffDetail() {
) : ( ) : (
<> <>
<div className="sub-right-footer"> <div className="sub-right-footer">
{!isFormValid ? ( {/* {!isFormValid ? ( */}
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}> <Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')} {getMessage('stuff.detail.btn.tempSave')}
</Button> </Button>
) : ( {/* ) : ( */}
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}> <Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')} {getMessage('stuff.detail.btn.save')}
</Button> </Button>
)} {/* )} */}
<button <button
type="button" type="button"
className="btn-origin grey" className="btn-origin grey"

View File

@ -7,6 +7,7 @@ import { useRecoilValue } from 'recoil'
import FindAddressPopQGrid from './FindAddressPopQGrid' import FindAddressPopQGrid from './FindAddressPopQGrid'
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import { isNotEmptyArray } from '@/util/common-utils' import { isNotEmptyArray } from '@/util/common-utils'
import { useSwal } from '@/hooks/useSwal'
export default function FindAddressPop(props) { export default function FindAddressPop(props) {
const globalLocaleState = useRecoilValue(globalLocaleStore) const globalLocaleState = useRecoilValue(globalLocaleStore)
@ -19,7 +20,7 @@ export default function FindAddressPop(props) {
const [address1, setAddress1] = useState(null) const [address1, setAddress1] = useState(null)
const [address2, setAddress2] = useState(null) const [address2, setAddress2] = useState(null)
const [address3, setAddress3] = useState(null) const [address3, setAddress3] = useState(null)
const { swalFire } = useSwal()
const [gridProps, setGridProps] = useState({ const [gridProps, setGridProps] = useState({
gridData: [], gridData: [],
isPageable: false, isPageable: false,
@ -65,11 +66,11 @@ export default function FindAddressPop(props) {
if (isNotEmptyArray(res.results)) { if (isNotEmptyArray(res.results)) {
setGridProps({ ...gridProps, gridData: res.results }) setGridProps({ ...gridProps, gridData: res.results })
} else { } else {
alert(getMessage('stuff.addressPopup.error.message1')) swalFire({ text: getMessage('stuff.addressPopup.error.message1'), type: 'alert', icon: 'warning' })
setGridProps({ ...gridProps, gridData: [] }) setGridProps({ ...gridProps, gridData: [] })
} }
} else { } else {
alert(getMessage('stuff.addressPopup.error.message1')) swalFire({ text: getMessage('stuff.addressPopup.error.message1'), type: 'alert', icon: 'warning' })
setGridProps({ ...gridProps, gridData: [] }) setGridProps({ ...gridProps, gridData: [] })
} }
}) })
@ -77,7 +78,7 @@ export default function FindAddressPop(props) {
// //
const applyAddress = () => { const applyAddress = () => {
if (prefId == null) { if (prefId == null) {
alert(getMessage('stuff.addressPopup.error.message2')) swalFire({ text: getMessage('stuff.addressPopup.error.message2'), type: 'alert', icon: 'warning' })
} else { } else {
props.zipInfo({ props.zipInfo({
zipNo: zipNo, zipNo: zipNo,
@ -128,7 +129,7 @@ export default function FindAddressPop(props) {
setZipNo(event.data.zipcode) setZipNo(event.data.zipcode)
if (event.data.prefcode == null) { if (event.data.prefcode == null) {
return alert(getMessage('stuff.addressPopup.error.message2')) return swalFire({ text: getMessage('stuff.addressPopup.error.message2'), type: 'alert', icon: 'warning' })
} else { } else {
props.zipInfo({ props.zipInfo({
zipNo: event.data.zipcode, zipNo: event.data.zipcode,

View File

@ -9,11 +9,12 @@ import dayjs from 'dayjs'
import PlanRequestPopQGrid from './PlanRequestPopQGrid' import PlanRequestPopQGrid from './PlanRequestPopQGrid'
import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils' import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
import QPagination from '@/components/common/pagination/QPagination' import QPagination from '@/components/common/pagination/QPagination'
import { useSwal } from '@/hooks/useSwal'
export default function PlanRequestPop(props) { export default function PlanRequestPop(props) {
const [pageNo, setPageNo] = useState(1) // const [pageNo, setPageNo] = useState(1) //
const [pageSize, setPageSize] = useState(20) // const [pageSize, setPageSize] = useState(20) //
const [totalCount, setTotalCount] = useState(0) // const [totalCount, setTotalCount] = useState(0) //
const { swalFire } = useSwal()
const globalLocaleState = useRecoilValue(globalLocaleStore) const globalLocaleState = useRecoilValue(globalLocaleStore)
const [planReqObject, setPlanReqObject] = useState({}) const [planReqObject, setPlanReqObject] = useState({})
@ -214,7 +215,7 @@ export default function PlanRequestPop(props) {
// //
props.setShowDesignRequestButtonValid(false) props.setShowDesignRequestButtonValid(false)
} else { } else {
alert(getMessage('stuff.planReqPopup.error.message1')) swalFire({ text: getMessage('stuff.planReqPopup.error.message1'), type: 'alert', icon: 'warning' })
} }
} }

View File

@ -3,14 +3,16 @@ import { useMessage } from '@/hooks/useMessage'
import { useAxios } from '@/hooks/useAxios' import { useAxios } from '@/hooks/useAxios'
import { globalLocaleStore } from '@/store/localeAtom' import { globalLocaleStore } from '@/store/localeAtom'
import { useRecoilValue } from 'recoil' import { useRecoilValue } from 'recoil'
import { isEmptyArray, isNotEmptyArray } from '@/util/common-utils' import { isEmptyArray } from '@/util/common-utils'
import { useSwal } from '@/hooks/useSwal'
export default function WindSelectPop(props) { export default function WindSelectPop(props) {
const globalLocaleState = useRecoilValue(globalLocaleStore) const globalLocaleState = useRecoilValue(globalLocaleStore)
const { promiseGet } = useAxios(globalLocaleState) const { promiseGet } = useAxios(globalLocaleState)
const [windSpeedList, setWindSpeedList] = useState([]) const [windSpeedList, setWindSpeedList] = useState([])
const [windSpeed, setWindSpeed] = useState(null) const [windSpeed, setWindSpeed] = useState(null)
const { getMessage } = useMessage() const { getMessage } = useMessage()
const { swalFire } = useSwal()
// //
const handleChangeRadio = (e) => { const handleChangeRadio = (e) => {
setWindSpeed(e.target.value) setWindSpeed(e.target.value)
@ -19,7 +21,7 @@ export default function WindSelectPop(props) {
// //
const applyWindSpeed = () => { const applyWindSpeed = () => {
if (windSpeed == null) { if (windSpeed == null) {
alert(getMessage('stuff.windSelectPopup.error.message2')) swalFire({ text: getMessage('stuff.windSelectPopup.error.message2'), type: 'alert', icon: 'warning' })
} else { } else {
props.windSpeedInfo({ windSpeed: windSpeed }) props.windSpeedInfo({ windSpeed: windSpeed })

View File

@ -10,10 +10,10 @@ export const useCanvasMenu = () => {
const canvas = useRecoilValue(canvasState) const canvas = useRecoilValue(canvasState)
const { drawDirectionArrow } = usePolygon() const { drawDirectionArrow } = usePolygon()
useEffect(() => { /*useEffect(() => {
/* /!*
* 모듈,회로 구성을 벗어나면 방향 표시 초기화 필요 * 모듈,회로 구성을 벗어나면 방향 표시 초기화 필요
* */ * *!/
if (!canvas) return if (!canvas) return
if (![4, 5].includes(menuNumber)) { if (![4, 5].includes(menuNumber)) {
canvas canvas
@ -21,10 +21,10 @@ export const useCanvasMenu = () => {
.filter((obj) => obj.name === POLYGON_TYPE.ROOF) .filter((obj) => obj.name === POLYGON_TYPE.ROOF)
.forEach((obj) => { .forEach((obj) => {
obj.set('moduleCompass', null) obj.set('moduleCompass', null)
drawDirectionArrow(obj) // drawDirectionArrow(obj)
}) })
} }
}, [menuNumber]) }, [menuNumber])*/
return { return {
menuNumber, menuNumber,

View File

@ -333,9 +333,14 @@ export function useRoofFn() {
(obj) => /*obj !== roof && obj !== wall &&*/ obj.attributes?.roofId === roof.id || obj.parentId === roof.id || obj.parentId === wall?.id, (obj) => /*obj !== roof && obj !== wall &&*/ obj.attributes?.roofId === roof.id || obj.parentId === roof.id || obj.parentId === wall?.id,
) )
const auxilaryObject = canvas.getObjects().filter((obj) => obj.name === 'auxiliaryLine' && !obj.isAuxiliaryFixed)
allRoofObject.forEach((obj) => { allRoofObject.forEach((obj) => {
canvas.remove(obj) canvas.remove(obj)
}) })
auxilaryObject.forEach((obj) => {
canvas.remove(obj)
})
canvas.renderAll() canvas.renderAll()
resetPoints() resetPoints()

View File

@ -18,7 +18,7 @@ const updateItemInList = (itemList, dispOrder, updates) => {
return itemList.map((item) => (item.dispOrder === dispOrder ? { ...item, ...updates } : item)) return itemList.map((item) => (item.dispOrder === dispOrder ? { ...item, ...updates } : item))
} }
export const useEstimateController = (planNo) => { export const useEstimateController = (planNo, flag) => {
const { swalFire } = useSwal() const { swalFire } = useSwal()
const [fileList, setFileList] = useState([]) const [fileList, setFileList] = useState([])
const { setIsGlobalLoading } = useContext(QcastContext) const { setIsGlobalLoading } = useContext(QcastContext)
@ -42,7 +42,9 @@ export const useEstimateController = (planNo) => {
let recoilObjectNo = objectRecoil.floorPlanObjectNo ? objectRecoil.floorPlanObjectNo : searchParams.get('objectNo') let recoilObjectNo = objectRecoil.floorPlanObjectNo ? objectRecoil.floorPlanObjectNo : searchParams.get('objectNo')
if (recoilObjectNo && planNo) { if (recoilObjectNo && planNo) {
fetchSetting(recoilObjectNo, planNo) if (!flag) {
fetchSetting(recoilObjectNo, planNo)
}
} }
} }
}, []) }, [])
@ -160,6 +162,11 @@ export const useEstimateController = (planNo) => {
//견적서 저장 //견적서 저장
const handleEstimateSubmit = async () => { const handleEstimateSubmit = async () => {
//todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
if (estimateData.estimateType === 'YJSS') {
return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
}
//0. 필수체크 //0. 필수체크
let flag = true let flag = true
let originFileFlg = false let originFileFlg = false
@ -409,6 +416,10 @@ export const useEstimateController = (planNo) => {
* T01관리자 계정 1차판매점에게만 제공 * T01관리자 계정 1차판매점에게만 제공
*/ */
const handleEstimateCopy = async (sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId) => { const handleEstimateCopy = async (sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId) => {
//todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요
if (estimateData.estimateType === 'YJSS') {
return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
}
if (saleStoreId === '') { if (saleStoreId === '') {
return swalFire({ return swalFire({
text: getMessage('estimate.detail.productFeaturesPopup.requiredStoreId'), text: getMessage('estimate.detail.productFeaturesPopup.requiredStoreId'),

View File

@ -495,7 +495,7 @@ export function useModuleBasicSetting(tabNum) {
/** /**
* 스냅기능 * 스냅기능
*/ */
let snapDistance = 10 let snapDistance = 80
let cellSnapDistance = 20 let cellSnapDistance = 20
let intvHor = let intvHor =
@ -579,54 +579,54 @@ export function useModuleBasicSetting(tabNum) {
}) })
} }
// 위쪽 변에 스냅 // // 위쪽 변에 스냅
if (Math.abs(smallTop - trestleTop) < snapDistance) { // if (Math.abs(smallTop - trestleTop) < snapDistance) {
tempModule.top = trestleTop // tempModule.top = trestleTop
} // }
// 아래쪽 변에 스냅 // // 아래쪽 변에 스냅
if (Math.abs(smallTop + tempModule.height * tempModule.scaleY - (trestleTop + moduleSetupSurfaces[i].height)) < snapDistance) { // if (Math.abs(smallTop + tempModule.height * tempModule.scaleY - (trestleTop + moduleSetupSurfaces[i].height)) < snapDistance) {
tempModule.top = trestleTop + moduleSetupSurfaces[i].height - tempModule.height * tempModule.scaleY // tempModule.top = trestleTop + moduleSetupSurfaces[i].height - tempModule.height * tempModule.scaleY
} // }
// 왼쪽변에 스냅 // // 왼쪽변에 스냅
if (Math.abs(smallLeft - trestleLeft) < snapDistance) { // if (Math.abs(smallLeft - trestleLeft) < snapDistance) {
tempModule.left = trestleLeft // tempModule.left = trestleLeft
} // }
//오른쪽 변에 스냅 // //오른쪽 변에 스냅
if (Math.abs(smallRight - trestleRight) < snapDistance) { // if (Math.abs(smallRight - trestleRight) < snapDistance) {
tempModule.left = trestleRight - tempModule.width * tempModule.scaleX // tempModule.left = trestleRight - tempModule.width * tempModule.scaleX
} // }
if (flowDirection === 'south' || flowDirection === 'north') { // if (flowDirection === 'south' || flowDirection === 'north') {
// 모듈왼쪽이 세로중앙선에 붙게 스냅 // // 모듈왼쪽이 세로중앙선에 붙게 스냅
if (Math.abs(smallLeft - (trestleLeft + moduleSetupSurfaces[i].width / 2)) < snapDistance) { // if (Math.abs(smallLeft - (trestleLeft + moduleSetupSurfaces[i].width / 2)) < snapDistance) {
tempModule.left = trestleLeft + moduleSetupSurfaces[i].width / 2 // tempModule.left = trestleLeft + moduleSetupSurfaces[i].width / 2
} // }
// 모듈이 가운데가 세로중앙선에 붙게 스냅 // // 모듈이 가운데가 세로중앙선에 붙게 스냅
if (Math.abs(smallCenterX - (trestleLeft + moduleSetupSurfaces[i].width / 2)) < snapDistance) { // if (Math.abs(smallCenterX - (trestleLeft + moduleSetupSurfaces[i].width / 2)) < snapDistance) {
tempModule.left = trestleLeft + moduleSetupSurfaces[i].width / 2 - (tempModule.width * tempModule.scaleX) / 2 // tempModule.left = trestleLeft + moduleSetupSurfaces[i].width / 2 - (tempModule.width * tempModule.scaleX) / 2
} // }
// 모듈오른쪽이 세로중앙선에 붙게 스냅 // // 모듈오른쪽이 세로중앙선에 붙게 스냅
if (Math.abs(smallRight - (trestleLeft + moduleSetupSurfaces[i].width / 2)) < snapDistance) { // if (Math.abs(smallRight - (trestleLeft + moduleSetupSurfaces[i].width / 2)) < snapDistance) {
tempModule.left = trestleLeft + moduleSetupSurfaces[i].width / 2 - tempModule.width * tempModule.scaleX // tempModule.left = trestleLeft + moduleSetupSurfaces[i].width / 2 - tempModule.width * tempModule.scaleX
} // }
} else { // } else {
// 모듈이 가로중앙선에 스냅 // // 모듈이 가로중앙선에 스냅
if (Math.abs(smallTop + tempModule.height / 2 - bigCenterY) < snapDistance) { // if (Math.abs(smallTop + tempModule.height / 2 - bigCenterY) < snapDistance) {
tempModule.top = bigCenterY - tempModule.height / 2 // tempModule.top = bigCenterY - tempModule.height / 2
} // }
if (Math.abs(smallTop - (trestleTop + moduleSetupSurfaces[i].height / 2)) < snapDistance) { // if (Math.abs(smallTop - (trestleTop + moduleSetupSurfaces[i].height / 2)) < snapDistance) {
tempModule.top = trestleTop + moduleSetupSurfaces[i].height / 2 // tempModule.top = trestleTop + moduleSetupSurfaces[i].height / 2
} // }
// 모듈 밑면이 가로중앙선에 스냅 // // 모듈 밑면이 가로중앙선에 스냅
if (Math.abs(smallBottom - (trestleTop + moduleSetupSurfaces[i].height / 2)) < snapDistance) { // if (Math.abs(smallBottom - (trestleTop + moduleSetupSurfaces[i].height / 2)) < snapDistance) {
tempModule.top = trestleTop + moduleSetupSurfaces[i].height / 2 - tempModule.height * tempModule.scaleY // tempModule.top = trestleTop + moduleSetupSurfaces[i].height / 2 - tempModule.height * tempModule.scaleY
} // }
} // }
tempModule.setCoords() tempModule.setCoords()
canvas?.renderAll() canvas?.renderAll()
@ -677,9 +677,6 @@ export function useModuleBasicSetting(tabNum) {
if (!isIntersection) return if (!isIntersection) return
tempModule.setCoords() //좌표 재정렬 tempModule.setCoords() //좌표 재정렬
console.log('turf.booleanContains(turfPolygon, tempTurfModule)', turf.booleanContains(turfPolygon, tempTurfModule))
console.log('turf.booleanWithin(tempTurfModule, turfPolygon)', turf.booleanWithin(tempTurfModule, turfPolygon))
if (turf.booleanContains(turfPolygon, tempTurfModule) || turf.booleanWithin(tempTurfModule, turfPolygon)) { if (turf.booleanContains(turfPolygon, tempTurfModule) || turf.booleanWithin(tempTurfModule, turfPolygon)) {
//마우스 클릭시 set으로 해당 위치에 셀을 넣음 //마우스 클릭시 set으로 해당 위치에 셀을 넣음
const isOverlap = manualDrawModules.some((module) => turf.booleanOverlap(tempTurfModule, polygonToTurfPolygon(module))) //겹치는지 확인 const isOverlap = manualDrawModules.some((module) => turf.booleanOverlap(tempTurfModule, polygonToTurfPolygon(module))) //겹치는지 확인
@ -867,6 +864,8 @@ export function useModuleBasicSetting(tabNum) {
let startPoint = flowLines.bottom let startPoint = flowLines.bottom
const moduleArray = [] const moduleArray = []
console.log('flowLines', flowLines)
if (isCenter) { if (isCenter) {
//중앙배치일 경우에는 계산한다 //중앙배치일 경우에는 계산한다
if (flowLines.bottom.type === 'flat' && flowLines.left.type === 'flat' && flowLines.right.type === 'flat') { if (flowLines.bottom.type === 'flat' && flowLines.left.type === 'flat' && flowLines.right.type === 'flat') {
@ -1517,16 +1516,16 @@ export function useModuleBasicSetting(tabNum) {
const pointX2 = coords[2].x + ((coords[2].y - top) / (coords[2].y - coords[1].y)) * (coords[1].x - coords[2].x) const pointX2 = coords[2].x + ((coords[2].y - top) / (coords[2].y - coords[1].y)) * (coords[1].x - coords[2].x)
const pointY2 = top const pointY2 = top
// const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], { const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], {
// stroke: 'red', stroke: 'red',
// strokeWidth: 1, strokeWidth: 1,
// selectable: true, selectable: true,
// }) })
// console.log(`index ${index} : finalLine`, pointX1, pointY1, pointX2, pointY2) // console.log(`index ${index} : finalLine`, pointX1, pointY1, pointX2, pointY2)
// canvas?.add(finalLine) canvas?.add(finalLine)
// canvas?.renderAll() canvas?.renderAll()
let rtnObj let rtnObj
//평평하면 //평평하면
@ -1643,13 +1642,13 @@ export function useModuleBasicSetting(tabNum) {
const pointX2 = top const pointX2 = top
const pointY2 = coords[2].y + ((coords[2].x - top) / (coords[2].x - coords[1].x)) * (coords[1].y - coords[2].y) const pointY2 = coords[2].y + ((coords[2].x - top) / (coords[2].x - coords[1].x)) * (coords[1].y - coords[2].y)
// const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], { const finalLine = new QLine([pointX1, pointY1, pointX2, pointY2], {
// stroke: 'red', stroke: 'red',
// strokeWidth: 1, strokeWidth: 1,
// selectable: true, selectable: true,
// }) })
// canvas?.add(finalLine) canvas?.add(finalLine)
// canvas?.renderAll() canvas?.renderAll()
let rtnObj let rtnObj
//평평하면 //평평하면

View File

@ -89,6 +89,10 @@ export function usePlacementShapeDrawing(id) {
clear() clear()
}, [verticalHorizontalMode, points, adsorptionPointAddMode, adsorptionPointMode, adsorptionRange, interval, tempGridMode]) }, [verticalHorizontalMode, points, adsorptionPointAddMode, adsorptionPointMode, adsorptionRange, interval, tempGridMode])
useEffect(() => {
setPoints([])
}, [])
useEffect(() => { useEffect(() => {
arrow1Ref.current = arrow1 arrow1Ref.current = arrow1
}, [arrow1]) }, [arrow1])

View File

@ -1,7 +1,7 @@
'use client' 'use client'
import { useEffect } from 'react' import { useEffect } from 'react'
import { useRecoilState, useRecoilValue } from 'recoil' import { useRecoilState, useRecoilValue, useResetRecoilState } from 'recoil'
import { canvasState, globalPitchState } from '@/store/canvasAtom' import { canvasState, globalPitchState } from '@/store/canvasAtom'
import { MENU, POLYGON_TYPE } from '@/common/common' import { MENU, POLYGON_TYPE } from '@/common/common'
import { getIntersectionPoint } from '@/util/canvas-util' import { getIntersectionPoint } from '@/util/canvas-util'
@ -18,12 +18,14 @@ import { slopeSelector } from '@/store/commonAtom'
import { QLine } from '@/components/fabric/QLine' import { QLine } from '@/components/fabric/QLine'
import { useRoofFn } from '@/hooks/common/useRoofFn' import { useRoofFn } from '@/hooks/common/useRoofFn'
import { outerLinePointsState } from '@/store/outerLineAtom' import { outerLinePointsState } from '@/store/outerLineAtom'
import { placementShapeDrawingPointsState } from '@/store/placementShapeDrawingAtom'
export function useSurfaceShapeBatch({ isHidden, setIsHidden }) { export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
const { getMessage } = useMessage() const { getMessage } = useMessage()
const { drawDirectionArrow } = usePolygon() const { drawDirectionArrow } = usePolygon()
const lengthTextFont = useRecoilValue(fontSelector('lengthText')) const lengthTextFont = useRecoilValue(fontSelector('lengthText'))
const [points, setPoints] = useRecoilState(outerLinePointsState) const resetOuterLinePoints = useResetRecoilState(outerLinePointsState)
const resetPlacementShapeDrawingPoints = useResetRecoilState(placementShapeDrawingPointsState)
const canvas = useRecoilValue(canvasState) const canvas = useRecoilValue(canvasState)
const globalPitch = useRecoilValue(globalPitchState) const globalPitch = useRecoilValue(globalPitchState)
@ -692,7 +694,8 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) {
type: 'confirm', type: 'confirm',
confirmFn: () => { confirmFn: () => {
canvas.clear() canvas.clear()
setPoints([]) resetOuterLinePoints()
resetPlacementShapeDrawingPoints()
swalFire({ text: getMessage('plan.message.delete') }) swalFire({ text: getMessage('plan.message.delete') })
}, },
// denyFn: () => { // denyFn: () => {

View File

@ -15,6 +15,7 @@ import { useContext } from 'react'
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil' import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'
import { useMessage } from './useMessage' import { useMessage } from './useMessage'
import { useCanvasPopupStatusController } from './common/useCanvasPopupStatusController' import { useCanvasPopupStatusController } from './common/useCanvasPopupStatusController'
import Big from 'big.js'
export function useCircuitTrestle() { export function useCircuitTrestle() {
const [makers, setMakers] = useRecoilState(makersState) const [makers, setMakers] = useRecoilState(makersState)
@ -207,7 +208,7 @@ export function useCircuitTrestle() {
surface.modules.forEach((module) => { surface.modules.forEach((module) => {
if (!surfaceObjects[surface.id][module.moduleInfo.itemId]) { if (!surfaceObjects[surface.id][module.moduleInfo.itemId]) {
// 지붕면에 모듈 존재 여부 // 지붕면에 모듈 존재 여부
surfaceObjects[surface.id][module.moduleInfo.itemId] = 0 // 모듈 초기화 surfaceObjects[surface.id][module.moduleInfo.itemId] = new Big(0) // 모듈 초기화
} }
surfaceObjects[surface.id][module.moduleInfo.itemId]++ surfaceObjects[surface.id][module.moduleInfo.itemId]++
@ -224,10 +225,18 @@ export function useCircuitTrestle() {
if (!surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId]) { if (!surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId]) {
surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId] = 0 surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId] = 0
} }
surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId]++ surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId] = Big(
surfaceObjects[surface.id].circuits[module.circuitNumber].circuits.wpOut += +module.moduleInfo.wpOut surfaceObjects[surface.id].circuits[module.circuitNumber].circuits[module.moduleInfo.itemId],
surfaceObjects[surface.id].wpOut -= +module.moduleInfo.wpOut )
surfaceObjects[surface.id][module.moduleInfo.itemId]-- .plus(1)
.toNumber()
surfaceObjects[surface.id].circuits[module.circuitNumber].circuits.wpOut = Big(
surfaceObjects[surface.id].circuits[module.circuitNumber].circuits.wpOut,
)
.plus(+module.moduleInfo.wpOut)
.toNumber()
surfaceObjects[surface.id].wpOut = Big(surfaceObjects[surface.id].wpOut).minus(+module.moduleInfo.wpOut).toNumber()
surfaceObjects[surface.id][module.moduleInfo.itemId] = Big(surfaceObjects[surface.id][module.moduleInfo.itemId]).minus(1).toNumber()
} }
}) })
}) })
@ -236,7 +245,7 @@ export function useCircuitTrestle() {
let tempRow = { let tempRow = {
name: surfaceObjects[key].roofSurface, name: surfaceObjects[key].roofSurface,
circuit: surfaceObjects[key].circuit, circuit: surfaceObjects[key].circuit,
wpOut: parseFloat(surfaceObjects[key].wpOut / 1000), wpOut: parseFloat(Big(surfaceObjects[key].wpOut).div(1000).toNumber()),
} }
selectedModules.itemList.forEach((module) => { selectedModules.itemList.forEach((module) => {
tempRow[module.itemId] = surfaceObjects[key][module.itemId] tempRow[module.itemId] = surfaceObjects[key][module.itemId]
@ -247,7 +256,7 @@ export function useCircuitTrestle() {
let row = { let row = {
name: surfaceObjects[key].roofSurface, name: surfaceObjects[key].roofSurface,
circuit: surfaceObjects[key].circuits[circuit].circuit, circuit: surfaceObjects[key].circuits[circuit].circuit,
wpOut: parseFloat(surfaceObjects[key].circuits[circuit].circuits.wpOut / 1000), wpOut: parseFloat(Big(surfaceObjects[key].circuits[circuit].circuits.wpOut).div(1000).toNumber()),
} }
selectedModules.itemList.forEach((module) => { selectedModules.itemList.forEach((module) => {
row[module.itemId] = surfaceObjects[key].circuits[circuit].circuits[module.itemId] row[module.itemId] = surfaceObjects[key].circuits[circuit].circuits[module.itemId]
@ -255,14 +264,24 @@ export function useCircuitTrestle() {
tempRows.push(row) tempRows.push(row)
}) })
}) })
let ftWpOut = 0
tempRows.forEach((row) => {
ftWpOut = Big(ftWpOut).plus(+row.wpOut).toNumber()
})
const tempFooter = { const tempFooter = {
name: getMessage('modal.panel.batch.statistic.total'), name: getMessage('modal.panel.batch.statistic.total'),
circuit: '-', circuit: '-',
wpOut: tempRows.reduce((acc, row) => acc + row.wpOut, 0), wpOut: ftWpOut,
} }
selectedModules.itemList.forEach((module) => { selectedModules.itemList.forEach((module) => {
tempFooter[module.itemId] = tempRows.reduce((acc, row) => acc + (row[module.itemId] ? row[module.itemId] : 0), 0) let wpOut = 0
tempRows.forEach((row) => {
wpOut = Big(wpOut)
.plus(+row[module.itemId] ?? 0)
.toNumber()
})
tempFooter[module.itemId] = wpOut
}) })
canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE) canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE_SETUP_SURFACE)
setModuleStatistics({ header: tempHeader, rows: tempRows.filter((row) => row.wpOut !== 0), footer: tempFooter }) setModuleStatistics({ header: tempHeader, rows: tempRows.filter((row) => row.wpOut !== 0), footer: tempFooter })

View File

@ -695,7 +695,8 @@
"stuff.detail.remarks": "メモ", "stuff.detail.remarks": "メモ",
"stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください", "stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください",
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください", "stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
"stuff.detail.tempSave.message1": "一時保存されました。物件番号を取得するには、必須項目をすべて入力してください。", "stuff.detail.tempSave.message0": "一時保存されました. 商品番号を取得するには、保存ボタンを押してください.",
"stuff.detail.tempSave.message1": "一時保存されました. 物件番号を取得するには、必須項目をすべて入力してください.",
"stuff.detail.tempSave.message2": "担当者名は10桁以下で入力してください。", "stuff.detail.tempSave.message2": "担当者名は10桁以下で入力してください。",
"stuff.detail.tempSave.message3": "二次販売店を選択してください。", "stuff.detail.tempSave.message3": "二次販売店を選択してください。",
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?", "stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
@ -951,20 +952,21 @@
"estimate.detail.productFeaturesPopup.requiredStoreId": "一次販売店は必須です。", "estimate.detail.productFeaturesPopup.requiredStoreId": "一次販売店は必須です。",
"estimate.detail.productFeaturesPopup.requiredReceiveUser": "担当者は必須です。", "estimate.detail.productFeaturesPopup.requiredReceiveUser": "担当者は必須です。",
"estimate.detail.save.alertMsg": "保存されました。見積書で製品を変更すると、図面や回路には反映されません。", "estimate.detail.save.alertMsg": "保存されました。見積書で製品を変更すると、図面や回路には反映されません。",
"estimate.detail.copy.alertMsg": "コピーされました", "estimate.detail.copy.alertMsg": "コピーされました.",
"estimate.detail.save.requiredFileUpload": "ファイル添付が必須のアイテムがあります。ファイルを添付するか、後日添付をチェックしてください", "estimate.detail.save.requiredFileUpload": "ファイル添付が必須のアイテムがあります。ファイルを添付するか、後日添付をチェックしてください.",
"estimate.detail.save.requiredNorthArrangementFileUpload": "北面にモジュールを配置した場合、北面配置許可書を必ず添付する必要があります.", "estimate.detail.save.requiredNorthArrangementFileUpload": "北面にモジュールを配置した場合、北面配置許可書を必ず添付する必要があります.",
"estimate.detail.save.requiredItem": "製品は1つ以上登録する必要があります。", "estimate.detail.save.requiredItem": "製品は1つ以上登録する必要があります.",
"estimate.detail.save.requiredCharger": "担当者は必須です。", "estimate.detail.save.requiredCharger": "担当者は必須です.",
"estimate.detail.save.requiredObjectName": "案件名は必須です。", "estimate.detail.save.requiredObjectName": "案件名は必須です.",
"estimate.detail.save.requiredPkgAsp": "住宅pkg単価は0より大きい値を入力してください。", "estimate.detail.save.requiredPkgAsp": "住宅pkg単価は0より大きい値を入力してください.",
"estimate.detail.save.requiredEstimateDate": "見積日は必須です。", "estimate.detail.save.requiredEstimateDate": "見積日は必須です.",
"estimate.detail.save.requiredItemId": "製品を選択してください。", "estimate.detail.save.requiredItemId": "製品を選択してください.",
"estimate.detail.save.requiredAmount": "数量は0より大きい値を入力してください。", "estimate.detail.save.requiredAmount": "数量は0より大きい値を入力してください.",
"estimate.detail.save.requiredSalePrice": "単価は0より大きい値を入力してください。", "estimate.detail.save.requiredSalePrice": "単価は0より大きい値を入力してください.",
"estimate.detail.reset.alertMsg": "初期化されました。", "estimate.detail.save.requiredEstimateType": "注文分類を選択してください.",
"estimate.detail.reset.alertMsg": "初期化されました.",
"estimate.detail.reset.confirmMsg": "保存した見積情報が初期化され、最近保存された図面情報が反映されます。本当に初期化しますか?", "estimate.detail.reset.confirmMsg": "保存した見積情報が初期化され、最近保存された図面情報が反映されます。本当に初期化しますか?",
"estimate.detail.lock.alertMsg": "見積もりを[ロック]すると変更できません。 <br />見積もりを修正するには、ロックを解除してください", "estimate.detail.lock.alertMsg": "見積もりを[ロック]すると変更できません。 <br />見積もりを修正するには、ロックを解除してください.",
"estimate.detail.unlock.alertMsg": "[ロック解除]すると、見積書を編集できます。 <br />解除しますか?", "estimate.detail.unlock.alertMsg": "[ロック解除]すると、見積書を編集できます。 <br />解除しますか?",
"estimate.detail.unlock.confirmBtnName": "解放", "estimate.detail.unlock.confirmBtnName": "解放",
"estimate.detail.alert.delFile": "添付ファイルを完全に削除するには、[保存]ボタンをクリックしてください。", "estimate.detail.alert.delFile": "添付ファイルを完全に削除するには、[保存]ボタンをクリックしてください。",
@ -1016,5 +1018,6 @@
"not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.(JA)", "not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.(JA)",
"roof.is.not.selected": "지붕을 선택해주세요.(JA)", "roof.is.not.selected": "지붕을 선택해주세요.(JA)",
"module.delete.confirm": "パネルを削除して面入力に戻ります。正しいですか?\nはいを選択すると削除し、面入力に戻ります。\nいいえ」を選択すると、削除せずに現在の状態を維持します。", "module.delete.confirm": "パネルを削除して面入力に戻ります。正しいですか?\nはいを選択すると削除し、面入力に戻ります。\nいいえ」を選択すると、削除せずに現在の状態を維持します。",
"length.direction.is.required": "길이와 방향을 입력하세요.(JA)" "length.direction.is.required": "길이와 방향을 입력하세요.(JA)",
"canvas.infomation.text": "数字は [半角] 入力のみ可能です。"
} }

View File

@ -647,7 +647,7 @@
"stuff.gridData.tempObjectNo": "임시저장물건", "stuff.gridData.tempObjectNo": "임시저장물건",
"stuff.message.periodError": "최대1년 조회 가능합니다.", "stuff.message.periodError": "최대1년 조회 가능합니다.",
"stuff.addressPopup.title": "우편번호", "stuff.addressPopup.title": "우편번호",
"stuff.addressPopup.placeholder": "우편번호 7자리를 입력하세요.", "stuff.addressPopup.placeholder": "우편번호 7자리를 입력하세요.",
"stuff.addressPopup.error.message1": "등록된 우편번호에서 주소를 찾을 수 없습니다. 다시 입력해주세요.", "stuff.addressPopup.error.message1": "등록된 우편번호에서 주소를 찾을 수 없습니다. 다시 입력해주세요.",
"stuff.addressPopup.error.message2": "주소를 선택해주세요.", "stuff.addressPopup.error.message2": "주소를 선택해주세요.",
"stuff.addressPopup.gridHeader.address1": "도도부현", "stuff.addressPopup.gridHeader.address1": "도도부현",
@ -695,6 +695,7 @@
"stuff.detail.remarks": "메모", "stuff.detail.remarks": "메모",
"stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요", "stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요",
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 매뉴얼을 확인해주십시오", "stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 매뉴얼을 확인해주십시오",
"stuff.detail.tempSave.message0": "임시저장 되었습니다. 물건번호를 획득하려면 저장버튼을 눌러주십시오.",
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.", "stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
"stuff.detail.tempSave.message2": "담당자이름은 10자리 이하로 입력해 주십시오.", "stuff.detail.tempSave.message2": "담당자이름은 10자리 이하로 입력해 주십시오.",
"stuff.detail.tempSave.message3": "2차 판매점을 선택해주세요.", "stuff.detail.tempSave.message3": "2차 판매점을 선택해주세요.",
@ -963,6 +964,7 @@
"estimate.detail.save.requiredItemId": "제품을 선택해주세요.", "estimate.detail.save.requiredItemId": "제품을 선택해주세요.",
"estimate.detail.save.requiredAmount": "수량은 0보다 큰값을 입력해주세요.", "estimate.detail.save.requiredAmount": "수량은 0보다 큰값을 입력해주세요.",
"estimate.detail.save.requiredSalePrice": "단가는 0보다 큰값을 입력해주세요.", "estimate.detail.save.requiredSalePrice": "단가는 0보다 큰값을 입력해주세요.",
"estimate.detail.save.requiredEstimateType": "주문분류를 선택해주세요.",
"estimate.detail.reset.alertMsg": "초기화 되었습니다.", "estimate.detail.reset.alertMsg": "초기화 되었습니다.",
"estimate.detail.reset.confirmMsg": "수기 변경(저장)한 견적 정보가 초기화되고 최근 저장된 도면정보가 반영됩니다. 정말로 초기화하시겠습니까?", "estimate.detail.reset.confirmMsg": "수기 변경(저장)한 견적 정보가 초기화되고 최근 저장된 도면정보가 반영됩니다. 정말로 초기화하시겠습니까?",
"estimate.detail.lock.alertMsg": "견적서를 [잠금]하면 수정할 수 없습니다. <br />견적서를 수정하려면 잠금해제를 하십시오.", "estimate.detail.lock.alertMsg": "견적서를 [잠금]하면 수정할 수 없습니다. <br />견적서를 수정하려면 잠금해제를 하십시오.",
@ -1017,5 +1019,6 @@
"module.delete.confirm": "패널을 삭제하고 면입력으로 돌아갑니다. 맞습니까?\n[예]를 선택하면 삭제하고, 면 입력으로 돌아갑니다.\n[아니오]를 선택하면 삭제하지 않고 현재 상태를 유지합니다.", "module.delete.confirm": "패널을 삭제하고 면입력으로 돌아갑니다. 맞습니까?\n[예]를 선택하면 삭제하고, 면 입력으로 돌아갑니다.\n[아니오]를 선택하면 삭제하지 않고 현재 상태를 유지합니다.",
"not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.", "not.allocation.exist.module": "할당하지 않은 모듈이 있습니다.",
"roof.is.not.selected": "지붕을 선택해주세요.", "roof.is.not.selected": "지붕을 선택해주세요.",
"length.direction.is.required": "길이와 방향을 입력하세요." "length.direction.is.required": "길이와 방향을 입력하세요.",
"canvas.infomation.text": "숫자는 [반각]입력만 가능합니다."
} }

View File

@ -523,6 +523,17 @@ $alert-color: #101010;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
&.place{
gap: 15px;
.outline-form{
span{
width: fit-content;
}
.input-grid{
width: 80px;
}
}
}
} }
.placement-option{ .placement-option{
display: flex; display: flex;