feat(bearing): 받침 종류·용량 as a text input (default 탄성받침)
- PierInput.bearingType: text, absent = 탄성받침. Tracked for changes, so it can be reverted. Saved in the project; no rule yet, so it does not change the model. - Shown on the ② bearing card above the 공통 규칙. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b6e7f36091
commit
d77f2bfd17
4 files changed
+26
-2
No files matched your search
+2
-1
@@ -23,7 +23,7 @@ export const EDITABLE_FIELDS = [
|
||||
] as const;
|
||||
|
||||
/** Inputs tracked for overrides and pending changes: the numeric cards plus 열별 본수 (an array, compared by value). */
|
||||
export const TRACKED_KEYS = [...EDITABLE_FIELDS.map((f) => f.key), 'pileRows', 'groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl', 'scourDepthM', 'highWaterEl', 'lowWaterEl', 'strataRows'] as const;
|
||||
export const TRACKED_KEYS = [...EDITABLE_FIELDS.map((f) => f.key), 'pileRows', 'groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl', 'scourDepthM', 'highWaterEl', 'lowWaterEl', 'strataRows', 'bearingType'] as const;
|
||||
|
||||
export type EditableKey = (typeof TRACKED_KEYS)[number];
|
||||
|
||||
@@ -51,6 +51,7 @@ export const FIELD_LABELS: Record<EditableKey, string> = {
|
||||
scourDepthM: '세굴 깊이',
|
||||
highWaterEl: '고조위 HWL',
|
||||
lowWaterEl: '저조위 LWL',
|
||||
bearingType: '받침 종류·용량',
|
||||
strataRows: '지층 행',
|
||||
};
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ export interface PierInput {
|
||||
/** 해상 (승인 2026-10-26): 고조위 HWL and 저조위 LWL (m, MSL datum). The groundEl is the 해저면 EL for 해상. */
|
||||
highWaterEl?: number;
|
||||
lowWaterEl?: number;
|
||||
/** 받침 종류·용량 as text (승인 2026-10-26). Absent = 탄성받침 (the default). */
|
||||
bearingType?: string;
|
||||
strataRows?: StrataRow[];
|
||||
}
|
||||
|
||||
|
||||
+15
-1
@@ -76,7 +76,7 @@ const CRS = '국토좌표계 (x = 동, y = 북)';
|
||||
|
||||
/** 시안 ② 부재 목록 (spec §5.2). `keys` are the inputs that exist today; the rest show values only. */
|
||||
const MEMBERS: { id: MemberId; label: string; keys: EditableKey[]; note: string }[] = [
|
||||
{ id: 'bearing', label: '교량받침·받침블럭·솔플레이트', keys: [], note: '받침 상세(C3)는 Q16 결정 후 추가합니다. 지금은 표시만 합니다.' },
|
||||
{ id: 'bearing', label: '교량받침·받침블럭·솔플레이트', keys: ['bearingType'], note: '받침 상세(C3)는 Q16 결정 후 추가합니다. 지금은 표시만 합니다.' },
|
||||
{ id: 'coping', label: '코핑', keys: ['copingWidthMm', 'copingLengthMm', 'copingH1Mm', 'copingH2Mm', 'levelWidthMm'], note: '폭, 길이, 끝단 높이 h1, 테이퍼 높이 h2, Level 폭을 입력합니다. 계단 위치·단차선 입력은 다음 단계에서 추가합니다.' },
|
||||
{ id: 'column', label: '기둥', keys: ['columnDiameterMm'], note: '기둥 직경 D를 입력합니다 (1200–3000 mm, 50 mm 단위). 높이와 위치는 계산값입니다.' },
|
||||
{ id: 'footing', label: '확대기초 · 말뚝', keys: ['footingLengthMm', 'footingWidthMm', 'footingHeightMm', 'blindingMarginMm', 'blindingThicknessMm', 'pileLengthMm'], note: '확대기초 치수, 비림, 말뚝 길이와 규격을 입력합니다. 규칙 미정 항목(모따기, 경사, 복합 말뚝)은 다음 단계에서 추가합니다.' },
|
||||
@@ -1762,6 +1762,20 @@ function renderBearingRef(box: HTMLDivElement, pier: Pier): void {
|
||||
const m = pier.model;
|
||||
const wrap = el('div', undefined, 'bearing-ref');
|
||||
renderBearingBasis(wrap, pier);
|
||||
// 받침 종류·용량 (승인 2026-10-26: 글자 입력, 기본 탄성받침). Saved in the project; no rule yet, so it does not change the model.
|
||||
wrap.appendChild(el('p', '받침 종류·용량 (글자 입력 · 기본 탄성받침)', 'lbl'));
|
||||
const typeInput = el('input');
|
||||
typeInput.type = 'text';
|
||||
typeInput.id = 'bearing-type';
|
||||
typeInput.value = pier.draft.bearingType ?? '탄성받침';
|
||||
typeInput.addEventListener('change', () => {
|
||||
const v = typeInput.value.trim();
|
||||
const p = state.piers.find((q) => q.input.name === pier.input.name);
|
||||
if (!p) return;
|
||||
p.draft = { ...p.draft, bearingType: v === '' ? undefined : v };
|
||||
renderAll();
|
||||
});
|
||||
wrap.appendChild(typeInput);
|
||||
wrap.appendChild(el('p', '공통 규칙 (입력 · 기본값 = 도면값)', 'lbl'));
|
||||
const rules: [keyof BearingRules, string][] = [['h2', '모르타르 h2 (mm)'], ['h3', '받침 높이 h3 (mm)'], ['T', '솔플레이트 중심 T (mm)'], ['margin', '솔플 여유 (mm)']];
|
||||
const grid = el('div', undefined, 'edit-row');
|
||||
|
||||
@@ -249,3 +249,10 @@ describe('해상 (승인 2026-10-26: MSL 기준, 고조위·저조위 두 개,
|
||||
expect(svg).toContain('해저면 EL 28.931');
|
||||
});
|
||||
});
|
||||
|
||||
describe('받침 종류·용량 (글자 입력)', () => {
|
||||
it('is tracked as a change, so it can be reverted to the default', () => {
|
||||
const a = withGround({});
|
||||
expect(changedKeys(a, { ...a, bearingType: '고무받침' })).toEqual(['bearingType']);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user