Skip to content

Commit

Permalink
Fixed: productIdentifier failing on login (dxp-178)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jan 9, 2024
1 parent 95d7c5a commit 06d65c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import permissionRules from '@/authorization/Rules';
import permissionActions from '@/authorization/Actions';
import { dxpComponents } from '@hotwax/dxp-components'
import { login, logout, loader } from './user-utils';
import { getConfig, getProductIdentificationPref, initialise, setProductIdentificationPref } from './adapter';
import { getConfig, getProductIdentificationPref, initialise, setProductIdentificationPref } from '@/adapter';

const app = createApp(App)
.use(IonicVue, {
Expand Down
8 changes: 4 additions & 4 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ const actions: ActionTree<UserState, RootState> = {
const currentEComStore = await UserService.getCurrentEComStore(token, currentFacility?.facilityId);
const currentQOHViewConfig = await UserService.getQOHViewConfig(token, currentEComStore?.productStoreId);

// Get product identification from api using dxp-component
await useProductIdentificationStore().getIdentificationPref(currentEComStore?.productStoreId)
.catch((error) => console.error(error));

/* ---- Guard clauses ends here --- */

setPermissions(appPermissions);
Expand All @@ -95,6 +91,10 @@ const actions: ActionTree<UserState, RootState> = {
commit(types.USER_PERMISSIONS_UPDATED, appPermissions);
commit(types.USER_VIEW_QOH_CNFG_UPDATED, { currentQOHViewConfig, viewQOH: currentQOHViewConfig.settingValue == "true" })
commit(types.USER_TOKEN_CHANGED, { newToken: token })

// Get product identification from api using dxp-component
await useProductIdentificationStore().getIdentificationPref(currentEComStore?.productStoreId)
.catch((error) => console.error(error));
} catch (err: any) {
// If any of the API call in try block has status code other than 2xx it will be handled in common catch block.
// TODO Check if handling of specific status codes is required.
Expand Down

0 comments on commit 06d65c9

Please sign in to comment.