Removes context edit query from collection list in repository collection filters.
This commit is contained in:
parent
e0cf6dd276
commit
7aa13a6ecf
|
@ -52,7 +52,11 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.fetchCollections({ page: 1, collectionsPerPage: 96 })
|
this.fetchCollections({
|
||||||
|
page: 1,
|
||||||
|
collectionsPerPage: 96,
|
||||||
|
contextEdit: true
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.collections = res.collections;
|
this.collections = res.collections;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
|
@ -42,7 +42,12 @@
|
||||||
open: false,
|
open: false,
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.fetchCollections({page: 1, collectionsPerPage: -1, status: null});
|
this.fetchCollections({
|
||||||
|
page: 1,
|
||||||
|
collectionsPerPage: -1,
|
||||||
|
status: null,
|
||||||
|
contextEdit: false
|
||||||
|
});
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
let routeQueries = this.$route.query;
|
let routeQueries = this.$route.query;
|
||||||
|
|
|
@ -205,7 +205,11 @@ export default {
|
||||||
loadCollections() {
|
loadCollections() {
|
||||||
this.cleanCollections();
|
this.cleanCollections();
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.fetchCollections({ 'page': this.page, 'collectionsPerPage': this.collectionsPerPage, 'status': this.status })
|
this.fetchCollections({
|
||||||
|
'page': this.page,
|
||||||
|
'collectionsPerPage': this.collectionsPerPage,
|
||||||
|
'status': this.status,
|
||||||
|
'contextEdit': true })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.totalCollections = res.total;
|
this.totalCollections = res.total;
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
'repository-level-page': isRepositoryLevel,
|
'repository-level-page': isRepositoryLevel,
|
||||||
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
||||||
}"> -->
|
}"> -->
|
||||||
<div :class="{
|
<div
|
||||||
|
:class="{
|
||||||
'repository-level-page': isRepositoryLevel,
|
'repository-level-page': isRepositoryLevel,
|
||||||
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
||||||
}">
|
}">
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
'repository-level-page': isRepositoryLevel,
|
'repository-level-page': isRepositoryLevel,
|
||||||
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
||||||
}"> -->
|
}"> -->
|
||||||
<div :class="{
|
<div
|
||||||
|
:class="{
|
||||||
'repository-level-page': isRepositoryLevel,
|
'repository-level-page': isRepositoryLevel,
|
||||||
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
'is-fullscreen': registeredViewModes[viewMode] != undefined && registeredViewModes[viewMode].full_screen
|
||||||
}">
|
}">
|
||||||
|
|
|
@ -128,9 +128,13 @@ export const deleteItem = ({ commit }, { itemId, isPermanently }) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fetchCollections = ({commit} , { page, collectionsPerPage, status }) => {
|
export const fetchCollections = ({commit} , { page, collectionsPerPage, status, contextEdit }) => {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let endpoint = '/collections?paged='+page+'&perpage='+collectionsPerPage+'&context=edit';
|
let endpoint = '/collections?paged='+page+'&perpage='+collectionsPerPage;
|
||||||
|
|
||||||
|
if (contextEdit)
|
||||||
|
endpoint = endpoint + '&context=edit';
|
||||||
|
|
||||||
if (status != '' && status != undefined)
|
if (status != '' && status != undefined)
|
||||||
endpoint = endpoint + '&status=' + status;
|
endpoint = endpoint + '&status=' + status;
|
||||||
|
|
Loading…
Reference in New Issue