Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: product identifier component in settings page from dxp-components (dxp-178) #216

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 190 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@casl/vue": "^2.2.0",
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.1.0",
"@hotwax/dxp-components": "1.7.5",
"@hotwax/dxp-components": "1.8.0",
"@hotwax/oms-api": "^1.10.0",
"@ionic/core": "6.7.5",
"@ionic/vue": "6.7.5",
Expand Down
5 changes: 5 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { mapGetters, useStore } from 'vuex';
import { Settings } from 'luxon'
import Menu from '@/components/Menu.vue';
import { initialise, resetConfig } from '@/adapter'
import { useProductIdentificationStore } from '@hotwax/dxp-components';

export default defineComponent({
name: 'App',
Expand Down Expand Up @@ -104,6 +105,10 @@ export default defineComponent({
const defaultAliasInstanceUrl = this.alias[this.defaultAlias];
this.store.dispatch("user/setUserInstanceUrl", defaultAliasInstanceUrl);
}

// Get product identification from api using dxp-component
await useProductIdentificationStore().getIdentificationPref(this.eComStore?.productStoreId)
.catch((error) => console.error(error));
},
unmounted() {
emitter.off('presentLoader', this.presentLoader);
Expand Down
4 changes: 3 additions & 1 deletion src/adapter/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { api, client, getConfig, init, initialise, logout, resetConfig, updateInstanceUrl, updateToken } from '@hotwax/oms-api'
import { api, client, getConfig, getProductIdentificationPref, init, initialise, logout, resetConfig, setProductIdentificationPref, updateInstanceUrl, updateToken } from '@hotwax/oms-api'

export {
api,
client,
getConfig,
getProductIdentificationPref,
init,
initialise,
logout,
resetConfig,
setProductIdentificationPref,
updateInstanceUrl,
updateToken
}
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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, initialise } from '@/adapter'
import { getConfig, getProductIdentificationPref, initialise, setProductIdentificationPref } from '@/adapter'


const app = createApp(App)
Expand All @@ -59,7 +59,9 @@ const app = createApp(App)
loader,
appLoginUrl: process.env.VUE_APP_LOGIN_URL as string,
getConfig,
initialise
getProductIdentificationPref,
initialise,
setProductIdentificationPref
});

// Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters
Expand Down
Loading
Loading