Skip to content

Commit

Permalink
fix : codelist Name instead of name
Browse files Browse the repository at this point in the history
  • Loading branch information
BulotF committed Nov 6, 2023
1 parent a4195bd commit 85616e5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/model/transformations/codes-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function remoteToStore(remote, variableclarification) {
id,
Label: label,
Code: codes,
Name: name,
Urn: urn,
SuggesterParameters: suggesterParameters,
} = codesList;
Expand All @@ -79,15 +80,15 @@ export function remoteToStore(remote, variableclarification) {
? {
id,
label,
name: '',
name,
urn,
suggesterParameters,
}
: {
id,
label,
codes: remoteToCodesState(codes),
name: '',
name: name || '',
},
};
}, {});
Expand Down Expand Up @@ -119,6 +120,7 @@ export function storeToRemote(store) {
const {
id,
label,
name = '',
codes = [],
urn = '',
suggesterParameters = {},
Expand All @@ -128,7 +130,7 @@ export function storeToRemote(store) {
? {
id,
Label: label,
Name: '',
Name: name,
Code: getCodesListSortedByDepthAndWeight(codes).map(keyCode => {
const { label: labelCode, value, parent } = codes[keyCode];
return {
Expand All @@ -140,7 +142,7 @@ export function storeToRemote(store) {
}
: {
id,
name: id,
Name: name,
Label: label,
Urn: urn,
SuggesterParameters: suggesterParameters,
Expand Down

0 comments on commit 85616e5

Please sign in to comment.