Add batch actions to local user table
- Create TableToolbar component for table batch actions
- Added Toast warning type and toast title message translations
- Update vue-i18n package to latest v8.15.3 to use improved
pluarlization features
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I455beba4f56b8209b1201bbc5ff3f616e960d189
diff --git a/src/components/Mixins/BVToastMixin.js b/src/components/Mixins/BVToastMixin.js
index 489173c..a46f5e5 100644
--- a/src/components/Mixins/BVToastMixin.js
+++ b/src/components/Mixins/BVToastMixin.js
@@ -1,22 +1,33 @@
+import i18n from '../../i18n';
+
const BVToastMixin = {
methods: {
- successToast(message) {
+ successToast(message, title = i18n.t('global.response.success')) {
this.$root.$bvToast.toast(message, {
- title: 'Success',
+ title,
variant: 'success',
autoHideDelay: 10000, //auto hide in milliseconds
isStatus: true,
solid: true
});
},
- errorToast(message) {
+ errorToast(message, title = i18n.t('global.response.error')) {
this.$root.$bvToast.toast(message, {
- title: 'Error',
+ title,
variant: 'danger',
noAutoHide: true,
isStatus: true,
solid: true
});
+ },
+ warningToast(message, title = i18n.t('global.response.warning')) {
+ this.$root.$bvToast.toast(message, {
+ title,
+ variant: 'warning',
+ noAutoHide: true,
+ isStatus: true,
+ solid: true
+ });
}
}
};