feat(748-3): 텍스트 수식 바닥 노무비 · 재료비 · 경비 고정 줄(계 없음) · 비목 상자 사이 간격 = 바닥 줄 위 여유
- 새 `LogicLab_Foot` — 바닥 비목 소계 줄 한 부품(단가산출 상세 4 칸 · 텍스트 수식 3 칸 계 칸 없음) · 상자 소계는 그대로 - 비목 상자 사이 간격 = 바닥 줄 위 여유(공통 값 `--m01lab-box-gap` 12px · 두 보기) - 줄마다 붙던 옵션 값 칩 걷음은 748-2 커밋에 함께(위 옵션 칸이 대신) - 낡은 시험 고침: test_737 바닥 줄 부품 · 칸 수 · 상자 간격 대조 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
* ========================================================================== */
|
||||
|
||||
import { createBadge } from "@ui/ui_template_badge";
|
||||
import { createCalcFormulaRow } from "@ui/ui_template_calc_row";
|
||||
import { createCard } from "@ui/ui_template_card";
|
||||
import { el } from "@ui/ui_template_elements";
|
||||
import { currentLanguageIndex } from "@ui/ui_template_locale";
|
||||
@@ -44,6 +43,7 @@ import {
|
||||
openTableModal,
|
||||
type PickCond,
|
||||
} from "./M01_MasterData_UI_LogicLab_Modal";
|
||||
import { buildFoot, FOOT_KEYS, type FootKey } from "./M01_MasterData_UI_LogicLab_Foot";
|
||||
import { fragmentRow, type Fragment } from "./M01_MasterData_UI_LogicLab_Pill";
|
||||
import { tl } from "./M01_MasterData_UI_LogicLab_Text";
|
||||
|
||||
@@ -653,35 +653,17 @@ export function buildHo(ctx: HoContext): HTMLElement[] {
|
||||
const boxes = boxesOf(all, ["인력", "재료", "경비"]);
|
||||
const used = new Set(boxes.flatMap(usesOf));
|
||||
const common = (ctx.row.입력 ?? []).map((s) => s.이름).filter((n) => !used.has(n));
|
||||
const sums = (["labor", "material", "cost"] as Group[]).map((g) => {
|
||||
const v = all.filter((e) => e.group === g).reduce((s, e) => s + (e.amount ?? 0), 0);
|
||||
const out = el("span", {
|
||||
className: "ui-calc-row__out is-key",
|
||||
text: calculated ? formatMoney(v) : "—",
|
||||
});
|
||||
const row = createCalcFormulaRow(COST_OF[g], null, out);
|
||||
row.dataset.group = g;
|
||||
row.dataset.subtotal = calculated ? String(v) : "";
|
||||
return row;
|
||||
});
|
||||
const sums = Object.fromEntries(
|
||||
FOOT_KEYS.map((g) => [
|
||||
g,
|
||||
all.filter((e) => e.group === g).reduce((s, e) => s + (e.amount ?? 0), 0),
|
||||
]),
|
||||
) as Record<FootKey, number>;
|
||||
const total = all.reduce((s, e) => s + (e.amount ?? 0), 0);
|
||||
return [
|
||||
...(boxes.length || !common.length ? [] : [commonCard(optionRows(common, ctx))]),
|
||||
...boxes.map((b) => boxCard(b, ctx, calculated, common)),
|
||||
// 737-1 맨 아래 한 줄 4 칸(노무비 · 재료비 · 경비 · 계) — 화면(모달) 바닥에 붙음
|
||||
el("div", {
|
||||
className: "m01lab__foot",
|
||||
children: [
|
||||
el("div", { className: "m01lab__sums", children: sums }),
|
||||
el("p", {
|
||||
className: "m01lab__total",
|
||||
attrs: { "data-sum": calculated ? String(total) : "" },
|
||||
children: [
|
||||
el("span", { text: `${tl("Total")} ` }),
|
||||
el("span", { text: calculated ? formatMoney(total) : "—" }),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
buildFoot(sums, calculated, total),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user