Skip to content

Commit

Permalink
Merge pull request #330 from amansinghbais/270-oms-permission
Browse files Browse the repository at this point in the history
Improved: dxp-component version to incorporate permissions check over goToOms button. (dxp-270)
  • Loading branch information
ravilodhi authored Nov 6, 2024
2 parents 33cbb71 + b5088cc commit eb2630c
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 9 deletions.
71 changes: 66 additions & 5 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 @@ -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.13.0",
"@hotwax/dxp-components": "^1.15.4",
"@hotwax/oms-api": "^1.14.0",
"@ionic/core": "^7.8.1",
"@ionic/vue": "^7.8.1",
Expand Down
3 changes: 2 additions & 1 deletion src/authorization/Actions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default {
"FACILITIES_APP_VIEW": "FACILITIES_APP_VIEW"
"FACILITIES_APP_VIEW": "FACILITIES_APP_VIEW",
"APP_COMMERCE_VIEW": "APP_COMMERCE_VIEW"
}
3 changes: 2 additions & 1 deletion src/authorization/Rules.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default {
"FACILITIES_APP_VIEW": "FACILITIES_APP_VIEW"
"FACILITIES_APP_VIEW": "FACILITIES_APP_VIEW",
"APP_COMMERCE_VIEW": "COMMERCEUSER_VIEW"
} as any
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import './theme/variables.css';
import '@hotwax/apps-theme';

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';
Expand All @@ -50,6 +50,7 @@ const app = createApp(App)
actions: permissionActions
})
.use(dxpComponents, {
Actions,
defaultImgUrl: require("@/assets/images/defaultImage.png"),
login,
logout,
Expand All @@ -62,6 +63,7 @@ const app = createApp(App)
showToast,
setUserTimeZone,
getAvailableTimeZones,
hasPermission
});

router.isReady().then(() => {
Expand Down

0 comments on commit eb2630c

Please sign in to comment.