Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
9e1ce589
Commit
9e1ce589
authored
Jun 16, 2021
by
Matthieu Benoist
Browse files
Complex data corrections for string array
parent
4e985f28
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/dataset-detail/components/dataset-data-details/dataset-data-details.component.ts
View file @
9e1ce589
...
@@ -22,6 +22,12 @@ export class DatasetDataDetailsComponent implements OnInit {
...
@@ -22,6 +22,12 @@ export class DatasetDataDetailsComponent implements OnInit {
}
catch
(
err
)
{
}
}
catch
(
err
)
{
}
}
}
}
}
else
if
(
Array
.
isArray
(
properties
[
key
]))
{
try
{
const
parsed
=
JSON
.
parse
(
properties
[
key
]);
properties
[
key
]
=
parsed
;
}
catch
(
err
)
{
}
}
}
}
this
.
_properties
=
properties
;
this
.
_properties
=
properties
;
}
}
...
...
src/app/dataset-detail/services/dataset-detail.service.ts
View file @
9e1ce589
...
@@ -284,7 +284,8 @@ export class DatasetDetailService {
...
@@ -284,7 +284,8 @@ export class DatasetDetailService {
var
fieldtype
=
field
+
'
_
'
+
eval
(
`this._dataset.fields.types.
${
field
}
`
);
var
fieldtype
=
field
+
'
_
'
+
eval
(
`this._dataset.fields.types.
${
field
}
`
);
newDataPropertiesOrder
[
field
]
=
data
.
properties
[
fieldtype
]
?
data
.
properties
[
fieldtype
]
:
newDataPropertiesOrder
[
field
]
=
data
.
properties
[
fieldtype
]
?
data
.
properties
[
fieldtype
]
:
data
.
properties
[
field
]
?
data
.
properties
[
field
]
:
data
.
properties
[
`
${
field
}
_json`
]
?
data
.
properties
[
field
]
?
data
.
properties
[
field
]
:
data
.
properties
[
`
${
field
}
_json`
]
?
data
.
properties
[
`
${
field
}
_json`
]
:
''
;
data
.
properties
[
`
${
field
}
_json`
]
:
data
.
properties
[
`
${
field
}
_str`
]
?
data
.
properties
[
`
${
field
}
_str`
]
:
''
;
});
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment