auto: 2026-09-22 03:10 (EOMSANGDON-HOME)

This commit is contained in:
2026-09-22 03:10:31 +09:00
parent 323e1d2c3d
commit 6a2925a9ec
8 changed files with 305 additions and 18 deletions
+11 -1
View File
@@ -379,6 +379,16 @@ export function buildSide(
);
};
/** 처음 펼칠 때 열 줄 — 재료는 차례 첫 파일(자재품목) */
const firstRun = (group: Group): string => {
if (group !== "재료") return `${group}|`;
const first = [...(lists.get(group) ?? [])].sort((a, b) => order(a.file) - order(b.file))[0];
return first
? `${group}
${first.file}`
: "";
};
const refresh = async (group: string): Promise<FileInfo[]> => {
const list = await fetchFiles(group);
if (list[0] && (group === "인력" || group === "기계")) {
@@ -427,7 +437,7 @@ export function buildSide(
if (!root.classList.contains("is-collapsed")) return; // 닫을 때는 그대로 둠
restoring = true;
try {
runs.get(lastRun.get(group) ?? (group === "재료" ? "" : `${group}|`))?.();
runs.get(lastRun.get(group) ?? firstRun(group))?.();
} finally {
restoring = false;
}