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/views/HardwareStatus/Inventory/Inventory.vue b/src/views/HardwareStatus/Inventory/Inventory.vue
index d05e32e..a3f4d23 100644
--- a/src/views/HardwareStatus/Inventory/Inventory.vue
+++ b/src/views/HardwareStatus/Inventory/Inventory.vue
@@ -64,6 +64,8 @@
import JumpLink16 from '@carbon/icons-vue/es/jump-link/16';
import JumpLinkMixin from '@/components/Mixins/JumpLinkMixin';
import { chunk } from 'lodash';
+import { useI18n } from 'vue-i18n';
+import i18n from '@/i18n';
export default {
components: {
@@ -89,54 +91,55 @@
},
data() {
return {
+ $t: useI18n().t,
links: [
{
id: 'system',
dataRef: 'system',
href: '#system',
- linkText: this.$t('pageInventory.system'),
+ linkText: i18n.global.t('pageInventory.system'),
},
{
id: 'bmc',
dataRef: 'bmc',
href: '#bmc',
- linkText: this.$t('pageInventory.bmcManager'),
+ linkText: i18n.global.t('pageInventory.bmcManager'),
},
{
id: 'chassis',
dataRef: 'chassis',
href: '#chassis',
- linkText: this.$t('pageInventory.chassis'),
+ linkText: i18n.global.t('pageInventory.chassis'),
},
{
id: 'dimms',
dataRef: 'dimms',
href: '#dimms',
- linkText: this.$t('pageInventory.dimmSlot'),
+ linkText: i18n.global.t('pageInventory.dimmSlot'),
},
{
id: 'fans',
dataRef: 'fans',
href: '#fans',
- linkText: this.$t('pageInventory.fans'),
+ linkText: i18n.global.t('pageInventory.fans'),
},
{
id: 'powerSupply',
dataRef: 'powerSupply',
href: '#powerSupply',
- linkText: this.$t('pageInventory.powerSupplies'),
+ linkText: i18n.global.t('pageInventory.powerSupplies'),
},
{
id: 'processors',
dataRef: 'processors',
href: '#processors',
- linkText: this.$t('pageInventory.processors'),
+ linkText: i18n.global.t('pageInventory.processors'),
},
{
id: 'assembly',
dataRef: 'assembly',
href: '#assembly',
- linkText: this.$t('pageInventory.assemblies'),
+ linkText: i18n.global.t('pageInventory.assemblies'),
},
],
};