diff --git a/M02_MasterTemplete/M02_MasterTemplete_Library_List.ts b/M02_MasterTemplete/M02_MasterTemplete_Library_List.ts index e1a92ede2..b7559365a 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Library_List.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_Library_List.ts @@ -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 [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 [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.수정일, "")], ], }; diff --git a/M02_MasterTemplete/M02_MyItems_View.ts b/M02_MasterTemplete/M02_MyItems_View.ts index 0fe43446f..f98cb71df 100644 --- a/M02_MasterTemplete/M02_MyItems_View.ts +++ b/M02_MasterTemplete/M02_MyItems_View.ts @@ -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(); 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.이름, diff --git a/M02_MasterTemplete/M02_MyMachine_Text.ts b/M02_MasterTemplete/M02_MyMachine_Text.ts index 32d8986fc..3e7110e6a 100644 --- a/M02_MasterTemplete/M02_MyMachine_Text.ts +++ b/M02_MasterTemplete/M02_MyMachine_Text.ts @@ -24,7 +24,7 @@ const TEXT = { Delete: "지우기", Deleted: "내 기계 지움", Delete_Ask: "이 내 기계를 지울까? 쓰는 단가산출 {value}", - Delete_Keep: "지워도 이미 만든 단가산출은 마지막 값 유지(「지워짐」 표시)", + Delete_Keep: "지워도 이미 만든 단가산출은 지우기 직전 값 유지", Back: "목록", Close: "닫기", Failed: "못 함", diff --git a/M02_MasterTemplete/M02_MyMachine_View.ts b/M02_MasterTemplete/M02_MyMachine_View.ts index 7c777a8a2..d5d581bb8 100644 --- a/M02_MasterTemplete/M02_MyMachine_View.ts +++ b/M02_MasterTemplete/M02_MyMachine_View.ts @@ -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.이름, diff --git a/M02_MasterTemplete/M02_MyMaterial_View.ts b/M02_MasterTemplete/M02_MyMaterial_View.ts index a340173c3..2dda862f6 100644 --- a/M02_MasterTemplete/M02_MyMaterial_View.ts +++ b/M02_MasterTemplete/M02_MyMaterial_View.ts @@ -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 { 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, ], });