-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: display of bank invoice information #199
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.
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
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.
Algumas alterações rápidas de boas práticas/legibilidade, depois de verificado se ainda resolve o problema, vou validar de fato a usabilidade da alteração pra ver o impacto que ela vai ter
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.
Obrigado pelas sugestões.
Em meu novo commit eu fiz apenas alguns ajustes em cima da sua sugestão:
- Removi os nested ternaries da linha 69;
- Corrigi a função sortPayments(), que estava invertida e o TypeScript não aceitou a operação aritmética entre booleanos.
@gaboulsvtex , eu fiz uma outra proposta de implementação, dado que a ideia de reordenar só seria um workaround pro problema principal (retornar apenas um método de pagamento quando possui vários), se puder checar pra ver se resolve o seu problema, creio que resolvendo, a gente encerra esse e segue pelo outro: #200 |
What is the purpose of this pull request?
Fix a bug.
What problem is this solving?
In orders where the bank invoice payment method wasn't the first payment of the first transaction, its information wasn't displayed at the order placed page
How should this be manually tested?
There are 2 use cases for this change:
Screenshots or example usage
Example of an order with bank invoice in the second payment of the array, where its information is not displayed:
https://gaboulstore.myvtex.com/checkout/orderPlaced/?og=1486610500025
Example of the same order, but in a workspace with this change implemented:
https://bankinvoice--gaboulstore.myvtex.com/checkout/orderPlaced/?og=1486610500025
Types of changes