feat(393-2): B05 우측 「횡단」 · 「이전 횡단」 판 = B06 횡단 카드 읽기 전용 — 구조물 · 포장 · 면적 · 축 · 단면 사본(B06 고름 · 줌 기억 안 건드림) · 정본만 읽는 제어기 export

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWh5wNNycMkbwMpACz1rte
This commit is contained in:
2026-10-17 17:30:03 +09:00
co-authored by Claude Opus 5.5
parent dec208f11a
commit a3dd0a1cf1
8 changed files with 244 additions and 13 deletions
+11
View File
@@ -258,6 +258,17 @@ export function invalidateSectionDetail(projectId: string, routeId?: number): vo
}
}
/** 받아 둔 상세 중 노선 번호가 가장 큰 것(최신) — 노선 번호를 모르는 쪽(B05 평면 횡단 판 · 393-2). */
export function peekSectionDetail(projectId: string): SectionDetailResponse | null {
const prefix = `${projectId}:`;
let best: { routeId: number; detail: SectionDetailResponse } | null = null;
for (const [key, detail] of cache) {
const routeId = Number(key.slice(prefix.length));
if (key.startsWith(prefix) && (!best || routeId > best.routeId)) best = { routeId, detail };
}
return best?.detail ?? null;
}
/**
* 캐시에 얹힌 **사용자 수정분**을 저장 payload로 뽑는다(2026-08-24 사용자 확정 흐름).
*
+4 -4
View File
@@ -42,8 +42,8 @@ function storedWallAdjust(section: CrossSection, role: string): WallAdjust {
return stored ? { ...ZERO_ADJUST, ...(stored as Partial<WallAdjust>) } : { ...ZERO_ADJUST };
}
/* 정본만 읽는 조작값 — 편집하지 않으므로 되받기·토스트는 빈 동작이다. */
const revetOffset: RevetOffsetControl = {
/* 정본만 읽는 조작값 — 편집하지 않으므로 되받기·토스트는 빈 동작이다(B05 평면 횡단 판도 씀 · 393-2). */
export const revetOffset: RevetOffsetControl = {
adjustFor: (section, role) => storedWallAdjust(section, role),
storedAdjustFor: (section, role) =>
section.design?.revet_adjust?.[role] ? storedWallAdjust(section, role) : null,
@@ -55,7 +55,7 @@ const revetOffset: RevetOffsetControl = {
reset: () => undefined,
};
const extraWalls: ExtraWallControl = {
export const extraWalls: ExtraWallControl = {
countFor: (section, side = "outlet") => section.design?.extra_wall_counts?.[side] ?? 0,
setCount: () => undefined,
equalize: () => undefined,
@@ -63,7 +63,7 @@ const extraWalls: ExtraWallControl = {
syncCount: () => undefined,
};
const inletStructure: InletStructureControl = {
export const inletStructure: InletStructureControl = {
valueFor: (section) => section.design?.inlet_structure ?? "auto",
adjustFor: (section) => ({ ...DEFAULT_BASIN_ADJUST, ...(section.design?.basin_adjust ?? {}) }),
set: () => undefined,