refactor(859-2 ㉮-1): B09 내역 점검 [단가 갱신] · 미리 보기 창 · [재생성] 걷음 — 프로젝트 단가는 지정한 때 그대로
- 화면: 「내역 점검」 카드 [단가 갱신] 단추 · 점 배지 · 호버 · 미리 보기 창([재생성] · [적용]) 걷음 · 연결 점검 목록 그대로 - 서버: POST …/estimation/prices · …/prices/preview 걷음(openapi 469 → 467) · GET 답 `book` · `stale` 칸(매 GET 단가 책 견줌) 걷음 - B09_Estimation_Refresh · B09_Estimation_Copy_Prices 지움(사본 단가 읽기 = 단가.json 바로) · Bill_Library 서고 다시 굳힘(changed · refresh_copy) 걷음 - 단가 책: 첫 굳힘 `make_book`(옛 refresh_book 의 단가 갱신 몫 · book_stale · book_diff · labor_editions 걷음) - 시험: 죽은 길만 보던 test_296 · test_703_3 지움 · 203_1 배지 · 795_4 ⑤ ⑥ · 719_2 서고 업데이트 지움 · 144 길 = 없음 확인 - test_253_3: B9-4 화면 꼴 뒤 낡은 단언(엑셀 꼴 식 글)을 작업량 값 줄로 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* 짝 계산(`…_Calc_*.ts`)으로 바로 다시 셈 · 새 산근(로직 연결) = 뒤에서 서버 셈(702-3 · `…_UI_Live`) ·
|
||||
* [저장](702-3 · 왼쪽 아래 [초기화] 옆) = PUT → 서버 정본으로 다시 셈 · 저장 안 하고 단계 옮김 · [>] = 물음(저장 · 버림 · 머묾)
|
||||
* [>] = 물음 → POST …/estimation/complete(단계 6 완료) → `DRAFT.next`(인쇄 미리보기 · 초안) · 실패면 머묾
|
||||
* [초기화](요구 298-2) = 확인 창 → POST …/estimation/reset(사용자 값 · 단가 책 지움 · 견적서 남김) → 셈 값 · [단가 갱신] = POST …/prices(795-4)
|
||||
* [초기화](요구 298-2) = 확인 창 → POST …/estimation/reset(사용자 값 · 단가 책 지움 · 견적서 남김) → 셈 값
|
||||
* 호표 칸 누름 = 그 탭 그 줄로 이동 · 자동 저장 없음
|
||||
* ========================================================================== */
|
||||
|
||||
@@ -338,14 +338,8 @@ export function renderB09Estimation(root: HTMLElement): void {
|
||||
show(current);
|
||||
};
|
||||
|
||||
// keep = 화면 캐시 그대로(296 [업데이트] — 지운 줄 · 고친 칸을 안 되살림) · 참 = 성공
|
||||
const run = async (
|
||||
path: string,
|
||||
method: string,
|
||||
done: string,
|
||||
init?: Row,
|
||||
keep = false,
|
||||
): Promise<boolean> => {
|
||||
// 참 = 성공
|
||||
const run = async (path: string, method: string, done: string, init?: Row): Promise<boolean> => {
|
||||
if (!projectId) return false;
|
||||
showLoadingOverlay();
|
||||
try {
|
||||
@@ -353,8 +347,8 @@ export function renderB09Estimation(root: HTMLElement): void {
|
||||
method,
|
||||
...(init ? { body: JSON.stringify(init) } : {}),
|
||||
});
|
||||
if (!keep) clearState("b09-estimation", projectId);
|
||||
apply(next, !keep);
|
||||
clearState("b09-estimation", projectId);
|
||||
apply(next, true);
|
||||
showToast(done, "success");
|
||||
return true;
|
||||
} catch (error) {
|
||||
@@ -372,21 +366,7 @@ export function renderB09Estimation(root: HTMLElement): void {
|
||||
: Promise.resolve(true);
|
||||
DRAFT.save = saveChanged; // 초안 [인쇄 미리보기] = 저장 뒤 이동(506-3)
|
||||
DRAFT.blocked = () => (payload ? unfinished(sheets) : null); // 701-3 인쇄 · 확정 = 빈 줄 0
|
||||
// 795-4 [단가 갱신] = 값만 · 미리 보기 창 [재생성] = `data-b09-job`(B09_Estimation_UI_Check)
|
||||
const refresh = createButton({
|
||||
label: "단가 갱신",
|
||||
variant: "ghost",
|
||||
onClick: () =>
|
||||
void run(
|
||||
"/estimation/prices",
|
||||
"POST",
|
||||
"단가를 지금 M01 값으로 새로 굳혔습니다.",
|
||||
{ user, ...(refresh.dataset.b09Job ? { job: refresh.dataset.b09Job } : {}) },
|
||||
true,
|
||||
),
|
||||
});
|
||||
refresh.dataset.b09Refresh = "";
|
||||
const check = createCheckPanel(refresh, (link) => show(link.tab, link.key));
|
||||
const check = createCheckPanel((link) => show(link.tab, link.key));
|
||||
// 298-2 [초기화] — 내역 · 단가 · 공기 · 요율 등 사용자 값 · 설정 모두 지움 → B08 수량 셈 값(견적서 파일 남김)
|
||||
const reset = createButton({
|
||||
label: L("Common_Btn_Reset"),
|
||||
@@ -413,7 +393,7 @@ export function renderB09Estimation(root: HTMLElement): void {
|
||||
save.dataset.b09Save = "";
|
||||
// 카드 = 좌측 패널 공용 카드(269 · 「구조물 배치」 양식)
|
||||
const section = createPanelCard("내역 점검", true); // 311 기본 접힘
|
||||
section.append(refresh, check.list);
|
||||
section.append(check.list);
|
||||
// 303-1 · 304-1 하단 고정 줄 — [박스보기|호표보기] · [하이퍼링크|팝업] · 초안 단추 · [?][<][>][초기화]
|
||||
const actions = createDock([save, reset], () => isGroupTab(current) && show(current));
|
||||
const left = document.createElement("div");
|
||||
|
||||
Reference in New Issue
Block a user