- 손 고침 [저장] = 492 이전처럼 바로 저장(확인 창 없음 · 세션 초안 통째 비움 없음) · 평면 · B06 평면 패널 띠 걷음 - 추천 [적용] 확인 창 = 서버 저장분(구조물 · 관 저장 파일 · 추가 측점) 수 — 응답 route_reset.dropped 와 같은 셈 · 세션 초안 안 셈 · 종단 편집 수 뺌 - 안 쓰게 된 것 걷음: routeShapeChanged(TS) · draftShapeChanged · askRouteReset · ROUTE_RESET_BAND · pageRoutePlan · 띠 CSS - 추가 측점 저장분 받기 fetchSavedPlusStations 한 줄 - 시험: test_283_route_reset_confirm 고쳐 씀(걷음 소스 · 창 수 = 알림 수 · 관 저장 파일 없음 0) · 저장 헬퍼 셋 확인 창 가짜 걷음 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.6 KiB
TypeScript
34 lines
1.6 KiB
TypeScript
/* =============================================================================
|
|
* B05_Profile_UI_RouteReset.ts
|
|
* 노선 초기화 = 추천 [적용](요구 289 · 493-2) — 확인 창 글 몫.
|
|
*
|
|
* 지워질 수 = 서버 저장분(구조물 · 관 · 추가 측점) — 서버가 [적용]에서 지우는 것과 같음(응답
|
|
* `route_reset.dropped`) · 세션 초안은 안 셈 · 관 = 저장 파일이 없으면 0(응답 관은 자동 제안).
|
|
* 구조물 · 관 = 페이지 자료 줄(저장 · 적용 뒤 다시 받음) · 추가 측점 = 지금 받음.
|
|
* 손 고침 [저장]은 묻지 않음(보이는 화면 그대로 저장).
|
|
* 글 = `logic/B05_Profile_Route_Reset`.
|
|
* ========================================================================== */
|
|
|
|
import { pagePipes, pageStructures } from "../A00_Common/design/design_page_data";
|
|
import { fetchSavedPlusStations } from "./B05_Profile_Api_PlusStations";
|
|
import { routeResetConfirmText } from "./logic/B05_Profile_Route_Reset";
|
|
|
|
/** 추천 [적용] 확인 창 글 — 서버 저장분에서 지워질 수(못 받은 칸 = 0). */
|
|
export async function applyResetText(projectId: string): Promise<string> {
|
|
const [structures, pipes, plusStations] = await Promise.all([
|
|
pageStructures(projectId).then(
|
|
(list) => list.structures?.length ?? 0,
|
|
() => 0,
|
|
),
|
|
pagePipes(projectId).then(
|
|
(list) => (list.saved ? (list.pipe_points?.length ?? 0) : 0),
|
|
() => 0,
|
|
),
|
|
fetchSavedPlusStations(projectId).then(
|
|
(list) => list.length,
|
|
() => 0,
|
|
),
|
|
]);
|
|
return routeResetConfirmText({ structures, pipes, plusStations });
|
|
}
|