fix(b09): 원가계산서·요율표 탭 단추 variant 를 ghost 로 · 「금액을 못 세운 줄 N건」·「미확정 N건」 표현을 내역서와 한 벌로
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
@@ -12,6 +12,7 @@ import { ui_locales, currentLanguageIndex } from "@ui/ui_template_locale";
|
|||||||
import { createButton, showToast } from "@ui/ui_template_elements";
|
import { createButton, showToast } from "@ui/ui_template_elements";
|
||||||
import { API_BASE_URL } from "@config/config_frontend";
|
import { API_BASE_URL } from "@config/config_frontend";
|
||||||
import type { B09Tab, B09TabContext } from "./B09_Estimation_UI_Shell_Types";
|
import type { B09Tab, B09TabContext } from "./B09_Estimation_UI_Shell_Types";
|
||||||
|
import { injectSheetStyles, unconfirmedBadge } from "./B09_Estimation_UI_Sheet";
|
||||||
|
|
||||||
function L(key: keyof typeof ui_locales): string {
|
function L(key: keyof typeof ui_locales): string {
|
||||||
return ui_locales[key][currentLanguageIndex];
|
return ui_locales[key][currentLanguageIndex];
|
||||||
@@ -227,12 +228,12 @@ function drawPanel(ctx: B09TabContext, sheet: CostSheetDto, reload: () => void):
|
|||||||
buttons.append(
|
buttons.append(
|
||||||
createButton({
|
createButton({
|
||||||
label: "제비율표",
|
label: "제비율표",
|
||||||
variant: "outlined",
|
variant: "ghost",
|
||||||
onClick: () => ctx.open("rate_table"),
|
onClick: () => ctx.open("rate_table"),
|
||||||
}),
|
}),
|
||||||
createButton({
|
createButton({
|
||||||
label: "다시 계산",
|
label: "다시 계산",
|
||||||
variant: "outlined",
|
variant: "ghost",
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
drafts.delete(projectId);
|
drafts.delete(projectId);
|
||||||
reload();
|
reload();
|
||||||
@@ -267,15 +268,17 @@ function drawBody(ctx: B09TabContext, sheet: CostSheetDto): void {
|
|||||||
`요율 판 ${sheet.rate_version.effective_date} · 직접비는 설계내역서 합계`,
|
`요율 판 ${sheet.rate_version.effective_date} · 직접비는 설계내역서 합계`,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (sheet.bill_missing_count || sheet.bill_unconfirmed_count) {
|
// 표현은 내역서·구조물도와 한 벌(「금액을 못 세운 줄 N건」 · 「미확정 N건」 배지).
|
||||||
|
if (sheet.bill_missing_count) {
|
||||||
head.append(
|
head.append(
|
||||||
el(
|
el(
|
||||||
"span",
|
"span",
|
||||||
"b09cs__warn",
|
"b09cs__warn",
|
||||||
`⚠ 내역서 단가 없는 줄 ${sheet.bill_missing_count} · 미확정 ${sheet.bill_unconfirmed_count}건 — 직접비가 덜 섬`,
|
`⚠ 내역서 ${L("B09_Sheet_Missing")} ${sheet.bill_missing_count}${L("B09_Sheet_Count")} — 직접비가 덜 섬`,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (sheet.bill_unconfirmed_count) head.append(unconfirmedBadge(sheet.bill_unconfirmed_count));
|
||||||
if (sheet.waste_note) head.append(el("span", "b09cs__meta", `폐기물처리비: ${sheet.waste_note}`));
|
if (sheet.waste_note) head.append(el("span", "b09cs__meta", `폐기물처리비: ${sheet.waste_note}`));
|
||||||
wrap.append(head);
|
wrap.append(head);
|
||||||
|
|
||||||
@@ -314,6 +317,7 @@ function drawBody(ctx: B09TabContext, sheet: CostSheetDto): void {
|
|||||||
|
|
||||||
function render(ctx: B09TabContext): void {
|
function render(ctx: B09TabContext): void {
|
||||||
injectStyles();
|
injectStyles();
|
||||||
|
injectSheetStyles();
|
||||||
if (!ctx.projectId) {
|
if (!ctx.projectId) {
|
||||||
ctx.body.append(el("div", "b09cs__meta", "프로젝트를 고르세요"));
|
ctx.body.append(el("div", "b09cs__meta", "프로젝트를 고르세요"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ function drawPanel(ctx: B09TabContext): void {
|
|||||||
select.append(option);
|
select.append(option);
|
||||||
}
|
}
|
||||||
pick.append(select);
|
pick.append(select);
|
||||||
const edit = createButton({ label: "수 정", variant: "outlined", disabled: true });
|
const edit = createButton({ label: "수 정", variant: "ghost", disabled: true });
|
||||||
edit.title = "요율 수정은 원가계산이 프로젝트 요율을 받는 칸이 선 뒤에 열림";
|
edit.title = "요율 수정은 원가계산이 프로젝트 요율을 받는 칸이 선 뒤에 열림";
|
||||||
box.append(
|
box.append(
|
||||||
pick,
|
pick,
|
||||||
@@ -102,7 +102,7 @@ function drawPanel(ctx: B09TabContext): void {
|
|||||||
el("span", "b09rt__meta", "요율은 조달청 제비율 판 그대로 — 지금은 보기 전용"),
|
el("span", "b09rt__meta", "요율은 조달청 제비율 판 그대로 — 지금은 보기 전용"),
|
||||||
createButton({
|
createButton({
|
||||||
label: "원가계산서",
|
label: "원가계산서",
|
||||||
variant: "outlined",
|
variant: "ghost",
|
||||||
onClick: () => ctx.open("cost_sheet"),
|
onClick: () => ctx.open("cost_sheet"),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user