공용 파일(main.ts·index.html·style.css)에서 서로 얽혀 있어 한 커밋으로 묶음. - 지반: ① 형상 프로젝트 지반모델 관리창(생성·JSON 불러오기·교각별 비교·선택 적용), 프로젝트 JSON 내장 groundModel 추출, 교대 8행 통합 적용·공통지형 중복격자 제외 - 재료표·수량: 상단 ⑤ 메뉴·배근 바로가기, 결과 교각/탭 기억, 수량 워크북·정합 보정 - 랜딩: 옥성교 6교각 히어로 이미지·투영 강조점·좌→우 광선·지형 라운드/도로 연결 - 검증 스크립트(verify-project-ground/ground-abutments/okseong-user-files/quantity-*/landing-hero 등) 정본: DOC/04_실행/실행_*_2026-11-09_v0.1.00.md Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
22 lines
1.2 KiB
TypeScript
22 lines
1.2 KiB
TypeScript
import type {QuantityInputs} from './model';
|
|
import type {QuantitySnapshot} from './project-inputs';
|
|
import {projectRecords} from './project-inputs';
|
|
|
|
export type ExportScope='selected'|'all';
|
|
export function exportRecords(snapshot:QuantitySnapshot,scope:ExportScope){
|
|
return projectRecords(snapshot).filter(r=>scope==='all'||r.pier.input.name===snapshot.selected);
|
|
}
|
|
|
|
/** Preserve edits made while PNG/Excel generation awaited IO, even across project replacement. */
|
|
export function finishQuantityExport(start:QuantitySnapshot,scope:ExportScope,live:QuantitySnapshot,save:(name:string,data:QuantityInputs)=>void):string[]{
|
|
const current=projectRecords(live),changed:string[]=[];
|
|
for(const before of exportRecords(start,scope)){
|
|
const after=current.find(r=>r.pier.input.name===before.pier.input.name);
|
|
if(!after||JSON.stringify(start.project)!==JSON.stringify(live.project)||after.pier.dirty||!after.result||after.pier.model!==before.pier.model||after.result.signature!==before.result?.signature||JSON.stringify(after.stored)!==JSON.stringify(before.stored)){
|
|
changed.push(before.pier.input.name);continue;
|
|
}
|
|
save(after.pier.input.name,{...after.stored,lastSignature:after.result.signature});
|
|
}
|
|
return changed;
|
|
}
|