Skip to content

Commit

Permalink
Merge pull request #520 from ymaheshwari1/feat/add-permission-on-look…
Browse files Browse the repository at this point in the history
…up-screen

Implemented: permission support to access the orderLookup page
  • Loading branch information
ymaheshwari1 authored May 14, 2024
2 parents 58ec51a + d35bc46 commit f924210
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/authorization/Actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export default {
"APP_TRANSFER_ORDER_DETAIL_VIEW": "APP_TRANSFER_ORDER_DETAIL_VIEW",
"APP_TRANSFER_ORDER_UPDATE":"APP_TRANSFER_ORDER_UPDATE",
"APP_CARRIERS_VIEW" : "APP_CARRIERS_VIEW",
"APP_CARRIERS_CREATE" : "APP_CARRIERS_CREATE"
"APP_CARRIERS_CREATE" : "APP_CARRIERS_CREATE",
"APP_ORDER_LOOKUP_VIEW": "APP_ORDER_LOOKUP_VIEW"
}
3 changes: 2 additions & 1 deletion src/authorization/Rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export default {
"APP_TRANSFER_ORDER_DETAIL_VIEW": "",
"APP_TRANSFER_ORDER_UPDATE": "",
"APP_CARRIERS_VIEW": "",
"APP_CARRIERS_CREATE": ""
"APP_CARRIERS_CREATE": "",
"APP_ORDER_LOOKUP_VIEW": "ORDER_LOOKUP_VIEW"
} as any
3 changes: 3 additions & 0 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ export default defineComponent({
title: "Order Lookup",
url: "/order-lookup",
childRoutes: ["/order-lookup/"],
meta: {
permissionId: "APP_ORDER_LOOKUP_VIEW"
}
}
];
Expand Down
10 changes: 8 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,20 @@ const routes: Array<RouteRecordRaw> = [
path: "/order-lookup",
name: "OrderLookup",
component: OrderLookup,
beforeEnter: authGuard
beforeEnter: authGuard,
meta: {
permissionId: "APP_ORDER_LOOKUP_VIEW"
}
},
{
path: "/order-lookup/:orderId",
name: "OrderLookupDetail",
component: OrderLookupDetail,
beforeEnter: authGuard,
props: true
props: true,
meta: {
permissionId: "APP_ORDER_LOOKUP_VIEW"
}
},
{
path: "/carriers",
Expand Down

0 comments on commit f924210

Please sign in to comment.