feat(est): persist and refresh Excel quantity links
This commit is contained in:
@@ -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("문서 본문 형식 오류");
|
||||
|
||||
Reference in New Issue
Block a user