diff --git a/B05_Profile/B05_Profile_UI_ExpectedDraw.ts b/B05_Profile/B05_Profile_UI_ExpectedDraw.ts index 0adcb7599..afb37d986 100644 --- a/B05_Profile/B05_Profile_UI_ExpectedDraw.ts +++ b/B05_Profile/B05_Profile_UI_ExpectedDraw.ts @@ -49,7 +49,10 @@ const HELD = "예정노선 수정 중 — 「예정노선 수정」을 끈 뒤 [저장]합니다(켠 동안 고친 판은 끌 때 평면선에 들어감)."; /** `POST /route/follow` 응답 — GET `/route/plan` 칸 이름(626-2). */ -type FollowResponse = Pick; +type FollowResponse = Pick & { + /** 수정 전 곡선 수를 못 지켰을 때 안내 글(775-2) · 지켰으면 null. */ + curve_note?: string | null; +}; export interface ExpectedDrawParams { projectId: string; @@ -71,6 +74,8 @@ export interface ExpectedDrawParams { onHistory: () => void; /** 다시 추적한 평면 · 고친 예정노선(빈 = 받은 노선으로) — 편집기 한 걸음. */ onFollow: (plan: FlattenedPlan, expected: Vertex[]) => void; + /** 지금 편집기 곡선 수(저장 안 한 편집 포함) — 다시 추적이 지킬 곡선 수(775-2 `keep_curves`). */ + curveCount: () => number; } export interface ExpectedDraw { @@ -325,13 +330,17 @@ export function createExpectedDraw(params: ExpectedDrawParams): ExpectedDraw { try { const plan = await requestJson( `/projects/${params.projectId}/route/follow`, - { method: "POST", body: JSON.stringify({ points, crs: "tm" }) }, + { + method: "POST", + body: JSON.stringify({ points, crs: "tm", keep_curves: params.curveCount() || null }), + }, 60000, ); params.onFollow( flattenServerPlan(plan.nodes ?? [], plan.curves ?? [], plan.node_edits), expected, ); + if (plan.curve_note) showToast(plan.curve_note, "info"); return true; } catch (error) { showToast( diff --git a/B05_Profile/B05_Profile_UI_RouteEdit.ts b/B05_Profile/B05_Profile_UI_RouteEdit.ts index 2ee20b212..91900ee01 100644 --- a/B05_Profile/B05_Profile_UI_RouteEdit.ts +++ b/B05_Profile/B05_Profile_UI_RouteEdit.ts @@ -133,6 +133,7 @@ export async function mountRouteEditor( onOpen: () => ((picked = -1), syncCurveBar()), measuring: () => measureControls.mode(), // 켠 동안 재기 = D03 재기 겹(755-2) onHistory: () => historyControls.sync(), // 켠 동안 되돌리기 = 예정노선 판(755-1) + curveCount: () => curveInfo.length, // 수정 전 곡선 수(775-2) onFollow: (flat, line) => { const step = { ...flat, apexLock: [], picked: -1, expected: line }; initial.restoreTag(initial.followed(step)); // 지금 추천 = 예상노선 추적(758-1) · 걸음 사진에 실림