From b2ce936f9659aaaf8376ee409d4c0e5c7f191fe4 Mon Sep 17 00:00:00 2001 From: eve-git Date: Thu, 5 Feb 2026 14:01:31 -0800 Subject: [PATCH] Only the current assigned user can make decision --- ppr-ui/src/components/queue/QueueFooter.vue | 11 +++++++++-- .../pages/mhrInformation/MhrQueueTransfer/index.vue | 4 ++-- ppr-ui/src/store/analystQueue.ts | 13 +++++++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ppr-ui/src/components/queue/QueueFooter.vue b/ppr-ui/src/components/queue/QueueFooter.vue index 67ce94e37..c7f7b834a 100644 --- a/ppr-ui/src/components/queue/QueueFooter.vue +++ b/ppr-ui/src/components/queue/QueueFooter.vue @@ -4,7 +4,14 @@ import { useAnalystQueueStore } from '@/store/analystQueue'; import { updateQueuedTransfer } from '@/utils/mhr-api-helper' import type { QueueReviewUpdatePayloadIF } from '@/composables/analystQueue/interfaces' -const { queueTransfer, reviewId, isAssignable, isInReview, reviewDecision, validationErrors } = storeToRefs(useAnalystQueueStore()) +const { + queueTransfer, + reviewId, + isAssignable, + isDecisionAllowed, + reviewDecision, + validationErrors +} = storeToRefs(useAnalystQueueStore()) const { validateReviewDecision } = useAnalystQueueStore() const isAssigned = computed(() => { @@ -90,7 +97,7 @@ const emit = defineEmits(['go-to-dash'])
{ -
+
diff --git a/ppr-ui/src/store/analystQueue.ts b/ppr-ui/src/store/analystQueue.ts index 8808ac0ab..d8d08b212 100644 --- a/ppr-ui/src/store/analystQueue.ts +++ b/ppr-ui/src/store/analystQueue.ts @@ -8,7 +8,7 @@ import type { import { queueTableColumns, ReviewStatusTypes } from "@/composables" import { getQueuedTransfer, getReviews } from "@/utils/mhr-api-helper" import { computed, ref } from 'vue' - +import { useStore } from '@/store/store' export const useAnalystQueueStore = defineStore('mhr/queue', () => { // queueTable @@ -132,6 +132,15 @@ const showClearFilterButton = computed(() => { }) }) +const isDecisionAllowed = computed(() => { + const assetsStore = useStore() + const userFirstName = assetsStore.getUserFirstName + const userLastName = assetsStore.getUserLastName + const userName = `${userFirstName} ${userLastName}` + const isUserAssignee = userName === queueTransfer.value?.assigneeName + return isUserAssignee && isInReview.value +}) + // Allow assigning/unassigning while NEW or IN_REVIEW. const isAssignable = computed(() => { return [ReviewStatusTypes.NEW, ReviewStatusTypes.IN_REVIEW].includes(queueTransferStatus.value) @@ -142,7 +151,6 @@ const isInReview = computed(() => { return queueTransferStatus.value === ReviewStatusTypes.IN_REVIEW }) - const assignees = computed(() => { const uniqueAssignees = new Set() @@ -198,6 +206,7 @@ const assignees = computed(() => { return { + isDecisionAllowed, assignees, queueTableData, columnsToShow,