summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-27 19:44:53 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-27 19:44:53 +0900
commit0362ee43518bc6e85ec5973697ff7b0210a53be8 (patch)
tree4fb591ce7a01cab8b91a073e0b110673877a86b5 /lib
parent0047ccb7d6aa20af6abca041a90ba135f4b8274d (diff)
(김준회) dolce b4 MatchBatchFileDwg에서 파일네임을 다르게 응답해서, 인덱스 순서로 매칭 로직 변경
Diffstat (limited to 'lib')
-rw-r--r--lib/dolce/dialogs/b4-bulk-upload-dialog-v3.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/dolce/dialogs/b4-bulk-upload-dialog-v3.tsx b/lib/dolce/dialogs/b4-bulk-upload-dialog-v3.tsx
index 81d6f7f0..e34b76c7 100644
--- a/lib/dolce/dialogs/b4-bulk-upload-dialog-v3.tsx
+++ b/lib/dolce/dialogs/b4-bulk-upload-dialog-v3.tsx
@@ -178,14 +178,20 @@ export function B4BulkUploadDialogV3({
);
// Store mapping results for later use (upload/save)
+ // Use the original file name from our request list as the key to ensure we can look it up later.
+ // The API response 'FileNm' might differ (e.g., missing extension), so we rely on the array index order (1:1).
const newMappingResultsMap = new Map<string, MappingCheckResult>();
- mappingResults.forEach((result) => {
- newMappingResultsMap.set(result.FileNm, result);
+ parseResults.forEach((parseResult, index) => {
+ const result = mappingResults[index];
+ if (result) {
+ newMappingResultsMap.set(parseResult.file.name, result);
+ }
});
setMappingResultsMap(newMappingResultsMap);
// 3. Merge results
const finalResults: FileValidationResult[] = parseResults.map((parseResult) => {
+ // Retrieve by file name (now reliably mapped)
const mappingResult = newMappingResultsMap.get(parseResult.file.name);
// If mapping exists and is valid, it overrides local validation errors