mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
Merge pull request #711 from bigcapitalhq/fix-parse-non-lowercase-import
fix: Parse the uppercase values in importing
This commit is contained in:
@@ -299,7 +299,7 @@ export const valueParser =
|
|||||||
// Parses the enumeration value.
|
// Parses the enumeration value.
|
||||||
} else if (field.fieldType === 'enumeration') {
|
} else if (field.fieldType === 'enumeration') {
|
||||||
const option = get(field, 'options', []).find(
|
const option = get(field, 'options', []).find(
|
||||||
(option) => option.label === value
|
(option) => option.label?.toLowerCase() === value?.toLowerCase()
|
||||||
);
|
);
|
||||||
_value = get(option, 'key');
|
_value = get(option, 'key');
|
||||||
// Parses the numeric value.
|
// Parses the numeric value.
|
||||||
@@ -433,8 +433,8 @@ export const getMapToPath = (to: string, group = '') =>
|
|||||||
group ? `${group}.${to}` : to;
|
group ? `${group}.${to}` : to;
|
||||||
|
|
||||||
export const getImportsStoragePath = () => {
|
export const getImportsStoragePath = () => {
|
||||||
return path.join(global.__storage_dir, `/imports`);
|
return path.join(global.__storage_dir, `/imports`);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes the imported file from the storage and database.
|
* Deletes the imported file from the storage and database.
|
||||||
|
|||||||
Reference in New Issue
Block a user