-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not found SKUs message logic added #124
base: main
Are you sure you want to change the base?
Conversation
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
return ( | ||
<> | ||
{notFound === true ? ( | ||
<Alert variant="warning"> | ||
{intl.formatMessage(messages.affiliateCommissionWarning)} | ||
</Alert> | ||
) : ( | ||
<Alert variant="positive"> | ||
{intl.formatMessage(messages.affiliateCommissionSuccess)} | ||
</Alert> | ||
)} | ||
</> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use prevent return in this case I think it's a better idea.
return ( | |
<> | |
{notFound === true ? ( | |
<Alert variant="warning"> | |
{intl.formatMessage(messages.affiliateCommissionWarning)} | |
</Alert> | |
) : ( | |
<Alert variant="positive"> | |
{intl.formatMessage(messages.affiliateCommissionSuccess)} | |
</Alert> | |
)} | |
</> | |
) | |
if (notFound) { | |
return ( | |
<Alert variant="warning"> | |
{intl.formatMessage(messages.affiliateCommissionWarning)} | |
</Alert> | |
) | |
} | |
return ( | |
<Alert variant="positive"> | |
{intl.formatMessage(messages.affiliateCommissionSuccess)} | |
</Alert> | |
) |
{dataSKUs?.getNotFoundCommissions !== undefined ? ( | ||
<CommissionsNotFound notFound={dataSKUs.getNotFoundCommissions} /> | ||
) : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{dataSKUs?.getNotFoundCommissions !== undefined ? ( | |
<CommissionsNotFound notFound={dataSKUs.getNotFoundCommissions} /> | |
) : null} | |
{dataSKUs?.getNotFoundCommissions && <CommissionsNotFound notFound={dataSKUs.getNotFoundCommissions} />} |
What is the purpose of this pull request?
Based on the last affiliates-commission-service PR, we are adding two new graphQL operations to be used by the front end.
When a client uploads a new commissions spreadsheet, the back end will return if some of the IDs were not found by our catalog API, and by clicking on verifying the SKUs the client will be able to know if some error happened
What problem is this solving?
Better user experience
How to test it?
Accessing the link below and uploading some spreadsheets
https://commissionstest--bibiafiliados.myvtex.com/admin/affiliates-commissions
Screenshots or example usage
How does this PR make you feel? 🔗
Types of changes