fix(859-8): M02 서고 · 개인관리 화면 글 손질 — 서고 목록 「고친 날」 날짜 꼴 · 내 기계 · 내 재료 · 내 품목 빈 목록 글(빈 칸에 「없음」 찍히던 것) · 지우기 확인 글(걷힌 「지워짐」 · 조사)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 00:40:29 +09:00
co-authored by Claude Opus 5.5
parent a3004c1824
commit d59adc42c8
5 changed files with 10 additions and 9 deletions
@@ -35,6 +35,7 @@ import {
} from "./M02_MasterTemplete_Api_Fetch";
import { tc } from "./M02_MasterTemplete_Labor_Text";
import { formatMoney } from "../common_util/common_util_money";
import { dateText } from "../common_util/common_util_time";
/** 목록 줄 — 서버가 문서 `이름`(제목) · 단위 · 1 단위 기준 계를 실어 보냄 */
type Row = TemplateInfo & {
@@ -84,7 +85,7 @@ const COLUMNS: Record<LibraryKind, () => [string, (row: Row) => string][]> = {
[tc("Lib_Unit"), (r) => r.단위 ?? ""],
[tc("Lib_Base"), (r) => money(r.기준금액)],
[L("M02_LibUnlinked"), (r) => (r.안이은줄 ? String(r.안이은줄) : "")], // 729-3
[tc("Lib_Date"), (r) => r.수정일],
[tc("Lib_Date"), (r) => dateText(r.수정일, "")],
],
sangeun: () => [
[tc("Lib_Key"), (r) => r.이름],
@@ -94,7 +95,7 @@ const COLUMNS: Record<LibraryKind, () => [string, (row: Row) => string][]> = {
[L("M02_SangeunEdited"), (r) => String(r.고친줄수 ?? 0)],
[L("M02_SangeunUsers"), (r) => String(r.쓰는곳수 ?? 0)],
[tc("Lib_Base"), (r) => money(r.기준금액)],
[tc("Lib_Date"), (r) => r.수정일],
[tc("Lib_Date"), (r) => dateText(r.수정일, "")],
],
};
+1 -2
View File
@@ -40,7 +40,6 @@ export function buildMyItemsView(opt: MyItemsViewOptions): HTMLElement {
{ key: "같은이름", label: mt("Same_Name"), kind: "number", decimals: 0, width: 70 },
],
rows: [],
empty: mt("Items_None"),
mergeSame: ["이름"],
onRowClick: (i) => pick(shown[i]),
});
@@ -62,7 +61,7 @@ export function buildMyItemsView(opt: MyItemsViewOptions): HTMLElement {
const count = new Map<string, number>();
for (const r of rows) count.set(r.이름, (count.get(r.이름) ?? 0) + 1);
shown = rows.filter((r) => words.every((w) => `${r.이름} ${r.규격}`.toLowerCase().includes(w)));
hint.textContent = rows.length ? `${shown.length} / ${rows.length}` : "";
hint.textContent = rows.length ? `${shown.length} / ${rows.length}` : mt("Items_None");
table.setRows(
shown.map((r) => ({
이름: r.이름,
+1 -1
View File
@@ -24,7 +24,7 @@ const TEXT = {
Delete: "지우기",
Deleted: "내 기계 지움",
Delete_Ask: "이 내 기계를 지울까? 쓰는 단가산출 {value}",
Delete_Keep: "지워도 이미 만든 단가산출은 마지막 값 유지(「지워짐」 표시)",
Delete_Keep: "지워도 이미 만든 단가산출은 지우기 직전 값 유지",
Back: "목록",
Close: "닫기",
Failed: "못 함",
+1 -2
View File
@@ -45,7 +45,6 @@ export function buildMyMachineView(opt: MyMachineViewOptions): HTMLElement {
{ key: "고친날", label: mt("Edited"), width: 96 },
],
rows: [],
empty: mt("None"),
onRowClick: (i) => shown[i] && void openForm(shown[i].키),
});
const draw = (): void => {
@@ -54,7 +53,7 @@ export function buildMyMachineView(opt: MyMachineViewOptions): HTMLElement {
const text = `${r.이름} ${r.규격} ${r.키}`.toLowerCase();
return words.every((w) => text.includes(w));
});
hint.textContent = rows.length ? `${shown.length} / ${rows.length}` : "";
hint.textContent = rows.length ? `${shown.length} / ${rows.length}` : mt("None");
table.setRows(
shown.map((r) => ({
이름: r.이름,
+4 -2
View File
@@ -40,7 +40,7 @@ const TEXT = {
need: "품명 · 단위는 꼭 적음",
saved: "저장함 — 쓰는 단가산출이 새 값으로 셈",
dropped: "지움",
dropAsk: "「{name}」 을 지움",
dropAsk: "「{name}」 지움",
readOnly: "남의 층 — 읽기만",
} as const;
@@ -65,7 +65,6 @@ export function buildMyMaterialBlock(opt: MyMaterialBlockOptions): HTMLElement {
{ key: "키", label: TEXT.key, width: 90 },
],
rows: [],
empty: TEXT.none,
onRowClick: (i) => canWrite && open(rows[i]),
});
const name = createInputField({ label: TEXT.name, required: true });
@@ -84,6 +83,7 @@ export function buildMyMaterialBlock(opt: MyMaterialBlockOptions): HTMLElement {
}),
);
const head = createText("");
const none = createText(TEXT.none, "muted"); // 빈 목록 글(표 `empty` = 빈 칸 글이라 따로)
const saveBtn = createButton({ label: TEXT.save, variant: "filled", onClick: () => void save() });
const dropBtn = createButton({
label: TEXT.drop,
@@ -138,6 +138,7 @@ export function buildMyMaterialBlock(opt: MyMaterialBlockOptions): HTMLElement {
rows = got.줄;
ver = got.판;
table.setRows(rows.map((r) => ({ ...r, 쓰는곳: r.쓰는곳?.length ?? 0 })));
none.hidden = rows.length > 0;
}
async function save(): Promise<void> {
const 이름 = name.input.value.trim();
@@ -188,6 +189,7 @@ export function buildMyMaterialBlock(opt: MyMaterialBlockOptions): HTMLElement {
el("div", { className: "ui-toolbar", children: [addBtn] }),
createText(canWrite ? TEXT.note : TEXT.readOnly, "muted"),
table.root,
none,
form,
],
});