Compare commits
No commits in common. "8d91a78dee2659dc04a06419ec854b79a3decd51" and "1a2fa7bbf6f07377e4d40d3d3234bfa6129d5818" have entirely different histories.
8d91a78dee
...
1a2fa7bbf6
@ -294,13 +294,8 @@ export default function StuffDetail() {
|
|||||||
docDownButtonStyle = 'none'
|
docDownButtonStyle = 'none'
|
||||||
} else {
|
} else {
|
||||||
if (params?.data?.createSaleStoreId === 'T01' && session?.storeId !== 'T01') {
|
if (params?.data?.createSaleStoreId === 'T01' && session?.storeId !== 'T01') {
|
||||||
if(session?.storeId !== params?.data?.saleStoreId){
|
estimateDetailButtonStyle = 'none'
|
||||||
if(session?.storeId !== params?.data?.firstAgentId) {
|
|
||||||
estimateDetailButtonStyle = 'none'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params?.data?.tempFlg === '1' || !params?.data?.docNo) {
|
if (params?.data?.tempFlg === '1' || !params?.data?.docNo) {
|
||||||
docDownButtonStyle = 'none'
|
docDownButtonStyle = 'none'
|
||||||
}
|
}
|
||||||
@ -362,13 +357,7 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
if (res?.data?.createSaleStoreId === 'T01') {
|
if (res?.data?.createSaleStoreId === 'T01') {
|
||||||
if (session?.storeId !== 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
//T01 계정이 작성한 안건 중 해당 판매점 ID가 열람 가능한 것에 한합니다.
|
setShowButton('none')
|
||||||
if(session?.storeId !== res?.data?.saleStoreId){
|
|
||||||
if(session?.storeId !== res?.data?.firstAgentId) {
|
|
||||||
setShowButton('none')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isObjectNotEmpty(res.data)) {
|
if (isObjectNotEmpty(res.data)) {
|
||||||
@ -396,15 +385,7 @@ export default function StuffDetail() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (isNotEmptyArray(res.data.planList)) {
|
if (isNotEmptyArray(res.data.planList)) {
|
||||||
|
setPlanGridProps({ ...planGridProps, planGridData: res.data.planList })
|
||||||
const planGridData = res.data.planList.map(plan => ({
|
|
||||||
...plan,
|
|
||||||
createSaleStoreId: res.data.createSaleStoreId,
|
|
||||||
saleStoreId: res.data.saleStoreId,
|
|
||||||
firstAgentId: res.data.firstAgentId
|
|
||||||
}))
|
|
||||||
|
|
||||||
setPlanGridProps({ ...planGridProps, planGridData })
|
|
||||||
} else {
|
} else {
|
||||||
setPlanGridProps({ ...planGridProps, planGridData: [] })
|
setPlanGridProps({ ...planGridProps, planGridData: [] })
|
||||||
}
|
}
|
||||||
@ -1677,13 +1658,7 @@ export default function StuffDetail() {
|
|||||||
const getCellDoubleClicked = (params) => {
|
const getCellDoubleClicked = (params) => {
|
||||||
if (managementState?.createSaleStoreId === 'T01') {
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
if (session?.storeId !== 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
//T01 계정이 작성한 안건 중 해당 판매점 ID가 열람 가능한 것에 한합니다.
|
return false
|
||||||
if(session?.storeId !== managementState?.saleStoreId){
|
|
||||||
if(session?.storeId !== managementState?.firstAgentId) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1867,7 +1842,7 @@ export default function StuffDetail() {
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style={{ display: session?.storeLvl === '1' ? '' : 'none' }}>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="title">
|
<div className="title">
|
||||||
|
|||||||
@ -39,12 +39,7 @@ export default function StuffSubHeader({ type }) {
|
|||||||
if (isObjectNotEmpty(managementState)) {
|
if (isObjectNotEmpty(managementState)) {
|
||||||
if (managementState?.createSaleStoreId === 'T01') {
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
if (session?.storeId !== 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
//T01 계정이 작성한 안건 중 해당 판매점 ID가 열람 가능한 것에 한합니다.
|
setButtonStyle('none')
|
||||||
if(session?.storeId !== managementState?.saleStoreId){
|
|
||||||
if(session?.storeId !== managementState?.firstAgentId) {
|
|
||||||
setButtonStyle('none')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,13 +90,9 @@ export const useTrestle = () => {
|
|||||||
|
|
||||||
let rackInfos = []
|
let rackInfos = []
|
||||||
if (rack) {
|
if (rack) {
|
||||||
console.log('Original rack data:', rack)
|
|
||||||
rackInfos = Object.keys(rack).map((key) => {
|
rackInfos = Object.keys(rack).map((key) => {
|
||||||
return { key, value: rack[key] }
|
return { key, value: rack[key] }
|
||||||
})
|
})
|
||||||
console.log('Processed rackInfos:', rackInfos)
|
|
||||||
} else {
|
|
||||||
console.log('Rack is null or undefined')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 모듈들의 centerPoint들을 이용해 각 모듈의 정보(가장 아랫라인 모듈, 가장 윗라인 모듈, 접면, 반접면 등 계산)
|
// 모듈들의 centerPoint들을 이용해 각 모듈의 정보(가장 아랫라인 모듈, 가장 윗라인 모듈, 접면, 반접면 등 계산)
|
||||||
@ -455,16 +451,6 @@ export const useTrestle = () => {
|
|||||||
})?.value.racks
|
})?.value.racks
|
||||||
|
|
||||||
mostRowsModule = Math.max(leftRows, rightRows, centerRows, mostRowsModule)
|
mostRowsModule = Math.max(leftRows, rightRows, centerRows, mostRowsModule)
|
||||||
console.log('=== Debug rackInfos ===')
|
|
||||||
console.log('rackInfos:', rackInfos)
|
|
||||||
console.log('leftRowsInfo:', leftRowsInfo)
|
|
||||||
console.log('rightRowsInfo:', rightRowsInfo)
|
|
||||||
console.log('centerRowsInfo:', centerRowsInfo)
|
|
||||||
console.log('leftRacks:', leftRacks)
|
|
||||||
console.log('rightRacks:', rightRacks)
|
|
||||||
console.log('centerRacks:', centerRacks)
|
|
||||||
console.log('rackYn:', rackYn)
|
|
||||||
console.log('========================')
|
|
||||||
|
|
||||||
if (rackYn === 'Y') {
|
if (rackYn === 'Y') {
|
||||||
drawRacks(leftRacks, rackQty, rackIntvlPct, module, direction, 'L', rackYn)
|
drawRacks(leftRacks, rackQty, rackIntvlPct, module, direction, 'L', rackYn)
|
||||||
@ -1096,19 +1082,14 @@ export const useTrestle = () => {
|
|||||||
const drawRacks = (rackInfos, rackQty, rackIntvlPct, module, direction, l, rackYn) => {
|
const drawRacks = (rackInfos, rackQty, rackIntvlPct, module, direction, l, rackYn) => {
|
||||||
const { width, height, left, top, lastX, lastY, surfaceId } = module
|
const { width, height, left, top, lastX, lastY, surfaceId } = module
|
||||||
const surface = canvas.getObjects().find((obj) => obj.id === surfaceId)
|
const surface = canvas.getObjects().find((obj) => obj.id === surfaceId)
|
||||||
// if (!rackInfos) {
|
|
||||||
// const maxRows = surface.trestleDetail.moduleMaxRows
|
|
||||||
// const maxCols = surface.trestleDetail.moduleMaxCols
|
|
||||||
// const msg = `段数の上限は${maxRows}段です。 上限より上の段には設置できません`
|
|
||||||
// swalFire({ title: msg, type: 'alert' })
|
|
||||||
// throw new Error('rackInfos is null')
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!rackInfos) {
|
if (!rackInfos) {
|
||||||
const msg = '該当モジュールタイプに関するラック情報がありません。'
|
const maxRows = surface.trestleDetail.moduleMaxRows
|
||||||
|
const maxCols = surface.trestleDetail.moduleMaxCols
|
||||||
|
const msg = `段数の上限は${maxRows}段です。 上限より上の段には設置できません`
|
||||||
swalFire({ title: msg, type: 'alert' })
|
swalFire({ title: msg, type: 'alert' })
|
||||||
return
|
throw new Error('rackInfos is null')
|
||||||
}
|
}
|
||||||
|
|
||||||
const roof = canvas.getObjects().find((obj) => obj.id === surface.parentId)
|
const roof = canvas.getObjects().find((obj) => obj.id === surface.parentId)
|
||||||
const degree = getDegreeByChon(roof.roofMaterial.pitch)
|
const degree = getDegreeByChon(roof.roofMaterial.pitch)
|
||||||
rackIntvlPct = rackIntvlPct === 0 ? 1 : rackIntvlPct // 0인 경우 1로 변경
|
rackIntvlPct = rackIntvlPct === 0 ? 1 : rackIntvlPct // 0인 경우 1로 변경
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user