Proper error message and group order fix in select
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
e23e28b3cc
commit
746f3c9053
4 changed files with 10 additions and 6 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -183,7 +183,9 @@ export default {
|
|||
},
|
||||
groups() {
|
||||
// data provided php side + remove the disabled group
|
||||
return this.$store.getters.getGroups.filter(group => group.id !== 'disabled');
|
||||
return this.$store.getters.getGroups
|
||||
.filter(group => group.id !== 'disabled')
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
},
|
||||
subAdminsGroups() {
|
||||
// data provided php side
|
||||
|
|
|
@ -10,9 +10,11 @@ const debug = process.env.NODE_ENV !== 'production';
|
|||
|
||||
const mutations = {
|
||||
API_FAILURE(state, error) {
|
||||
OC.Notification.showTemporary(t('settings','An error occured during the request. Unable to proceed.'));
|
||||
let message = error.error.response.data.ocs.meta.message;
|
||||
OC.Notification.showHtml(t('settings','An error occured during the request. Unable to proceed.')+'<br>'+message, {timeout: 7});
|
||||
// throw to raise exception of the promise and allow a `.then` in the Vue methods
|
||||
throw error;
|
||||
console.log(state, error);
|
||||
throw new Error(error);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue