Removes console log and updates taxonomy filters.
This commit is contained in:
parent
3f0bb33091
commit
a459d23cc2
|
@ -116,12 +116,12 @@
|
||||||
|
|
||||||
if ( this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' ) {
|
if ( this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' ) {
|
||||||
let query = qs.stringify({ postin: metadata.value, fetch_only: 'title,thumbnail', fetch_only_meta: '' });
|
let query = qs.stringify({ postin: metadata.value, fetch_only: 'title,thumbnail', fetch_only_meta: '' });
|
||||||
let endpoint = '/items/' + metadata.value;
|
let endpoint = '/items/';
|
||||||
|
|
||||||
if (this.relatedCollectionId != '')
|
if (this.relatedCollectionId != '')
|
||||||
endpoint = '/collection/' + this.relatedCollectionId + endpoint;
|
endpoint = '/collection/' + this.relatedCollectionId + endpoint;
|
||||||
|
|
||||||
axios.get(endpoint + query)
|
axios.get(endpoint + '?' + query)
|
||||||
.then( res => {
|
.then( res => {
|
||||||
if (res.data.items) {
|
if (res.data.items) {
|
||||||
this.selected = [];
|
this.selected = [];
|
||||||
|
|
|
@ -81,13 +81,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' &&
|
if (this.filter.metadatum &&
|
||||||
this.filter.metadatum &&
|
|
||||||
this.filter.metadatum.metadata_type_object &&
|
this.filter.metadatum.metadata_type_object &&
|
||||||
this.filter.metadatum.metadata_type_object.options &&
|
this.filter.metadatum.metadata_type_object.options &&
|
||||||
|
this.filter.metadatum.metadata_type_object.options.taxonomy &&
|
||||||
this.filter.metadatum.metadata_type_object.options.taxonomy_id) {
|
this.filter.metadatum.metadata_type_object.options.taxonomy_id) {
|
||||||
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
||||||
this.taxonomy = 'tnc_tax_' + this.taxonomyId;
|
this.taxonomy = this.filter.metadatum.metadata_type_object.options.taxonomy;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|
|
@ -44,13 +44,13 @@
|
||||||
export default {
|
export default {
|
||||||
mixins: [ filterTypeMixin, dynamicFilterTypeMixin ],
|
mixins: [ filterTypeMixin, dynamicFilterTypeMixin ],
|
||||||
created() {
|
created() {
|
||||||
if (this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' &&
|
if (this.filter.metadatum &&
|
||||||
this.filter.metadatum &&
|
|
||||||
this.filter.metadatum.metadata_type_object &&
|
this.filter.metadatum.metadata_type_object &&
|
||||||
this.filter.metadatum.metadata_type_object.options &&
|
this.filter.metadatum.metadata_type_object.options &&
|
||||||
|
this.filter.metadatum.metadata_type_object.options.taxonomy &&
|
||||||
this.filter.metadatum.metadata_type_object.options.taxonomy_id) {
|
this.filter.metadatum.metadata_type_object.options.taxonomy_id) {
|
||||||
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
||||||
this.taxonomy = 'tnc_tax_' + this.taxonomyId;
|
this.taxonomy = this.filter.metadatum.metadata_type_object.options.taxonomy;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -36,7 +36,6 @@ export const addMetaQuery = ( state, filter ) => {
|
||||||
compare: filter.compare,
|
compare: filter.compare,
|
||||||
type: filter.type
|
type: filter.type
|
||||||
});
|
});
|
||||||
console.log(state.postquery.metaquery);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue