From 11a1cc197e44d3c928d27e807ec29fb5ff6b7f00 Mon Sep 17 00:00:00 2001 From: Kamala Madamanchi <110078646+kamala-07@users.noreply.github.com> Date: Fri, 25 Aug 2023 10:54:23 -0500 Subject: [PATCH] Success banner fix in Scenario-3 Appeals-28703 (#19221) Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com> --- client/COPY.json | 1 + client/app/queue/AssignToView.jsx | 8 +++++++- client/app/queue/AttorneyTaskListView.jsx | 2 +- client/app/queue/JudgeDecisionReviewTaskListView.jsx | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/client/COPY.json b/client/COPY.json index dc0a6a0f118..27f2e334b67 100644 --- a/client/COPY.json +++ b/client/COPY.json @@ -663,6 +663,7 @@ "PULAC_CERULLO_REMINDER_MODAL_OPT_FALSE": "No, continue sending to Dispatch", "PULAC_CERULLO_REMINDER_MODAL_OPT_TRUE": "Yes, notify Pulac Cerullo team of jurisdictional conflict", "ASSIGN_TASK_SUCCESS_MESSAGE": "Task assigned to %s", + "REASSIGN_TASK_SUCCESS_MESSAGE_SCM": "You have successfully assigned %s’s case to %s", "REASSIGN_TASK_SUCCESS_MESSAGE": "You have successfully reassigned this task to %s", "HEARING_ASSIGN_TASK_SUCCESS_MESSAGE_DETAIL": "You can continue to assign tasks to yourself and others using this queue.", "ASSIGN_TASK_SUCCESS_MESSAGE_MOVE_LEGACY_APPEALS_VLJ": "You have successfully reassigned %s’s case to %s", diff --git a/client/app/queue/AssignToView.jsx b/client/app/queue/AssignToView.jsx index 41bf4e1f677..b366221cf15 100644 --- a/client/app/queue/AssignToView.jsx +++ b/client/app/queue/AssignToView.jsx @@ -210,7 +210,13 @@ class AssignToView extends React.Component { } }; - const successMsg = { title: sprintf(COPY.REASSIGN_TASK_SUCCESS_MESSAGE, this.getAssignee()) }; + const assignedByListItem = () => { + const assignor = this.props.appeal.veteranFullName || null; + + return assignor; + }; + + const successMsg = { title: sprintf(COPY.REASSIGN_TASK_SUCCESS_MESSAGE_SCM, assignedByListItem(), this.getAssignee()) }; return this.props.requestPatch(`/tasks/${task.taskId}`, payload, successMsg).then((resp) => { this.props.onReceiveAmaTasks(resp.body.tasks.data); diff --git a/client/app/queue/AttorneyTaskListView.jsx b/client/app/queue/AttorneyTaskListView.jsx index cdd6e7669a6..c5c130a8151 100644 --- a/client/app/queue/AttorneyTaskListView.jsx +++ b/client/app/queue/AttorneyTaskListView.jsx @@ -53,7 +53,7 @@ class AttorneyTaskListView extends React.PureComponent { {error.detail} } {success && - {success.detail || COPY.ATTORNEY_QUEUE_TABLE_SUCCESS_MESSAGE_DETAIL} + {success.detail || (success.title.includes('You have successfully reassigned ') && COPY.ATTORNEY_QUEUE_TABLE_SUCCESS_MESSAGE_DETAIL)} } } {messages.success && - {messages.success.detail || COPY.JUDGE_QUEUE_TABLE_SUCCESS_MESSAGE_DETAIL} + {messages.success.detail || (messages.success.title.includes('You have successfully reassigned ') && COPY.JUDGE_QUEUE_TABLE_SUCCESS_MESSAGE_DETAIL)} } ;