v1.6 released

This commit is contained in:
carodej
2020-05-28 13:00:54 +02:00
parent a76d1dec3b
commit 252b6fd0bf
63 changed files with 1205 additions and 938 deletions

View File

@@ -89,6 +89,15 @@
this.$router.push({name: 'Users'})
})
.catch(() => {
this.isSendingRequest = false
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
})
}
}
}

View File

@@ -64,6 +64,7 @@
import ButtonBase from '@/components/FilesView/ButtonBase'
import SetupBox from '@/components/Others/Forms/SetupBox'
import {required} from 'vee-validate/dist/rules'
import { mapGetters } from 'vuex'
import {events} from "@/bus"
import axios from 'axios'
@@ -81,20 +82,13 @@
SetupBox,
required,
},
computed: {
...mapGetters(['roles']),
},
data() {
return {
isLoading: false,
isSendingRequest: false,
roles: [
{
label: this.$t('roles.admin'),
value: 'admin',
},
{
label: this.$t('roles.user'),
value: 'user',
},
],
userRole: undefined,
}
},
@@ -129,8 +123,14 @@
message: this.$t('toaster.changed_user'),
})
})
.catch(error => {
.catch(() => {
this.isSendingRequest = false
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
})
}
}

View File

@@ -57,6 +57,15 @@
message: this.$t('toaster.sended_password'),
})
})
.catch(() => {
this.isSendingRequest = false
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
})
}
}
}

View File

@@ -22,6 +22,8 @@
<input v-model="capacity"
:placeholder="$t('admin_page_user.label_change_capacity')"
type="number"
min="1"
max="999999999"
:class="{'is-error': errors[0]}"
/>
<ButtonBase :loading="isSendingRequest" :disabled="isSendingRequest" type="submit" button-style="theme" class="submit-button">
@@ -106,6 +108,23 @@
.catch(error => {
this.isSendingRequest = false
if (error.response.status == 422) {
// Password validation error
if (error.response.data.errors['attributes.storage_capacity']) {
this.$refs.changeStorageCapacity.setErrors({
'Capacity': 'The storage capacity must be lower than 10 digit number.'
});
}
} else {
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
}
})
},
getStorageDetails() {