feat(view): standing input and names for the P1 project (운곡교P1 · 운곡교)

- The sample button and ?sample=1 fill the project name 운곡교P1 and the bridge
  name 운곡교. The sample is RAG/운곡교P1입력.xlsx.
- Test: the app's copy stays byte-identical to the RAG file (skipped when the
  RAG folder is absent) and reads one pier, P1, T형, 말뚝기초, 10 bearings.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-22 11:42:56 +09:00
1 parent 4d8bbf7f6e
commit 12239c6652
2 files changed
+35 -2

No files matched your search

+10 -2
View File
@@ -1170,9 +1170,18 @@ $<HTMLInputElement>('file').addEventListener('change', async (ev) => {
setStatus(`엑셀을 읽지 못했습니다: ${(err as Error).message}`);
}
});
/** The project's standing input and names (RAG/운곡교P1입력.xlsx → 프로젝트 운곡교P1, 교량 운곡교). */
const SAMPLE_PROJECT = { name: '운곡교P1', bridge: '운곡교' } as const;
function fillSampleNames(): void {
$<HTMLInputElement>('project-name').value = SAMPLE_PROJECT.name;
$<HTMLInputElement>('bridge-name').value = SAMPLE_PROJECT.bridge;
}
$<HTMLButtonElement>('pick-sample').addEventListener('click', async () => {
try {
loadBytes(await fetchSample(), '샘플 P1 (운곡교P1입력.xlsx)');
fillSampleNames();
} catch (err) {
setStatus(`샘플을 불러오지 못했습니다: ${(err as Error).message}`);
}
@@ -1251,8 +1260,7 @@ if (new URLSearchParams(window.location.search).get('sample') === '1') {
fetchSample()
.then((bytes) => {
loadBytes(bytes, '샘플 P1');
$<HTMLInputElement>('project-name').value = '운곡교 P1 샘플';
$<HTMLInputElement>('bridge-name').value = '운곡교';
fillSampleNames();
applyImport();
})
.catch((err: Error) => setStatus(`샘플을 불러오지 못했습니다: ${err.message}`));