From cbe67ac24d78467ea7b216c1402b60cb0e56f022 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 25 Jun 2024 11:16:32 +0530 Subject: [PATCH 1/2] Fixed: typo in the translation entry of country text (#27) --- src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index c757e2e..489dcbe 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -23,7 +23,7 @@ "Configure when no further order information is needed prior to order approval.": "Configure when no further order information is needed prior to order approval.", "Confirm": "Confirm", "Control what your customers are allowed to edit on their own when they are editing their order on Re-route Fulfillment.": "Control what your customers are allowed to edit on their own when they are editing their order on Re-route Fulfillment.", - "Country": "{count} country", + "country": "{count} country", "countries": "{count} countries", "Create a new product store": "Create a new product store", "Create deadline days": "Create deadline days", From 9133dce2c257f48cd1da32cc06e2d507ca0fb062 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 25 Jun 2024 11:35:48 +0530 Subject: [PATCH 2/2] Improved: baseUrl for logging, fetching userProfile and timeZones using Admin component (#27) --- src/services/UserService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/UserService.ts b/src/services/UserService.ts index 6c1d480..05f0bba 100644 --- a/src/services/UserService.ts +++ b/src/services/UserService.ts @@ -4,7 +4,7 @@ import { hasError } from "@/utils"; const login = async (token: string): Promise => { const url = store.getters["user/getBaseUrl"] - const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url.replace("admin", "available-to-promise") : `${url}/rest/s1/available-to-promise/` : `https://${url}.hotwax.io/rest/s1/available-to-promise/`; + const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url : `${url}/rest/s1/admin/` : `https://${url}.hotwax.io/rest/s1/admin/`; let api_key = "" try { @@ -33,7 +33,7 @@ const login = async (token: string): Promise => { const getUserProfile = async (token: any): Promise => { const url = store.getters["user/getBaseUrl"] - const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url.replace("admin", "available-to-promise") : `${url}/rest/s1/available-to-promise/` : `https://${url}.hotwax.io/rest/s1/available-to-promise/`; + const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url : `${url}/rest/s1/admin/` : `https://${url}.hotwax.io/rest/s1/admin/`; try { const resp = await client({ url: "user/profile", @@ -53,7 +53,7 @@ const getUserProfile = async (token: any): Promise => { const getAvailableTimeZones = async (): Promise => { const url = store.getters["user/getBaseUrl"] - const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url.replace("admin", "available-to-promise") : `${url}/rest/s1/available-to-promise/` : `https://${url}.hotwax.io/rest/s1/available-to-promise/`; + const baseURL = url.startsWith('http') ? url.includes('/rest/s1/admin') ? url : `${url}/rest/s1/admin/` : `https://${url}.hotwax.io/rest/s1/admin/`; return client({ url: "user/getAvailableTimeZones", method: "get",