From eedb416936743d7c42e57af0d3bc84e9b21d53c8 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Fri, 22 Mar 2024 16:54:00 +0530 Subject: [PATCH] Added: usage of setLocale API. --- src/adapter/index.ts | 5 +++-- src/main.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/adapter/index.ts b/src/adapter/index.ts index 0fea6aab..387243bd 100644 --- a/src/adapter/index.ts +++ b/src/adapter/index.ts @@ -1,4 +1,4 @@ -import { api, client, getConfig, initialise, logout, resetConfig, updateInstanceUrl, updateToken } from '@hotwax/oms-api' +import { api, client, getConfig, initialise, logout, resetConfig, updateInstanceUrl, updateToken, setUserLocale } from '@hotwax/oms-api' export { api, @@ -8,5 +8,6 @@ export { logout, resetConfig, updateInstanceUrl, - updateToken + updateToken, + setUserLocale } \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index f799e2f2..4565a85f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -32,7 +32,7 @@ import { login, logout, loader } from './user-utils'; import permissionPlugin from '@/authorization'; import permissionRules from '@/authorization/Rules'; import permissionActions from '@/authorization/Actions'; -import { getConfig, initialise } from '@/adapter' +import { getConfig, initialise, setUserLocale} from '@/adapter' import localeMessages from './i18n/locales'; const app = createApp(App) @@ -54,7 +54,8 @@ const app = createApp(App) appLoginUrl: process.env.VUE_APP_LOGIN_URL as string, getConfig: getConfig, initialise: initialise, - localeMessages + localeMessages, + setUserLocale }); // Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters