Fetches all collections when selecting parent or target collections. Ref. #206

This commit is contained in:
Mateus Machado Luna 2019-03-01 16:34:52 -03:00
parent 644eb28528
commit 91061cdd7d
3 changed files with 5 additions and 8 deletions

View File

@ -696,10 +696,10 @@ export default {
// Generates options for parent collection
this.isFetchingCollections = true;
this.fetchCollectionsForParent()
.then((collections) => {
this.collections = collections;
this.isFetchingCollections = false;
})
.then((collections) => {
this.collections = collections;
this.isFetchingCollections = false;
})
.catch((error) => {
this.$console.error(error);
this.isFetchingCollections = false;

View File

@ -232,9 +232,6 @@ export default {
'runImporter',
'fetchMappingImporter'
]),
...mapActions('collection', [
'fetchCollectionsForParent'
]),
...mapActions('bgprocess', [
'fetchProcess'
]),

View File

@ -447,7 +447,7 @@ export const fetchUsers = ({ commit }, { search, exceptions }) => {
// Fetch Collections for choosing Parent Collection
export const fetchCollectionsForParent = ({ commit }) => {
return new Promise((resolve, reject) => {
axios.tainacan.get('/collections/?fetch_only=name,id')
axios.tainacan.get('/collections/?nopaging=1fetch_only=name,id')
.then(res => {
let collections = res.data;
resolve( collections );