From b2ce936f9659aaaf8376ee409d4c0e5c7f191fe4 Mon Sep 17 00:00:00 2001 From: eve-git Date: Thu, 5 Feb 2026 14:01:31 -0800 Subject: [PATCH 1/2] 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, From b1b39953f402b0bb9981adc038bd1033ce461726 Mon Sep 17 00:00:00 2001 From: eve-git Date: Mon, 9 Feb 2026 10:45:26 -0800 Subject: [PATCH 2/2] update --- ppr-ui/src/components/queue/QueueFooter.vue | 4 ++-- ppr-ui/src/store/analystQueue.ts | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ppr-ui/src/components/queue/QueueFooter.vue b/ppr-ui/src/components/queue/QueueFooter.vue index c7f7b834a..764d8c58d 100644 --- a/ppr-ui/src/components/queue/QueueFooter.vue +++ b/ppr-ui/src/components/queue/QueueFooter.vue @@ -8,7 +8,7 @@ const { queueTransfer, reviewId, isAssignable, - isDecisionAllowed, + isUserAssignee, reviewDecision, validationErrors } = storeToRefs(useAnalystQueueStore()) @@ -97,7 +97,7 @@ const emit = defineEmits(['go-to-dash'])
{ }) }) -const isDecisionAllowed = computed(() => { +const isUserAssignee = 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 + return userName === queueTransfer.value?.assigneeName +}) + +const isDecisionAllowed = computed(() => { + return isUserAssignee.value && isInReview.value }) // Allow assigning/unassigning while NEW or IN_REVIEW. @@ -206,7 +209,6 @@ const assignees = computed(() => { return { - isDecisionAllowed, assignees, queueTableData, columnsToShow, @@ -215,6 +217,8 @@ const assignees = computed(() => { showClearFilterButton, isAssignable, isInReview, + isUserAssignee, + isDecisionAllowed, queueTransfer, reviewId, reviewDecision,