refactor(abut): 교량받침 카드에서 받침 종류 · 용량 입력 삭제
- 받침 종류 · 용량 입력칸과 받침 규칙의 kind 값을 제거 - 예전 프로젝트 파일에 저장된 kind 값은 읽을 때 무시 (불러오기 오류 없음) - 테스트 갱신. 전체 651건 통과, 타입 검사·빌드 통과 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6b969f4a7c
commit
796a267205
5 files changed
+7
-29
No files matched your search
@@ -96,14 +96,9 @@ export const BEARING_RULE_FIELDS: { key: 'lengthMm' | 'widthMm' | 'slopePct'; la
|
||||
|
||||
/**
|
||||
* Changes one 받침 규칙 value. L and W must be greater than 0, S any number, and the rule must still build a solplate with
|
||||
* the 교대 받침높이 H (the pier rule's checks). The 받침 종류 must not be empty.
|
||||
* the 교대 받침높이 H (the pier rule's checks).
|
||||
*/
|
||||
export function applyBearingRule(rec: AbutRecord, key: keyof AbutBearingRule, value: number | string): AbutRecord {
|
||||
if (key === 'kind') {
|
||||
const kind = String(value).trim();
|
||||
if (!kind) throw new Error('받침 종류 · 용량을 입력하세요.');
|
||||
return { ...rec, bearingRule: { ...(rec.bearingRule ?? {}), kind } };
|
||||
}
|
||||
export function applyBearingRule(rec: AbutRecord, key: keyof AbutBearingRule, value: number): AbutRecord {
|
||||
const n = Number(value);
|
||||
if (!Number.isFinite(n)) throw new Error('솔플레이트 규칙 값은 숫자여야 합니다.');
|
||||
const bearingRule = { ...(rec.bearingRule ?? {}), [key]: n };
|
||||
|
||||
Reference in new issue
Block a user