Commit b13dc3ab authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix: Uploading descriptor definitions

- requires creator
- skip `published` column
- render UOM in DescriptorCard
parent db1df18d
......@@ -151,8 +151,9 @@ const DescriptorCard = ({ complete = true, compact, descriptor, classes, classNa
title={ descriptor.uuid ?
<DescriptorLink to={ descriptor }>
<Markdown basic source={ descriptor.title || t('descriptors.public.c.card.untitled') }/>
{ descriptor.uom && ` [${descriptor.uom}]` }
</DescriptorLink>
: <Markdown basic source={ descriptor.title }/> || t('descriptors.public.c.card.untitled')
: <Markdown basic source={ descriptor.title } /> || t('descriptors.public.c.card.untitled')
}
/>
<CardContent>
......
......@@ -116,11 +116,11 @@ class DescriptorParser extends React.Component<IDescriptorParser, any> {
headers: [
'crop', 'versionTag', 'title', 'category', 'description', 'dataType',
'integerOnly', 'minValue', 'maxValue', 'vocabularyId', 'code', 'code_title', 'code_description',
'published', 'columnName', 'uom', 'headingNumber'],
'columnName', 'uom', 'headingNumber'],
})
.subscribe((jsonObj) => {
// console.log('CSV Sourced Descriptor:', jsonObj);
if (jsonObj.minValue) {
jsonObj.minValue = +jsonObj.minValue;
}
......
......@@ -38,9 +38,9 @@ class DescriptorEditPage extends React.Component<IDescriptorEditPageProps, any>
log('onSave', updatedDescriptor);
if (updatedDescriptor.uuid && updatedDescriptor.version) {
delete updatedDescriptor.owner;
}
// if (updatedDescriptor.uuid && updatedDescriptor.version) {
// delete updatedDescriptor.owner;
// }
saveDescriptor(updatedDescriptor);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment