28 lines
498 B
JavaScript
28 lines
498 B
JavaScript
|
export default {
|
||
|
computed: {
|
||
|
saving() { return this.$store.state.saving; }
|
||
|
},
|
||
|
|
||
|
|
||
|
methods: {
|
||
|
setSaving(value)
|
||
|
{
|
||
|
self.$store.commit('saving', value);
|
||
|
},
|
||
|
|
||
|
|
||
|
showNotification(message, isError)
|
||
|
{
|
||
|
this.$store.dispatch('showNotification', {
|
||
|
message: message,
|
||
|
isError: isError || false
|
||
|
});
|
||
|
},
|
||
|
|
||
|
|
||
|
handleAPIError(messageId, error)
|
||
|
{
|
||
|
this.$store.dispatch('notifyAPIError', { message: this.$i18n.t(messageId), error });
|
||
|
}
|
||
|
}
|
||
|
}
|