Continue implementation of fetch_only for items page.
This commit is contained in:
parent
698e433cdc
commit
80a19d68db
|
@ -290,9 +290,8 @@
|
|||
id: field.id,
|
||||
display: display
|
||||
}
|
||||
);
|
||||
this.$eventBusSearch.addFetchOnlyMeta(field.id);
|
||||
|
||||
);
|
||||
this.$eventBusSearch.addFetchOnlyMeta(field.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ export default {
|
|||
}
|
||||
},
|
||||
addFetchOnlyMeta( field ){
|
||||
this.$store.dispatch('search/add_fecthonly_meta', field );
|
||||
this.$store.dispatch('search/add_fetchonly_meta', field );
|
||||
},
|
||||
getErrors( filter_id ){
|
||||
let error = this.errors.find( errorItem => errorItem.field_id === filter_id );
|
||||
|
|
|
@ -26,6 +26,7 @@ export const add_fetchonly = ( { commit }, field ) => {
|
|||
};
|
||||
// Fetch Only for metadata limiting on results
|
||||
export const add_fetchonly_meta = ( { commit }, field ) => {
|
||||
|
||||
if( field && field.length === 0 ){
|
||||
commit('removeFetchOnlyMeta', field );
|
||||
} else {
|
||||
|
|
|
@ -34,11 +34,6 @@ export const getSearchQuery = state => {
|
|||
return state.postquery.search;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
export const getStatus = state => {
|
||||
return state.postquery.status;
|
||||
=======
|
||||
export const getFecthOnly = state => {
|
||||
return state.postquery.fetchonly;
|
||||
>>>>>>> Begins implementation of FetchOnly for displayed fields in item page.
|
||||
}
|
|
@ -79,25 +79,8 @@ export const removeTaxQuery = ( state, filter ) => {
|
|||
}
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
export const removePostQueryAttribute = ( state, attribute) => {
|
||||
Vue.set( state.postquery, attribute , '');
|
||||
=======
|
||||
export const removeFetchOnly = ( state, field ) => {
|
||||
let index = state.postquery.fetchonly.findIndex( item => item === field);
|
||||
if (index >= 0) {
|
||||
state.postquery.metaquery.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
export const removeFetchOnlyMeta = ( state, field ) => {
|
||||
if(state.postquery.fetchonly['meta'] != undefined) {
|
||||
let index = state.postquery.fetchonly['meta'].findIndex( item => item === field);
|
||||
if (index >= 0) {
|
||||
state.postquery.metaquery.splice(index, 1);
|
||||
}
|
||||
}
|
||||
>>>>>>> Begins implementation of FetchOnly for displayed fields in item page.
|
||||
};
|
||||
|
||||
export const setTotalItems = ( state, total ) => {
|
||||
|
@ -108,11 +91,6 @@ export const setSearchQuery = ( state, searchQuery ) => {
|
|||
state.postquery.search = searchQuery;
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
export const setStatus = ( state, status ) => {
|
||||
state.status = status;
|
||||
=======
|
||||
export const setSearchQueryMeta = ( state, searchQueryMeta ) => {
|
||||
state.postquery.search['meta'] = searchQueryMeta;
|
||||
>>>>>>> Begins implementation of FetchOnly for displayed fields in item page.
|
||||
};
|
Loading…
Reference in New Issue