Checks new constant do display relationship metadata as avialable for search #624

This commit is contained in:
mateuswetah 2021-10-29 11:38:12 -03:00
parent 01c105e308
commit 1c34c3d2d4
1 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,8 @@
modelSearch:'',
collectionType: '',
collectionMessage: '',
displayRelatedItemMetadata: []
displayRelatedItemMetadata: [],
isMetaqueryRelationshipEnabled: tainacan_plugin && tainacan_plugin.tainacan_enable_relationship_metaquery == true ? tainacan_plugin.tainacan_enable_relationship_metaquery : false
}
},
computed: {
@ -205,7 +206,7 @@
this.metadata = [];
for (let metadatum of metadata) {
if (metadatum.metadata_type_object.component !== 'tainacan-relationship' && metadatum.metadata_type_object.component !== 'tainacan-compound') {
if ( (metadatum.metadata_type_object.component !== 'tainacan-relationship' || this.isMetaqueryRelationshipEnabled) && metadatum.metadata_type_object.component !== 'tainacan-compound' ) {
this.metadata.push( metadatum );
this.hasMetadata = true;
this.checkMetadata();