diff --git a/src/locales/en.json b/src/locales/en.json index 08d538d..2de0d18 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -93,6 +93,7 @@ "Failed to upload image.": "Failed to upload image.", "Favorites": "Favorites", "Fetching time zones": "Fetching time zones", + "Fetching user details": "Fetching user details", "Fields cannot be empty.": "Fields cannot be empty.", "Filters": "Filters", "Finish and create new user": "Finish and create new user", @@ -214,6 +215,7 @@ "Users": "Users", "user.name": "user.name", "Username": "Username", + "User not found": "User not found", "Verify password": "Verify password", "View product store": "View product store", "will be asked to reset their password when they login": "{name} will be asked to reset their password when they login", diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 9958679..45ebd24 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -230,9 +230,6 @@ const actions: ActionTree = { throw userResp.data } } catch (error) { - if (hasError(userResp)) { - showToast(translate('Something went wrong.')); - } logger.error(error) } @@ -283,10 +280,8 @@ const actions: ActionTree = { selectedUser['createdByUserPartyId'] = resp.data.docs[0].partyId } } - commit(types.USER_SELECTED_USER_UPDATED, selectedUser) }, - updateSelectedUser({ commit }, selectedUser) { commit(types.USER_SELECTED_USER_UPDATED, selectedUser) }, diff --git a/src/views/UserDetails.vue b/src/views/UserDetails.vue index 842b125..d881d34 100644 --- a/src/views/UserDetails.vue +++ b/src/views/UserDetails.vue @@ -8,7 +8,16 @@ -
+
+ + + {{ translate("Fetching user details") }} + +
+
+

{{ translate("User not found") }}

+
+
@@ -497,6 +506,7 @@ export default defineComponent({ shopifyShopsForProductStore: [] as any } }, + async ionViewWillEnter() { this.isUserFetched = false await this.store.dispatch("user/getSelectedUserDetails", { partyId: this.partyId, isFetchRequired: true });