feat(b09): 원가검토 탭 두 층 — 위 탭 10 · 아래 탭 묶음(B08 꼴) · 위 탭 다시 누름 = 마지막 본 하위(181-1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
This commit is contained in:
@@ -28,6 +28,7 @@ import { computeBase, type Row } from "./B09_Estimation_Calc_Base";
|
||||
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 { buildDaegaBlocks, buildDaegaList } from "./B09_Estimation_UI_Tabs_Labor";
|
||||
import {
|
||||
buildCheck,
|
||||
@@ -150,15 +151,14 @@ export function renderB09Estimation(root: HTMLElement): void {
|
||||
let sheets: Row = {};
|
||||
let current: TabId = "check";
|
||||
|
||||
const tabBar = document.createElement("div");
|
||||
tabBar.className = "b09-estimation__tabs";
|
||||
tabBar.setAttribute("role", "tablist");
|
||||
// 181-1 위 탭(md) · 아래 탭(sm) 두 줄 — 줄 그리기 = `…_UI_TabBar`
|
||||
const bars = createTabBars((tab) => show(tab));
|
||||
const panel = document.createElement("div");
|
||||
panel.className = "b09-estimation__panel";
|
||||
panel.setAttribute("role", "tabpanel");
|
||||
const body = document.createElement("div");
|
||||
body.className = "b09-estimation";
|
||||
body.append(tabBar, panel);
|
||||
body.append(bars.top, bars.sub, panel);
|
||||
|
||||
const made = document.createElement("p");
|
||||
made.className = "b09-estimation__hint";
|
||||
@@ -181,20 +181,7 @@ export function renderB09Estimation(root: HTMLElement): void {
|
||||
/** 탭 하나 그림 · focus = 이동해 온 줄 키 */
|
||||
const show = (tab: TabId, focus?: string): void => {
|
||||
current = tab;
|
||||
tabBar.replaceChildren(
|
||||
...TABS.map(([id, label]) => {
|
||||
const button = createButton({
|
||||
label,
|
||||
variant: id === tab ? "filled" : "ghost",
|
||||
size: "sm",
|
||||
onClick: () => id !== current && show(id),
|
||||
});
|
||||
button.setAttribute("role", "tab");
|
||||
button.setAttribute("aria-selected", String(id === tab));
|
||||
button.dataset.b09Tab = id;
|
||||
return button;
|
||||
}),
|
||||
);
|
||||
bars.draw(tab);
|
||||
if (!projectId) return void panel.replaceChildren(note("프로젝트를 먼저 고르세요."));
|
||||
if (!payload) return void panel.replaceChildren(note("원가 자료를 불러오는 중…"));
|
||||
const build = BUILDERS[tab];
|
||||
|
||||
Reference in New Issue
Block a user