diff --git a/package-lock.json b/package-lock.json index 4c9643a1..701a101b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", - "@hotwax/dxp-components": "^1.15.3", + "@hotwax/dxp-components": "^1.15.4", "@hotwax/oms-api": "^1.16.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", @@ -2792,9 +2792,9 @@ "integrity": "sha512-zpUjGoY7LBlKeiP0V7tonrmoey8HQ5THQmyixQ+IDtrjmEJNBjynW/Ef3gC0FUNNPuVqxWPZdT5CVgaETLGTwg==" }, "node_modules/@hotwax/dxp-components": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.15.3.tgz", - "integrity": "sha512-D8PXmlDV1TJNlDt0p2mydXBvWJrNWqiRASYPNy0YiiaMaMUALvGD1Ak6w+4mCsFuadiWcbxBtFyBFfAMDWULIQ==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/@hotwax/dxp-components/-/dxp-components-1.15.4.tgz", + "integrity": "sha512-dlgexo/QBLnLlPkq1zwfWBIPiVtmZKsRcPcCAwe+eFz9qPwyQORdzKb6YjX1WgtRU72GYMv345eA+HuaSY6H5w==", "dependencies": { "@hotwax/oms-api": "^1.8.1", "@ionic/core": "^7.6.0", diff --git a/package.json b/package.json index 647623da..a111ae9a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@casl/ability": "^6.0.0", "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.6", - "@hotwax/dxp-components": "^1.15.3", + "@hotwax/dxp-components": "^1.15.4", "@hotwax/oms-api": "^1.16.0", "@ionic/core": "^7.6.0", "@ionic/vue": "^7.6.0", diff --git a/src/authorization/Actions.ts b/src/authorization/Actions.ts index 3a0d9b73..2b87fc4e 100644 --- a/src/authorization/Actions.ts +++ b/src/authorization/Actions.ts @@ -1,5 +1,6 @@ export default { 'APP_SHIPMENT_UPDATE': 'APP_SHIPMENT_UPDATE', 'APP_SHIPMENT_ADMIN': 'APP_SHIPMENT_ADMIN', - 'APP_PRODUCT_IDENTIFIER_UPDATE': 'APP_PRODUCT_IDENTIFIER_UPDATE' + 'APP_PRODUCT_IDENTIFIER_UPDATE': 'APP_PRODUCT_IDENTIFIER_UPDATE', + 'APP_COMMERCE_VIEW': 'APP_COMMERCE_VIEW' } \ No newline at end of file diff --git a/src/authorization/Rules.ts b/src/authorization/Rules.ts index 121ead31..7d013436 100644 --- a/src/authorization/Rules.ts +++ b/src/authorization/Rules.ts @@ -9,5 +9,6 @@ export default { 'APP_SHIPMENT_ADMIN': 'RECEIVING_ADMIN', 'APP_RECVG_ADMIN': 'COMMON_ADMIN', 'APP_PRODUCT_IDENTIFIER_UPDATE':'COMMON_ADMIN', - 'RECEIVING_APP_VIEW': 'RECEIVING_APP_VIEW' + 'RECEIVING_APP_VIEW': 'RECEIVING_APP_VIEW', + 'APP_COMMERCE_VIEW': 'COMMERCEUSER_VIEW' } as any diff --git a/src/main.ts b/src/main.ts index b26f9a42..af29d7d9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,7 +27,7 @@ import '@ionic/vue/css/display.css'; import './theme/variables.css'; import store from './store' -import permissionPlugin from '@/authorization'; +import permissionPlugin, { Actions, hasPermission } from '@/authorization'; import permissionRules from '@/authorization/Rules'; import permissionActions from '@/authorization/Actions'; import { dxpComponents } from '@hotwax/dxp-components' @@ -47,6 +47,7 @@ const app = createApp(App) actions: permissionActions }) .use(dxpComponents, { + Actions, defaultImgUrl: require("@/assets/images/defaultImage.png"), login, logout, @@ -58,7 +59,8 @@ const app = createApp(App) localeMessages, setUserTimeZone, setProductIdentificationPref, - getAvailableTimeZones + getAvailableTimeZones, + hasPermission }); // Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters