feat(B09): 좌측 「데이터 점검」 묶음 — 이름 · 설명 지움 · [업데이트] · 낡음 점 배지 · 연결 점검 탭을 좌측 목록으로(203-1)

- 묶음 이름 「원가 단가」 → 「데이터 점검」 · 굳힌 시각 안내 글 지움(공용 호버로)
- [단가 갱신] → [업데이트] · 서버 book_stale(지금 M01 로 굳힌 책과 견줌) 까닭 있으면 점 배지
- 「연결 점검」 탭 = 좌측 목록(누르면 그 탭 그 줄 · 까닭 = 공용 호버) · 위 탭 줄에서 뺌 · 첫 탭 = 공사원가계산서
- test_203_1 새로 · test_144 · test_181_1 고침

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
This commit is contained in:
2026-10-10 14:25:06 +09:00
co-authored by Claude Opus 5.5
parent 80d32e7217
commit 7cd083a2d7
12 changed files with 290 additions and 75 deletions
+10 -14
View File
@@ -4,7 +4,7 @@
*
* 원본 = 기번3 공통 원가산출 엑셀 · 탭 하나 = 화면 표 하나(`…_UI_Tabs` 차례) · 옛 원가 코드 안 봄
* 자료 = GET …/estimation(입력 · 사용자 값 · 서버가 셈한 표) · 조작 = 캐시(`b09-estimation`) +
* 짝 계산(`…_Calc_*.ts`)으로 바로 다시 셈 · [저장] = PUT → 서버 정본 · [단가 갱신] = POST …/prices
* 짝 계산(`…_Calc_*.ts`)으로 바로 다시 셈 · [저장] = PUT → 서버 정본 · [업데이트] = POST …/prices
* 호표 칸 누름 = 그 탭 그 줄로 이동 · 자동 저장 없음
* ========================================================================== */
@@ -31,9 +31,9 @@ import { computeEstimation } from "./B09_Estimation_Calc_Bill";
import { computeLabor, daegaPrice } from "./B09_Estimation_Calc_Labor";
import { computeTotal } from "./B09_Estimation_Calc_Total";
import { createTabBars } from "./B09_Estimation_UI_TabBar";
import { createCheckPanel } from "./B09_Estimation_UI_Check";
import { buildDaegaBlocks, buildDaegaList } from "./B09_Estimation_UI_Tabs_Labor";
import {
buildCheck,
rowIndex,
TABS,
type Link,
@@ -70,7 +70,6 @@ function L(key: keyof typeof ui_locales): string {
const LATER: Record<string, string> = {};
const BUILDERS: Partial<Record<TabId, TabBuild>> = {
check: buildCheck,
dg_list: buildDaegaList,
dg: buildDaegaBlocks,
bill: buildBill,
@@ -152,7 +151,7 @@ export function renderB09Estimation(root: HTMLElement): void {
let payload: Row | null = null;
let user: Row = {};
let sheets: Row = {};
let current: TabId = "check";
let current: TabId = TABS[0][0];
// 181-1 위 탭(md) · 아래 탭(sm) 두 줄 — 줄 그리기 = `…_UI_TabBar`
const bars = createTabBars((tab) => show(tab));
@@ -163,11 +162,10 @@ export function renderB09Estimation(root: HTMLElement): void {
body.className = "b09-estimation";
body.append(bars.top, bars.sub, panel);
const made = document.createElement("p");
made.className = "b09-estimation__hint";
const recompute = (): void => {
if (payload) sheets = computeSheets(payload, user);
if (!payload) return;
sheets = computeSheets(payload, user);
check.draw(payload, sheets); // 203-1 좌측 연결 점검 · [업데이트] 배지
};
const setUser = (next: Row): void => {
@@ -266,9 +264,6 @@ export function renderB09Estimation(root: HTMLElement): void {
const draft = projectId && !fromServer ? readState<Row>("b09-estimation", projectId) : null;
user = draft ?? next.user ?? {};
recompute();
made.textContent = next.book?.made
? `단가 굳힘 ${String(next.book.made).replace("T", " ")} — [단가 갱신] 때만 새로`
: "단가 아직 안 굳힘 — [저장] 이나 [단가 갱신] 때 M01 값을 굳힘";
show(current);
};
@@ -297,12 +292,13 @@ export function renderB09Estimation(root: HTMLElement): void {
});
save.dataset.b09Save = "";
const refresh = createButton({
label: "단가 갱신",
label: "업데이트",
variant: "ghost",
onClick: () =>
void run("/estimation/prices", "POST", "단가를 지금 M01 값으로 새로 굳혔습니다."),
});
refresh.dataset.b09Refresh = "";
const check = createCheckPanel(refresh, (link) => show(link.tab, link.key));
// 184-3 내역 초기화 — 설계내역서 덮개(user.bill) 지우고 바로 저장 → 기본 로직 내역
const reset = createButton({
label: "내역 초기화",
@@ -322,8 +318,8 @@ export function renderB09Estimation(root: HTMLElement): void {
section.className = "ui-collapsible ui-sidebar-section ui-sidebar-card";
const heading = document.createElement("h3");
heading.className = "ui-collapsible__title";
heading.textContent = "원가 단가";
section.append(heading, made, refresh);
heading.textContent = "데이터 점검";
section.append(heading, refresh, check.list);
const actions = document.createElement("div");
actions.className = "ui-sidebar-actions";
actions.append(save, reset);