Proper error message and group order fix in select

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-05-15 23:35:07 +02:00
parent e23e28b3cc
commit 746f3c9053
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
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

View File

@ -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

View File

@ -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);
}
};