From 03bf0c5b33dcf528d9071bcae507f6f4bf71cfb3 Mon Sep 17 00:00:00 2001 From: k2maan Date: Tue, 21 Mar 2023 12:20:39 +0530 Subject: [PATCH] Implementd: disabling of buttons on orders page based on order update permission (#85zrthgeq) --- src/authorization/Actions.ts | 2 +- src/authorization/Rules.ts | 3 ++- src/views/Orders.vue | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/authorization/Actions.ts b/src/authorization/Actions.ts index 5c933b16b..d8cffda00 100644 --- a/src/authorization/Actions.ts +++ b/src/authorization/Actions.ts @@ -1,3 +1,3 @@ export default { - + 'APP_ORDER_UPDATE': 'APP_ORDER_UPDATE' } \ No newline at end of file diff --git a/src/authorization/Rules.ts b/src/authorization/Rules.ts index 7785ae55e..0f36b66d6 100644 --- a/src/authorization/Rules.ts +++ b/src/authorization/Rules.ts @@ -2,5 +2,6 @@ export default { "APP_ORDERS_VIEW": "", "APP_CATALOG_VIEW": "", "APP_ORDER_DETAIL_VIEW": "", - "APP_PRODUCT_DETAIL_VIEW": "" + "APP_PRODUCT_DETAIL_VIEW": "", + "APP_ORDER_UPDATE": "", } as any \ No newline at end of file diff --git a/src/views/Orders.vue b/src/views/Orders.vue index 5b13c8fd1..a29c51e90 100644 --- a/src/views/Orders.vue +++ b/src/views/Orders.vue @@ -53,7 +53,7 @@
- + {{ part.shipmentMethodEnum?.shipmentMethodEnumId === 'STOREPICKUP' ? $t("Ready for pickup") : $t("Ready to ship") }}
@@ -88,7 +88,7 @@
- + {{ part.shipmentMethodEnum.shipmentMethodEnumId === 'STOREPICKUP' ? $t("Handover") : $t("Ship") }} @@ -172,6 +172,7 @@ import emitter from "@/event-bus" import { api } from '@/adapter'; import { translate } from "@/i18n"; import AssignPickerModal from "./AssignPickerModal.vue"; +import { Actions, hasPermission } from '@/authorization' export default defineComponent({ name: 'Orders', @@ -410,8 +411,10 @@ export default defineComponent({ const segmentSelected = ref('open'); return { + Actions, callOutline, copyToClipboard, + hasPermission, mailOutline, print, router,