Skip to content

Commit

Permalink
Success banner fix in Scenario-3 Appeals-28703 (#19221)
Browse files Browse the repository at this point in the history
Co-authored-by: cacevesva <109166981+cacevesva@users.noreply.github.com>
  • Loading branch information
kamala-07 and cacevesva authored Aug 25, 2023
1 parent ba51df4 commit 11a1cc1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions client/COPY.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 7 additions & 1 deletion client/app/queue/AssignToView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion client/app/queue/AttorneyTaskListView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class AttorneyTaskListView extends React.PureComponent {
{error.detail}
</Alert>}
{success && <Alert type="success" title={success.title}>
{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)}
</Alert>}
<QueueTableBuilder
assignedTasks={this.props.workableTasks}
Expand Down
2 changes: 1 addition & 1 deletion client/app/queue/JudgeDecisionReviewTaskListView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class JudgeDecisionReviewTaskListView extends React.PureComponent {
{messages.error.detail}
</Alert>}
{messages.success && <Alert type="success" title={messages.success.title}>
{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)}
</Alert>}
<QueueTableBuilder assignedTasks={tasks} />
</AppSegment>;
Expand Down

0 comments on commit 11a1cc1

Please sign in to comment.