Vuelidate, I18n, and filter are upgraded to vue3
While navigating to the pages i18n, vuelidate, and filters errors
occurred. i18n, and vuelidate code changes in each page adapted to
vue3. Filter global function for date and time format implemented
in the main.js file and those files which as called the filter
functions.
Change-Id: If1a2ee22d47750faef1c35ef2c263299067d9a20
Signed-off-by: Surya Venkatesan <suryav@ami.com>
diff --git a/src/components/Mixins/BVToastMixin.js b/src/components/Mixins/BVToastMixin.js
index 4ee757f..c8b58da 100644
--- a/src/components/Mixins/BVToastMixin.js
+++ b/src/components/Mixins/BVToastMixin.js
@@ -1,4 +1,5 @@
import StatusIcon from '../Global/StatusIcon';
+import i18n from '@/i18n';
const BVToastMixin = {
components: {
@@ -26,7 +27,7 @@
}
},
$_BVToastMixin_createTimestamp() {
- const timestamp = this.$options.filters.formatTime(new Date());
+ const timestamp = this.$filters.formatTime(new Date());
return this.$createElement('p', { class: 'mt-3 mb-0' }, timestamp);
},
$_BVToastMixin_createRefreshAction() {
@@ -40,7 +41,7 @@
},
},
},
- this.$t('global.action.refresh'),
+ i18n.global.t('global.action.refresh'),
);
},
$_BVToastMixin_initToast(body, title, variant) {
@@ -56,7 +57,7 @@
successToast(
message,
{
- title: t = this.$t('global.status.success'),
+ title: t = i18n.global.t('global.status.success'),
timestamp,
refreshAction,
} = {},
@@ -70,7 +71,7 @@
errorToast(
message,
{
- title: t = this.$t('global.status.error'),
+ title: t = i18n.global.t('global.status.error'),
timestamp,
refreshAction,
} = {},
@@ -84,7 +85,7 @@
warningToast(
message,
{
- title: t = this.$t('global.status.warning'),
+ title: t = i18n.global.t('global.status.warning'),
timestamp,
refreshAction,
} = {},
@@ -98,7 +99,7 @@
infoToast(
message,
{
- title: t = this.$t('global.status.informational'),
+ title: t = i18n.global.t('global.status.informational'),
timestamp,
refreshAction,
} = {},