Skip to content

Commit

Permalink
Remove the conditional completed and additionalInfo attribute for d…
Browse files Browse the repository at this point in the history
…ispute task.
  • Loading branch information
shendy-a8c committed Jul 22, 2022
1 parent 1589cb4 commit 8a3245d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion changelog/fix-4123-dispute-count
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Significance: patch
Type: fix

Correctly show the number of disputes that need to be responded in task list.
Show the correct number of disputes needing a response in the Payments > Overview task list.
7 changes: 2 additions & 5 deletions client/overview/task-list/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ export const getTasks = ( {
),
numDisputesNeedingResponse
),
additionalInfo:
0 < numDisputesNeedingResponse
? __( 'View and respond', 'woocommerce-payments' )
: '',
completed: 0 === numDisputesNeedingResponse,
additionalInfo: __( 'View and respond', 'woocommerce-payments' ),
completed: false,
isDeletable: true,
isDismissable: true,
allowSnooze: true,
Expand Down
2 changes: 2 additions & 0 deletions client/overview/task-list/test/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ describe( 'getTasks()', () => {
completed: false,
level: 3,
title: '1 disputed payment needs your response',
additionalInfo: 'View and respond',
} ),
] )
);
Expand All @@ -201,6 +202,7 @@ describe( 'getTasks()', () => {
completed: false,
level: 3,
title: '2000 disputed payments need your response',
additionalInfo: 'View and respond',
} ),
] )
);
Expand Down

0 comments on commit 8a3245d

Please sign in to comment.