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,23 +1,11 @@
|
||||
/* =============================================================================
|
||||
* M02_DF_Api.ts
|
||||
* 단위 표준 표 읽기 — 서버 `GET /api/m02/df/standards`(`M02_DF_Router.py`)
|
||||
* 부르는 곳 = 단위 고르기(`M02_DF_UnitPick`) · 옵션 기계 이름(`formula_doc_options`)
|
||||
* 기계 이름 · 끈 기계 읽기 — 서버 `GET /api/m02/df/machine-names` · `machine-off`(`M02_DF_Router.py`)
|
||||
* 부르는 곳 = 옵션 기계 이름(`formula_doc_options`) · 단위 표준 표 읽기는 단위 고르기(`ui_template_unit_pick`)로 옮김(856-4)
|
||||
* ========================================================================== */
|
||||
|
||||
import { API_BASE_URL } from "@config/config_frontend";
|
||||
|
||||
/** 단위 표준 표 */
|
||||
export interface CfStandards {
|
||||
unit: { 이름: string; 줄: Record<string, unknown>[]; [k: string]: unknown };
|
||||
saved: boolean;
|
||||
}
|
||||
|
||||
export 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;
|
||||
}
|
||||
|
||||
let machineNames: Promise<Record<string, string>> | null = null;
|
||||
|
||||
/** 기계 원문번호 → 「이름 규격」 — 한 번 받아 둠(못 받으면 빈 표 · 다음에 다시) */
|
||||
|
||||
Reference in New Issue
Block a user