refactor(view): 교각 목록 체크박스 제거, 속성 복사를 부재별 편집창 하단으로 이동

- 교각 목록의 체크박스·전체 선택·선택 교각 수 막대 제거
- ① 3D: 생성된 교각 전체 (전체 보기), ② 3D: 기준 교각만
- 다시 생성: 변경이 있거나 아직 생성되지 않은 교각만 다시 생성 (변경 교각 다시 생성)
- 속성 복사: 모달 창을 없애고 ① 편집 카드, ② 부재 패널 하단의 인라인 패널로 이동
  대상 교각은 패널 안에서만 고름. 지반 위치·지하수위 항목을 복사 항목에 추가
- 일괄 적용 버튼과 ③ 속성 복사 버튼 제거 (복사는 편집 패널에서)
- 활성 교각 체크 기능(shownNames, overrideTargets) 제거

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-27 16:16:30 +09:00
1 parent 4fc02afb1a
commit 42ae591eba
5 files changed
+113 -262

No files matched your search

-54
View File
@@ -1,54 +0,0 @@
import { describe, expect, it } from 'vitest';
import { applyOverrides, overrideTargets, shownNames, type PierSelection } from '../src/core/active-piers';
import { loadP1 } from './helpers';
const list: PierSelection[] = [
{ name: 'P1', checked: true, hasModel: true },
{ name: 'P2', checked: true, hasModel: true },
{ name: 'P3', checked: false, hasModel: true },
{ name: 'P4', checked: true, hasModel: false },
];
describe('shownNames (체크 = 활성, 기준 교각은 항상 표시)', () => {
it('shows every checked pier that has a model, in list order', () => {
expect(shownNames(list, 'P1')).toEqual(['P1', 'P2']);
});
it('keeps the 기준 pier even when it is unchecked', () => {
expect(shownNames(list, 'P3')).toEqual(['P1', 'P2', 'P3']);
});
it('never shows a pier without a model', () => {
expect(shownNames(list, 'P4')).toEqual(['P1', 'P2']);
});
it('shows only the 기준 pier when nothing else is checked', () => {
const none = list.map((p) => ({ ...p, checked: false }));
expect(shownNames(none, 'P2')).toEqual(['P2']);
});
});
describe('overrideTargets (기준 교각의 수정 값을 받을 교각)', () => {
it('is the checked piers other than the 기준 pier', () => {
expect(overrideTargets(list, 'P1')).toEqual(['P2']);
expect(overrideTargets(list, 'P3')).toEqual(['P1', 'P2']);
});
});
describe('applyOverrides (기준 교각의 변경 항목만 옮김)', () => {
const base = loadP1();
const defaults = base;
const edited = { ...base, copingWidthMm: base.copingWidthMm + 100 };
const target = { ...base, copingLengthMm: base.copingLengthMm + 500 };
it('copies only the keys the 기준 pier overrides, keeping the target own values', () => {
const next = applyOverrides({ defaults, input: defaults, draft: edited }, target);
expect(next.copingWidthMm).toBe(edited.copingWidthMm);
expect(next.copingLengthMm).toBe(target.copingLengthMm);
});
it('returns the target unchanged when the 기준 pier has no overrides', () => {
const next = applyOverrides({ defaults, input: defaults, draft: defaults }, target);
expect(next).toEqual(target);
});
});