일감 3 의 API·화면 덩어리. 토적표 오른쪽 절반(실무 V~AI)이 화면에 섬. 한 응답으로 냄 실무 토적표가 한 장이라 화면도 한 장임. 나눠 부르면 두 번 왕복하고 같은 측점 목록을 두 벌로 들게 됨. earthwork-table 응답에 slope 를 함께 실음. 열 구성 — 계열 4 x 성토면/절토면 = (거리, 면적) 7쌍 층따기[성토면] · 면고르기 · 법면보호공(종자파종) · 지장목제거. 거리 = 그 측점 사면길이, 면적은 토적표와 같은 평균단면적법. 합계행은 면적만 — 거리(사면길이)는 합이 뜻이 없음(실무 시트도 비움). ⚠ 잘린 측점을 감추지 않음 (PLAN 8-4b) 사면이 원지반을 못 만난 측점은 사면길이·면적이 그 지점에서 잘려 있음. 경고 문구에 **무엇이 잘렸는지**를 적고(「실제 값은 이보다 큼」), 측점 단추를 누르면 그 줄로 가서 잠깐 강조됨 — 17곳을 눈으로 찾게 하지 않음. 잘린 줄은 측점 칸 왼쪽에 표시가 남음. 검증 — 공용 브라우저 실화면. 타입검사 오류 0. 머리글 3단 13/12/28셀, 대분류에 층따기·면고르기·법면보호공·지장목제거, 3단에 거리/면적 쌍. 본문 65행 x 34열(토공 20 + 사면 14). NO.1 사면값 6.4/64.4 · 3.5/93.0 등이 엔진값과 일치. 잘린 줄 17개 표시 · 경고 문구 · 측점 단추 17개 확인. 합계 면고르기 성토 13,518.6㎡ · 절토 5,433.7㎡ 로 엔진 합계와 같음. 회귀 404 passed (실패 1건은 B05 코리도 기존 깨짐). 조작한 화면은 사용자가 보던 주소로 되돌려 놓음. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
131 lines
4.1 KiB
TypeScript
131 lines
4.1 KiB
TypeScript
/* =============================================================================
|
|
* B08_Quantity_UI_EarthworkGrid_Style.ts
|
|
* 토적표 그리드 스타일. 한 번만 주입한다.
|
|
*
|
|
* 실무 산출서와 눈으로 대조되는 것이 이 표의 목적이라, 장식보다 **줄·칸이 또렷한 것**을
|
|
* 우선한다. 숫자는 등폭으로 두어 자릿수가 세로로 맞는다.
|
|
* ========================================================================== */
|
|
|
|
const STYLE_ID = "b08-earthwork-grid-style";
|
|
|
|
/* 색은 전부 프로젝트 테마 변수를 쓴다 — 어두운 테마에서 머리글이 묻히지 않아야 한다.
|
|
글자색을 배경과 함께 지정하는 까닭이 그것이다(배경만 주면 상속색이 배경에 잠긴다). */
|
|
const CSS = `
|
|
.b08-grid { display: flex; flex-direction: column; gap: 8px; min-width: 0; height: 100%; }
|
|
|
|
.b08-grid__caption {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
/* 열이 많아 화면을 넘친다 — 표만 가로로 구르고 페이지 몸통은 안 구른다. */
|
|
.b08-grid__scroll { overflow: auto; flex: 1 1 auto; min-height: 0; }
|
|
|
|
.b08-grid__table {
|
|
border-collapse: collapse;
|
|
font-size: 12px;
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
color: var(--color-text-body);
|
|
}
|
|
|
|
.b08-grid__table th,
|
|
.b08-grid__table td {
|
|
border: 1px solid var(--color-border);
|
|
padding: 2px 8px;
|
|
text-align: right;
|
|
}
|
|
|
|
.b08-grid__table thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
background: var(--color-surface-raised);
|
|
color: var(--color-text);
|
|
font-weight: var(--font-weight-medium, 600);
|
|
text-align: center;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* 측점 열은 왼쪽에 붙어 있어야 가로로 굴러도 어느 줄인지 보인다. */
|
|
.b08-grid__station {
|
|
position: sticky;
|
|
left: 0;
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
text-align: left;
|
|
font-weight: var(--font-weight-medium, 500);
|
|
}
|
|
|
|
.b08-grid__table tfoot td {
|
|
background: var(--color-surface-raised);
|
|
color: var(--color-text);
|
|
font-weight: var(--font-weight-medium, 600);
|
|
}
|
|
|
|
/* 잘린 측점 경고 — 조용히 적게 내지 않고 눈에 보이게 한다(PLAN 8-4b). */
|
|
.b08-grid__warning {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 4px 6px;
|
|
padding: 6px 10px;
|
|
font-size: 12px;
|
|
color: var(--color-text-body);
|
|
background: var(--color-surface-raised);
|
|
border-left: 3px solid var(--color-danger);
|
|
}
|
|
|
|
.b08-grid__warning-station {
|
|
font-size: 11px;
|
|
padding: 0 6px;
|
|
border: 1px solid var(--color-border);
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
cursor: pointer;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
/* 잘린 줄은 표에서도 알아보게 왼쪽에 표시를 남긴다. */
|
|
.b08-grid__table tbody tr.is-unclosed .b08-grid__station {
|
|
border-left: 3px solid var(--color-danger);
|
|
}
|
|
|
|
.b08-grid__table tbody tr.is-highlighted td {
|
|
background: var(--color-royal-amethyst, #d8ccff);
|
|
color: #1b2220;
|
|
}
|
|
|
|
.b08-quantity__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); }
|
|
|
|
.b08-quantity__tab {
|
|
padding: 4px 12px;
|
|
font-size: 13px;
|
|
border: 1px solid var(--color-border);
|
|
border-bottom: none;
|
|
background: var(--color-surface-raised);
|
|
color: var(--color-text-secondary);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.b08-quantity__tab.is-active {
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
font-weight: var(--font-weight-medium, 600);
|
|
}
|
|
|
|
.b08-quantity__body { display: flex; flex-direction: column; gap: 8px; padding: 8px; min-height: 0; flex: 1 1 auto; }
|
|
.b08-quantity__message { margin: 0; padding: 16px; font-size: 13px; color: var(--color-text-secondary); }
|
|
.b08-quantity__field { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 2px 0; }
|
|
.b08-quantity__field-value { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
|
|
`;
|
|
|
|
/** 스타일을 한 번만 넣는다 — 페이지를 다시 그려도 중복되지 않는다. */
|
|
export function injectEarthworkGridStyles(): void {
|
|
if (document.getElementById(STYLE_ID)) return;
|
|
const style = document.createElement("style");
|
|
style.id = STYLE_ID;
|
|
style.textContent = CSS;
|
|
document.head.append(style);
|
|
}
|