Merge remote-tracking branch 'origin/sub_laptop_8' into sub_laptop_3
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
import { pipeDiameterM } from "@util/common_util_culvert_sets";
|
||||
import { showToast } from "@ui/ui_template_elements";
|
||||
import type { DetailPipeInput } from "../B04_PreProcess/B04_PreProcess_Api_Fetch";
|
||||
import { PIPE_MATCH_M } from "../A00_Common/design/design_selection";
|
||||
import type { SectionDetailResponse } from "./B06_Section_Api_Fetch";
|
||||
import { applyBoxFormOptions, applyFordFormOptions } from "./B06_Section_UI_Page_Ford_Controls";
|
||||
import { revetWallSpec } from "./B06_Section_UI_Cross_Culvert_Const";
|
||||
@@ -39,7 +41,7 @@ export function applyPipeOptionsToCache(
|
||||
): void {
|
||||
const owner = ctx
|
||||
.detail()
|
||||
?.cross_sections.find((section) => Math.abs(section.chainage_m - chainageM) < 0.51);
|
||||
?.cross_sections.find((section) => Math.abs(section.chainage_m - chainageM) < PIPE_MATCH_M);
|
||||
if (!owner) return;
|
||||
// 세월교는 스펙 자리(`section.ford`)가 배수관과 달라 조정창 제어기로 보낸다 —
|
||||
// 로직은 그쪽 것을 쓰고 프론트만 폼 UI다(2026-08-30 사용자 확정).
|
||||
@@ -138,3 +140,22 @@ export function applyPipeOptionsToCache(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 조정창(기슭막이 조정값)이 정본인 칸 — 초안에서 되살리지 않는다. */
|
||||
const ADJUST_OWNED = /_revet_(height_m|form)$/;
|
||||
|
||||
/**
|
||||
* 관 초안 옵션을 **횡단 캐시에 다시 얹는다**(24-7a). 새로고침 뒤 캐시 상세는 저장분이라
|
||||
* 저장 전에 고친 월류 폭·관경 등이 폼·카드에서 옛 값으로 돌아간다 — 초안이 관 옵션의 정본이다.
|
||||
*/
|
||||
export function replayDraftPipeOptions(
|
||||
ctx: PipeOptionsContext,
|
||||
pipes: ReadonlyArray<DetailPipeInput> | null,
|
||||
): void {
|
||||
for (const pipe of pipes ?? []) {
|
||||
const patch = Object.fromEntries(
|
||||
Object.entries(pipe.options ?? {}).filter(([key]) => !ADJUST_OWNED.test(key)),
|
||||
);
|
||||
if (Object.keys(patch).length) applyPipeOptionsToCache(ctx, pipe.chainage_m, patch);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user