fix(827-1): 기계 창 [확인] 직후 금액 즉시 — 확인 길이 그 식 셈 기록을 줌
- 서버 확인 길(my-machines/draft) = 화면이 정한 표지로 그 식 한 줄 셈 기록(요소 · 표 · 식 문서) 돌려줌 - 화면은 기록을 계산기 캐시에 합침 → 서버 왕복 전 0 원 깜빡임 없음(미리 셈 값과 같음) - 기계 창 목록 열 이름 「구분」 · 폭 조정 - 시험 test_827_1 ⑦ 셈 기록 확인 더함 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import { createMachineForm, HOURLY_KEY, type MachineValues } from "@ui/ui_templa
|
||||
import { openModal } from "@ui/ui_template_modal";
|
||||
import { createText } from "@ui/ui_template_text";
|
||||
import { isDraftNo, newTag, type DraftItem } from "../common_util/common_util_line_stack_draft";
|
||||
import type { DocRecord } from "../common_util/common_util_formula_doc_cache";
|
||||
import type { Picked } from "../common_util/common_util_line_stack_pick";
|
||||
import { call, type Layer } from "../M02_MasterTemplete/M02_MasterTemplete_Api_Fetch";
|
||||
import {
|
||||
@@ -70,7 +71,8 @@ export interface MachineWindowOptions {
|
||||
query: string;
|
||||
/** 없으면 보기만(옵션 가로 조회) */
|
||||
pick?: (p: Picked) => void;
|
||||
draft?: (d: DraftItem, p: Picked, values: Record<string, unknown>) => void;
|
||||
/** 고쳐 쓰기 [확인] — 초안 · 줄 연결 · 그 식 셈 기록(계산기 캐시 · 즉시 셈) */
|
||||
draft?: (d: DraftItem, p: Picked, record: DocRecord) => void;
|
||||
}
|
||||
|
||||
type Kind = "now" | "draft" | "mine" | "m01";
|
||||
@@ -154,10 +156,10 @@ export function openMachineWindow(o: MachineWindowOptions): void {
|
||||
const table = createDataTable({
|
||||
caption: mt("Win_Title"),
|
||||
columns: [
|
||||
{ key: "품명", label: mt("Name"), width: 170 },
|
||||
{ key: "규격", label: mt("Spec"), width: 100 },
|
||||
{ key: "금액", label: mt("Hourly"), kind: "number", decimals: 0, width: 90 },
|
||||
{ key: "구분", label: mt("How"), width: 120 },
|
||||
{ key: "품명", label: mt("Name"), width: 150 },
|
||||
{ key: "규격", label: mt("Spec"), width: 80 },
|
||||
{ key: "금액", label: mt("Hourly"), kind: "number", decimals: 0, width: 84 },
|
||||
{ key: "구분", label: mt("Win_Kind"), width: 110 },
|
||||
],
|
||||
rows: [],
|
||||
rowClass: (i) => (same(cands[i], sel) ? "is-title" : null),
|
||||
@@ -452,10 +454,10 @@ export function openMachineWindow(o: MachineWindowOptions): void {
|
||||
if (!body) return;
|
||||
btn.disabled = true;
|
||||
try {
|
||||
const got = await checkDraft(owner, body, s.target);
|
||||
const tag = s.target.표지 ?? newTag();
|
||||
const got = await checkDraft(owner, body, { ...s.target, 표지: tag });
|
||||
if (!got.시간당.ok || !got.시간당.로직)
|
||||
throw new Error(hourlyText(got.시간당) || mt("Pick_Direct"));
|
||||
const tag = s.target.표지 ?? newTag();
|
||||
const item: DraftItem = {
|
||||
표지: tag,
|
||||
...(s.target.키 ? { 키: s.target.키 } : {}),
|
||||
@@ -471,7 +473,7 @@ export function openMachineWindow(o: MachineWindowOptions): void {
|
||||
};
|
||||
formDirty = () => false;
|
||||
close();
|
||||
o.draft!(item, p, got.셈값);
|
||||
o.draft!(item, p, got.연결);
|
||||
} catch (error) {
|
||||
notice.replaceChildren(
|
||||
createText(error instanceof Error ? error.message : mt("Failed"), "error"),
|
||||
|
||||
Reference in New Issue
Block a user