fix(est): apply selected estimate classification safely

This commit is contained in:
2026-11-07 16:30:44 +09:00
parent c530ac694c
commit 9eae77d8f2
8 changed files with 138 additions and 9 deletions
+8 -2
View File
@@ -110,7 +110,7 @@ const EstNative = (() => {
}
return amount;
}
function calculate(input) {
function calculate(input, request = {}) {
const project = clone(input),
tables = project.tables,
options = project.options || {},
@@ -251,7 +251,13 @@ const EstNative = (() => {
"HeadTitleDat",
[...heads.keys()].map((code) => completed.get(`103:${code}`)).filter(Boolean),
);
const estimate = EstRows.estimate(tables.EstMainDat, options, resolve);
const estimate = EstRows.estimate(
tables.EstMainDat,
options,
resolve,
request.refreshEstimateRows,
);
request.onEstimateRefresh?.(estimate.refreshErrors);
tables.EstMainDat = estimate.rows;
errors.push(...estimate.errors);
const direct = estimate.direct;