Skip to content

Commit 79cf994

Browse files
authored
Merge pull request Expensify#87748 from Expensify/claude-fixCsvImportCaseSensitiveEnabled
Fix case-sensitive CSV import disabling categories and tags
2 parents ef541f6 + 0663f33 commit 79cf994

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/workspace/categories/ImportedCategoriesPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function ImportedCategoriesPage({route}: ImportedCategoriesPageProps) {
107107
const existingGLCodeOrDefault = categoryAlreadyExists?.['GL Code'] ?? '';
108108
return {
109109
name,
110-
enabled: categoriesEnabledColumn !== -1 ? ['true', 'yes'].includes(categoriesEnabled?.[containsHeader ? index + 1 : index]?.toString().toLowerCase() ?? '') : true,
110+
enabled: categoriesEnabledColumn !== -1 ? ['true', 'yes'].includes(categoriesEnabled?.[containsHeader ? index + 1 : index]?.toString().trim().toLowerCase() ?? '') : true,
111111
// eslint-disable-next-line @typescript-eslint/naming-convention
112112
'GL Code': categoriesGLCodeColumn !== -1 ? (categoriesGLCode?.[containsHeader ? index + 1 : index] ?? '') : existingGLCodeOrDefault,
113113
};

src/pages/workspace/tags/ImportedTagsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function ImportedTagsPage({route}: ImportedTagsPageProps) {
105105
const existingGLCodeOrDefault = tagAlreadyExists?.['GL Code'] ?? '';
106106
return {
107107
name,
108-
enabled: tagsEnabledColumn !== -1 ? ['true', 'yes'].includes(tagsEnabled?.[containsHeader ? index + 1 : index]?.toString().toLowerCase() ?? '') : true,
108+
enabled: tagsEnabledColumn !== -1 ? ['true', 'yes'].includes(tagsEnabled?.[containsHeader ? index + 1 : index]?.toString().trim().toLowerCase() ?? '') : true,
109109
// eslint-disable-next-line @typescript-eslint/naming-convention
110110
'GL Code': tagsGLCodeColumn !== -1 ? (tagsGLCode?.[containsHeader ? index + 1 : index] ?? '') : existingGLCodeOrDefault,
111111
};

0 commit comments

Comments
 (0)