Skip to content

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Dec 3, 2025

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PS-469

What's in this PR?

image image

if (updateObj.paymentStatus === 'Owed') {
paymentStatus = 'OWED'
} else if (updateObj.paymentStatus === 'On Hold') {
} else if (updateObj.paymentStatus === 'On Hold (Admin)') {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The change from 'On Hold' to 'On Hold (Admin)' in the condition might affect other parts of the code that rely on the previous status. Ensure that all relevant parts of the application are updated to handle this new status correctly.

} else if (['On Hold (Member)', 'On Hold (Tax Form)', 'On Hold (Payment Provider)'].indexOf(status) !== -1) {
status = 'Owed'
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The removal of the logic that maps 'On Hold (Admin)' back to 'On Hold' could lead to inconsistencies if other parts of the application expect the status to be 'On Hold'. Verify that this change does not introduce any unintended side effects.


const options = useCallback(() => {
if (props.payment.status.toUpperCase() !== 'PAID') {
const isMemberHold = ['On Hold (Member)', 'On Hold (Tax Form)', 'On Hold (Payment Provider)'].indexOf(props.payment.status) !== -1;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 readability]
Consider using includes instead of indexOf for better readability and to avoid potential off-by-one errors. const isMemberHold = ['On Hold (Member)', 'On Hold (Tax Form)', 'On Hold (Payment Provider)'].includes(props.payment.status);

Copy link
Collaborator

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍


const options = useCallback(() => {
if (props.payment.status.toUpperCase() !== 'PAID') {
const isMemberHold = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
The change from indexOf to includes is a good improvement for readability and clarity. However, ensure that props.payment.status is always a string to avoid potential runtime errors.

@vas3a vas3a merged commit dab66df into dev Dec 3, 2025
8 checks passed
@vas3a vas3a deleted the PS-469_update-walletadmin-ui-to-show-onholdadmin branch December 3, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants