Adds compount parent name to geocoordinate select. #692.

This commit is contained in:
mateuswetah 2023-01-16 11:09:49 -03:00
parent ce566e4bd5
commit 360e735a8c
3 changed files with 12 additions and 6 deletions

View File

@ -1843,11 +1843,15 @@ export default {
aMetadatum['metadata_type_options']['children_objects'] && aMetadatum['metadata_type_options']['children_objects'].length
) {
for ( let i = 0; i < aMetadatum['metadata_type_options']['children_objects'].length; i++ )
if ( aMetadatum['metadata_type_options']['children_objects'][i]['metadata_type'] == 'Tainacan\\Metadata_Types\\GeoCoordinate' )
geocoordinateMetadata.push(aMetadatum['metadata_type_options']['children_objects'][i]);
if ( aMetadatum['metadata_type_options']['children_objects'][i]['metadata_type'] == 'Tainacan\\Metadata_Types\\GeoCoordinate' ) {
let childMetadatum = aMetadatum['metadata_type_options']['children_objects'][i];
childMetadatum.name = childMetadatum.name + ' (' + aMetadatum.name + ')';
geocoordinateMetadata.push(childMetadatum);
}
}
});
console.log(geocoordinateMetadata)
return geocoordinateMetadata;
}
},

View File

@ -17,7 +17,7 @@
padding: 0.25rem 0.125rem 0.25rem 1rem;
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
opacity: 0.9;
opacity: 0.8;
transition: opacity ease 0.3s, box-shadow ease 0.3s;
&:hover,

View File

@ -347,11 +347,13 @@ export default {
aMetadatum['metadata_type_options']['children_objects'] && aMetadatum['metadata_type_options']['children_objects'].length
) {
for ( let i = 0; i < aMetadatum['metadata_type_options']['children_objects'].length; i++ )
if ( aMetadatum['metadata_type_options']['children_objects'][i]['metadata_type'] == 'Tainacan\\Metadata_Types\\GeoCoordinate' )
geocoordinateMetadata.push(aMetadatum['metadata_type_options']['children_objects'][i]);
if ( aMetadatum['metadata_type_options']['children_objects'][i]['metadata_type'] == 'Tainacan\\Metadata_Types\\GeoCoordinate' ) {
let childMetadatum = aMetadatum['metadata_type_options']['children_objects'][i];
childMetadatum.name = childMetadatum.name + ' (' + aMetadatum.name + ')';
geocoordinateMetadata.push(childMetadatum);
}
}
});
return geocoordinateMetadata;
}
},