feat: Enhance Excel template generation with error handling improvements

- Added errorStyle set to "stop" for various input validations in the template generation process.
- This enhancement ensures that users receive clear error messages when input criteria are not met, improving the overall user experience during data entry.
- These changes aim to streamline the Excel upload process and enhance data integrity across multiple company implementations.
This commit is contained in:
kjs
2026-04-15 16:02:11 +09:00
parent b9ddb88c4e
commit a89e99560d

View File

@@ -277,6 +277,7 @@ export async function generateTemplate(
allowBlank: true,
formulae: [`ISNUMBER(SEARCH("${keyword}",IFERROR(INDEX(${refValueRange},MATCH(${lookupColL}2,${refRange},0)),"")))`],
showErrorMessage: true,
errorStyle: "stop",
errorTitle: "입력 불가",
error: `${condColLabel}이(가) "${col.enableWhen.equals}"일 때만 입력 가능합니다`,
});
@@ -336,6 +337,7 @@ export async function generateTemplate(
allowBlank: !col.required,
formulae: [`'_품목목록'!$B$1:$B$${itemProcessMappings!.length}`],
showErrorMessage: true,
errorStyle: "stop",
errorTitle: "입력 오류",
error: "품목 목록에서 선택해주세요",
});
@@ -347,6 +349,7 @@ export async function generateTemplate(
allowBlank: !col.required,
formulae: [joined],
showErrorMessage: true,
errorStyle: "stop",
errorTitle: "입력 오류",
error: `다음 중 선택: ${values.slice(0, 5).join(", ")}${values.length > 5 ? " ..." : ""}`,
});
@@ -362,6 +365,7 @@ export async function generateTemplate(
allowBlank: !col.required,
formulae: [`'${listSheetName}'!$A$1:$A$${values.length}`],
showErrorMessage: true,
errorStyle: "stop",
errorTitle: "입력 오류",
error: "목록에서 선택해주세요",
});