[1423] 설계가져오기 T01 전용 + 2차점 강제 select 반영 — No data/네트워크 에러 분리 + vExt cascade 평행이동 #885

Merged
ysCha merged 1 commits from dev into dev-deploy 2026-06-05 11:27:53 +09:00
4 changed files with 73 additions and 44 deletions
Showing only changes of commit ddf7cb9f13 - Show all commits

View File

@ -1082,39 +1082,49 @@ export default function StuffDetail() {
return
}
// T01 / 1 user + 2 ID: firstAgent ( )
get({ url: `/api/object/saleStore/${info.saleStoreId}/firstAgent` }).then((res) => {
logger.debug('[PLANREQ-DEBUG] firstAgent result', { firstAgentId: res?.firstAgentId })
if (!res?.firstAgentId) {
swalFire({
title: getMessage('stuff.detail.planReq.message.notMatch'),
type: 'alert',
icon: 'warning',
})
return
}
// [PLANREQ-FORCE-SELECT 2026-06-05] T01 / 1 user + 2 ID
// + 2 + selected
// 1 (firstAgent) 1
// 'No data' (4xx + message) ,
const applyOtherSaleStore = () => {
applyFields()
setOtherSaleStoreList((prev) => {
const exists = prev.some((o) => o.saleStoreId === info.saleStoreId)
return exists ? prev : [...prev, { saleStoreId: info.saleStoreId, saleStoreName: info.saleStoreName }]
})
setOtherSelOptions(info.saleStoreId)
form.setValue('otherSaleStoreId', info.saleStoreId)
form.setValue('otherSaleStoreName', info.saleStoreName)
form.setValue('otherSaleStoreLevel', info.saleStoreLevel)
const firstAgent = { saleStoreId: res.firstAgentId, saleStoreName: res.firstAgentName }
setSaleStoreList((prev) => {
const exists = prev.some((s) => s.saleStoreId === res.firstAgentId)
return exists ? prev : [...prev, firstAgent]
})
setShowSaleStoreList((prev) => {
const exists = prev.some((s) => s.saleStoreId === res.firstAgentId)
return exists ? prev : [...prev, firstAgent]
})
setSelOptions(res.firstAgentId)
form.setValue('saleStoreId', res.firstAgentId)
form.setValue('saleStoreName', res.firstAgentName)
form.setValue('saleStoreLevel', '1')
}).catch(() => {
// +
}
get({ url: `/api/object/saleStore/${info.saleStoreId}/firstAgent` }).then((res) => {
logger.debug('[PLANREQ-DEBUG] firstAgent result', { firstAgentId: res?.firstAgentId })
applyOtherSaleStore()
if (res?.firstAgentId) {
const firstAgent = { saleStoreId: res.firstAgentId, saleStoreName: res.firstAgentName }
setSaleStoreList((prev) => {
const exists = prev.some((s) => s.saleStoreId === res.firstAgentId)
return exists ? prev : [...prev, firstAgent]
})
setShowSaleStoreList((prev) => {
const exists = prev.some((s) => s.saleStoreId === res.firstAgentId)
return exists ? prev : [...prev, firstAgent]
})
setSelOptions(res.firstAgentId)
form.setValue('saleStoreId', res.firstAgentId)
form.setValue('saleStoreName', res.firstAgentName)
form.setValue('saleStoreLevel', '1')
}
}).catch((error) => {
// 'No data' 1 2 +select
const message = error?.response?.data?.message
if (message === 'No data') {
applyOtherSaleStore()
return
}
// /
swalFire({
title: getMessage('stuff.detail.planReq.message.notMatch'),
title: getMessage('stuff.detail.planReq.message.networkError'),
type: 'alert',
icon: 'warning',
})
@ -1878,16 +1888,18 @@ export default function StuffDetail() {
)) ||
null}
</div>
<button
type="button"
className="btn-origin grey"
onClick={() => {
onSearchDesignRequestPopOpen()
}}
style={{ display: showButton }}
>
{getMessage('stuff.planReqPopup.title')}
</button>
{session?.storeId === 'T01' && (
<button
type="button"
className="btn-origin grey"
onClick={() => {
onSearchDesignRequestPopOpen()
}}
style={{ display: showButton }}
>
{getMessage('stuff.planReqPopup.title')}
</button>
)}
</div>
</td>
</tr>
@ -2468,7 +2480,7 @@ export default function StuffDetail() {
></button>
) : null}
</div>
{managementState?.tempFlg === '1' ? (
{managementState?.tempFlg === '1' && session?.storeId === 'T01' ? (
<>
<button
type="button"

View File

@ -810,6 +810,7 @@
"stuff.detail.tempSave.message3": "二次販売店を選択してください。",
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
"stuff.detail.planReq.message.notMatch": "設計依頼の販売店情報が一致しないため、インポートできません。",
"stuff.detail.planReq.message.networkError": "設計依頼情報の照会中にネットワークエラーが発生しました。しばらくしてから再度お試しください。",
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
"stuff.detail.planList.title": "プランリスト",
"stuff.detail.planList.cnt": "全体",

View File

@ -810,6 +810,7 @@
"stuff.detail.tempSave.message3": "2차 판매점을 선택해주세요.",
"stuff.detail.confirm.message1": "판매점 정보를 변경하면 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
"stuff.detail.planReq.message.notMatch": "설계의뢰의 판매점 정보가 일치하지 않아 가져올 수 없습니다.",
"stuff.detail.planReq.message.networkError": "설계의뢰 정보 조회 중 네트워크 오류가 발생했습니다. 잠시 후 다시 시도해주세요.",
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
"stuff.detail.planList.title": "플랜목록",
"stuff.detail.planList.cnt": "전체",

View File

@ -210,13 +210,28 @@ export const applyKerabOffsetSurgical = (canvas, target, newOffset) => {
for (const other of cascadeTargets) {
if (!other || other === il) continue
let moved = false
if (pointOnOldSeg(other.x1, other.y1)) {
other.set({ x1: other.x1 + dxVExt, y1: other.y1 + dyVExt })
moved = true
}
if (pointOnOldSeg(other.x2, other.y2)) {
other.set({ x2: other.x2 + dxVExt, y2: other.y2 + dyVExt })
const hit1 = pointOnOldSeg(other.x1, other.y1)
const hit2 = pointOnOldSeg(other.x2, other.y2)
// [KERAB-VALLEY-EXT-PARALLEL 2026-06-05] vExt(골짜기 확장라인)는 self-extension
// 수직/수평 라인이라 한 끝만 cascade 로 끌면 대각선이 된다 (사용자 룰: 대각선은 hip뿐).
// split 된 vExt 세그먼트는 한 끝만 옛 segment 에 닿아도 양 끝을 같은 변위로 평행이동.
if (other.lineName === 'kerabPatternValleyExt' && (hit1 || hit2)) {
other.set({
x1: other.x1 + dxVExt,
y1: other.y1 + dyVExt,
x2: other.x2 + dxVExt,
y2: other.y2 + dyVExt,
})
moved = true
} else {
if (hit1) {
other.set({ x1: other.x1 + dxVExt, y1: other.y1 + dyVExt })
moved = true
}
if (hit2) {
other.set({ x2: other.x2 + dxVExt, y2: other.y2 + dyVExt })
moved = true
}
}
if (moved) {
if (typeof other.setCoords === 'function') other.setCoords()