feat(est): persist and refresh Excel quantity links

This commit is contained in:
2026-11-07 15:56:04 +09:00
parent aac94d6508
commit fd6e2e6933
7 changed files with 165 additions and 12 deletions
+20
View File
@@ -345,6 +345,26 @@ const EstModel = (() => {
if (s[key] != null && (typeof s[key] !== "string" || s[key].length > 100000))
throw Error("인쇄 문구 형식 오류");
}
if (project.excelQuantityLinks != null) {
if (!Array.isArray(project.excelQuantityLinks)) throw Error("Excel 수량 연결 형식 오류");
const targets = new Set();
for (const link of project.excelQuantityLinks) {
if (
!link ||
!Number.isSafeInteger(link.target) ||
targets.has(link.target) ||
typeof link.file !== "string" ||
!link.file ||
link.file.length > 255 ||
typeof link.sheet !== "string" ||
!link.sheet ||
link.sheet.length > 255 ||
!EstQuantity.validExcelAddress(link.cell)
)
throw Error("Excel 수량 연결 오류");
targets.add(link.target);
}
}
if (project.documents != null) {
if (typeof project.documents !== "object" || Array.isArray(project.documents))
throw Error("문서 본문 형식 오류");