refactor(856-4): 거꾸로 부름 끊기 본문 — 앞 커밋(bd41d8799)은 이름 옮김만 담김 · 이 커밋과 한 묶음
- 앞 커밋 글 그대로(층 · 부름 common_util_m02_call · 찾아 넣기 창 StackFind 주입 · 단위 고르기 부품 상자 · 합계 상자 A00 · 기계 칸 부품) - 앞 커밋에서 git add 가 옛 경로에 걸려 고친 파일이 빠짐 — 두 커밋을 같이 올림 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* =============================================================================
|
||||
* M02_DF_UnitPick.ts
|
||||
* 단가산출 흐름도 공용 단위 고르기 — 치면 걸러진 목록 · 고르기만(손글 안 받음 · `free` = 목록에 없는 친 글도 씀) · 「-」 = 없음
|
||||
* ui_template_unit_pick.ts
|
||||
* 공용 단위 고르기(856-4 — 옛 M02 `DataFlow/M02_DF_UnitPick`) — 치면 걸러진 목록 · 고르기만(손글 안 받음 · `free` = 목록에 없는 친 글도 씀) · 「-」 = 없음
|
||||
* 목록 = 단위 표준(산림품셈 1-2-2) 단위 + 표의 「더한 단위」(수식 문서 줄 단위) + 부른 쪽이 주는 마스터 결과단위 등 + 원 · 「같은 단위」(kg → ㎏) 는 하나만
|
||||
* 표준 표 읽는 길은 `setUnitSource` 로 바꿔 끼움(기본 = 서버 /standards) — 다른 판도 이것을 씀
|
||||
* 글 [한, 영] 짝은 아래 TEXT
|
||||
@@ -9,8 +9,8 @@
|
||||
import { currentLanguageIndex } from "@ui/ui_template_locale";
|
||||
import { createButton, el } from "@ui/ui_template_elements";
|
||||
import type { UiSize } from "@ui/ui_template_button";
|
||||
import { cfStandards } from "./M02_DF_Api";
|
||||
import "./M02_DF_UnitPick.css";
|
||||
import { API_BASE_URL } from "@config/config_frontend";
|
||||
import "./ui_template_unit_pick.css";
|
||||
import { createEmpty } from "@ui/ui_template_empty";
|
||||
import "@ui/ui_template_list_row.css";
|
||||
|
||||
@@ -22,6 +22,18 @@ const TEXT = {
|
||||
Pick: ["단위 고르기", "Pick a unit"],
|
||||
} as const;
|
||||
|
||||
/** 단위 표준 표 */
|
||||
interface CfStandards {
|
||||
unit: { 이름: string; 줄: Record<string, unknown>[]; [k: string]: unknown };
|
||||
saved: boolean;
|
||||
}
|
||||
|
||||
async function cfStandards(): Promise<CfStandards> {
|
||||
const response = await fetch(`${API_BASE_URL}/m02/df/standards`, { credentials: "include" });
|
||||
if (!response.ok) throw new Error(`표준 표 읽기 실패 (${response.status})`);
|
||||
return (await response.json()) as CfStandards;
|
||||
}
|
||||
|
||||
const tu = (key: keyof typeof TEXT): string => TEXT[key][currentLanguageIndex === 1 ? 1 : 0];
|
||||
|
||||
/** 「없음」 을 뜻하는 단위 글 */
|
||||
|
||||
Reference in New Issue
Block a user