Merge pull request '[1423] 설계가져오기 T01 전용 + 2차점 강제 select 반영 — No data/네트워크 에러 분리 + vExt cascade 평행이동' (#885) from dev into dev-deploy
Reviewed-on: #885
This commit is contained in:
commit
3d68add0bb
@ -1067,22 +1067,25 @@ 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)
|
||||
}
|
||||
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)
|
||||
@ -1096,10 +1099,17 @@ export default function StuffDetail() {
|
||||
form.setValue('saleStoreId', res.firstAgentId)
|
||||
form.setValue('saleStoreName', res.firstAgentName)
|
||||
form.setValue('saleStoreLevel', '1')
|
||||
}).catch(() => {
|
||||
// 매핑 실패 — 아무것도 적용 안 함 + 사용자에게 알림
|
||||
}
|
||||
}).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',
|
||||
})
|
||||
@ -1861,6 +1871,7 @@ export default function StuffDetail() {
|
||||
)) ||
|
||||
null}
|
||||
</div>
|
||||
{session?.storeId === 'T01' && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn-origin grey"
|
||||
@ -1871,6 +1882,7 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.planReqPopup.title')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -2451,7 +2463,7 @@ export default function StuffDetail() {
|
||||
></button>
|
||||
) : null}
|
||||
</div>
|
||||
{managementState?.tempFlg === '1' ? (
|
||||
{managementState?.tempFlg === '1' && session?.storeId === 'T01' ? (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@ -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": "全体",
|
||||
|
||||
@ -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": "전체",
|
||||
|
||||
@ -210,14 +210,29 @@ 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)) {
|
||||
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 (pointOnOldSeg(other.x2, other.y2)) {
|
||||
if (hit2) {
|
||||
other.set({ x2: other.x2 + dxVExt, y2: other.y2 + dyVExt })
|
||||
moved = true
|
||||
}
|
||||
}
|
||||
if (moved) {
|
||||
if (typeof other.setCoords === 'function') other.setCoords()
|
||||
logger.log(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user