fix(est): show changes without item codes
This commit is contained in:
@@ -21,6 +21,7 @@ for (const file of [
|
||||
"native-c3r.js",
|
||||
"native-exchange.js",
|
||||
"native-verify.js",
|
||||
"native-extra.js",
|
||||
]) {
|
||||
vm.runInContext(fs.readFileSync(path.join(base, file), "utf8"), context, { filename: file });
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
from test_est_rea_parity import run
|
||||
|
||||
|
||||
def test_change_view_includes_named_rows_without_codes():
|
||||
result = run(
|
||||
"math",
|
||||
"""(()=>{
|
||||
const p=EstNative.empty();p.tables.EstMainDat=[{PkID:1,Code:'',Name:'earthwork',GN:2,TC:200}];
|
||||
p.baseline={name:'base',tables:{EstMainDat:[{PkID:1,Code:'',Name:'earthwork',GN:1,TC:100}]}};
|
||||
const node={innerHTML:''};globalThis.EstApp={esc:x=>String(x??''),number:x=>String(x??0),byId:()=>node};
|
||||
const state={project:p,view:'change'};EstExtra.render(state);return {html:node.innerHTML,changes:EstBusiness.changes(p)};
|
||||
})()""",
|
||||
)
|
||||
assert "earthwork" in result["html"]
|
||||
assert result["changes"][0]["difference"] == 100
|
||||
|
||||
|
||||
def test_original_recalculation_modes_keep_old_quantities_and_only_refresh_selected_prices():
|
||||
result = run(
|
||||
"math",
|
||||
|
||||
@@ -67,7 +67,7 @@ const EstExtra = (() => {
|
||||
table(
|
||||
["구분", "코드", "품명", "당초 수량", "변경 수량", "당초 금액", "변경 금액", "증감"],
|
||||
changes
|
||||
.filter((row) => row.Code)
|
||||
.filter((row) => row.Code || row.Name)
|
||||
.map((row) => [
|
||||
esc({ new: "신규", deleted: "삭제", changed: "변경", unchanged: "동일" }[row.status]),
|
||||
esc(row.Code),
|
||||
|
||||
Reference in New Issue
Block a user